diff --git a/src/main/java/net/neoforged/neoforge/common/world/ModifiableBiomeInfo.java b/src/main/java/net/neoforged/neoforge/common/world/ModifiableBiomeInfo.java index 8099df85c6..74d844fdbf 100644 --- a/src/main/java/net/neoforged/neoforge/common/world/ModifiableBiomeInfo.java +++ b/src/main/java/net/neoforged/neoforge/common/world/ModifiableBiomeInfo.java @@ -10,7 +10,6 @@ import com.mojang.serialization.DynamicOps; import com.mojang.serialization.JsonOps; import java.util.List; -import java.util.Locale; import net.minecraft.core.Holder; import net.minecraft.core.RegistryAccess; import net.minecraft.resources.RegistryOps; @@ -67,20 +66,18 @@ public BiomeInfo getModifiedBiomeInfo() { } /** - * Internal forge method; the game will crash if mods invoke this. + * Internal NeoForge method. Will do nothing if this modifier had already been applied. * Creates and caches the modified biome info. * * @param biome named biome with original data. * @param biomeModifiers biome modifiers to apply. * * @return whether the biome's network-synced data was modified - * - * @throws IllegalStateException if invoked more than once. */ @ApiStatus.Internal public boolean applyBiomeModifiers(final Holder biome, final List biomeModifiers, RegistryAccess registryAccess) { if (this.modifiedBiomeInfo != null) - throw new IllegalStateException(String.format(Locale.ENGLISH, "Biome %s already modified", biome)); + return true; BiomeInfo original = this.getOriginalBiomeInfo(); final BiomeInfo.Builder builder = BiomeInfo.Builder.copyOf(original); diff --git a/src/main/java/net/neoforged/neoforge/common/world/ModifiableStructureInfo.java b/src/main/java/net/neoforged/neoforge/common/world/ModifiableStructureInfo.java index 3247d5f903..55371a81f9 100644 --- a/src/main/java/net/neoforged/neoforge/common/world/ModifiableStructureInfo.java +++ b/src/main/java/net/neoforged/neoforge/common/world/ModifiableStructureInfo.java @@ -6,7 +6,6 @@ package net.neoforged.neoforge.common.world; import java.util.List; -import java.util.Locale; import net.minecraft.core.Holder; import net.minecraft.world.level.levelgen.structure.Structure; import net.minecraft.world.level.levelgen.structure.Structure.StructureSettings; @@ -55,18 +54,16 @@ public StructureInfo getModifiedStructureInfo() { } /** - * Internal neoforge method; the game will crash if mods invoke this. + * Internal NeoForge method. Will do nothing if this modifier had already been applied. * Creates and caches the modified structure info. * * @param structure named structure with original data. * @param structureModifiers structure modifiers to apply. - * - * @throws IllegalStateException if invoked more than once. */ @ApiStatus.Internal public void applyStructureModifiers(final Holder structure, final List structureModifiers) { if (this.modifiedStructureInfo != null) - throw new IllegalStateException(String.format(Locale.ENGLISH, "Structure %s already modified", structure)); + return; StructureInfo original = this.getOriginalStructureInfo(); final StructureInfo.Builder builder = StructureInfo.Builder.copyOf(original);