diff options
Diffstat (limited to 'patches/server/0663-Option-to-have-default-CustomSpawners-in-custom-worl.patch')
-rw-r--r-- | patches/server/0663-Option-to-have-default-CustomSpawners-in-custom-worl.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0663-Option-to-have-default-CustomSpawners-in-custom-worl.patch b/patches/server/0663-Option-to-have-default-CustomSpawners-in-custom-worl.patch index 94613610ac..45ef226165 100644 --- a/patches/server/0663-Option-to-have-default-CustomSpawners-in-custom-worl.patch +++ b/patches/server/0663-Option-to-have-default-CustomSpawners-in-custom-worl.patch @@ -10,7 +10,7 @@ just looking at the LevelStem key, look at the DimensionType key which is one level below that. Defaults to off to keep vanilla behavior. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index af392711da61a1921be1f82396c2a04dc897d563..7841421f00a3408e52b8d060674e6a686681210e 100644 +index af392711da61a1921be1f82396c2a04dc897d563..2a92a8a4896a1ce27b3f6e8c5b965c1efb70127e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -647,7 +647,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -20,7 +20,7 @@ index af392711da61a1921be1f82396c2a04dc897d563..7841421f00a3408e52b8d060674e6a68 - world = new ServerLevel(this, this.executor, worldSession, iworlddataserver, worldKey, worlddimension, worldloadlistener, flag, j, ImmutableList.of(), true, this.overworld().getRandomSequences(), org.bukkit.World.Environment.getEnvironment(dimension), gen, biomeProvider); + // Paper start - option to use the dimension_type to check if spawners should be added. I imagine mojang will add some datapack-y way of managing this in the future. + final List<CustomSpawner> spawners; -+ if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.useDimensionTypeForCustomSpawners && this.registryAccess().registryOrThrow(Registries.DIMENSION_TYPE).getResourceKey(worlddimension.type().value()).orElseThrow() == net.minecraft.world.level.dimension.BuiltinDimensionTypes.OVERWORLD) { ++ if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.useDimensionTypeForCustomSpawners && this.registryAccess().lookupOrThrow(Registries.DIMENSION_TYPE).getResourceKey(worlddimension.type().value()).orElseThrow() == net.minecraft.world.level.dimension.BuiltinDimensionTypes.OVERWORLD) { + spawners = list; + } else { + spawners = Collections.emptyList(); |