diff --git a/Spigot-Server-Patches/Prevent-mob-spawning-from-loading-generating-chunks.patch b/Spigot-Server-Patches/Prevent-mob-spawning-from-loading-generating-chunks.patch index e12256f95b..f31346f2cb 100644 --- a/Spigot-Server-Patches/Prevent-mob-spawning-from-loading-generating-chunks.patch +++ b/Spigot-Server-Patches/Prevent-mob-spawning-from-loading-generating-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent mob spawning from loading/generating chunks diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 387570ed67..0661ea20d8 100644 +index 387570ed67..97ef41fe82 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ public final class SpawnerCreature { @@ -14,15 +14,18 @@ index 387570ed67..0661ea20d8 100644 int k2 = blockposition1.getZ(); - IBlockData iblockdata = worldserver.getType(blockposition1); + IBlockData iblockdata = worldserver.getTypeIfLoaded(blockposition1); // Paper - don't load chunks for mob spawn -+ if (iblockdata == null) continue; // Paper - don't load chunks for mob spawn - if (!iblockdata.isOccluding()) { +- if (!iblockdata.isOccluding()) { ++ if (iblockdata != null && !iblockdata.isOccluding()) { // Paper - don't load chunks for mob spawn int l2 = 0; + int i3 = 0; + @@ -0,0 +0,0 @@ public final class SpawnerCreature { + i4 = biomebase_biomemeta.c + worldserver.random.nextInt(1 + biomebase_biomemeta.d - biomebase_biomemeta.c); } - if (worldserver.a(enumcreaturetype, biomebase_biomemeta, (BlockPosition) blockposition_mutableblockposition)) { -+ if (!worldserver.isLoaded(blockposition_mutableblockposition)) continue; // Paper - don't load chunks for mob spawn +- if (worldserver.a(enumcreaturetype, biomebase_biomemeta, (BlockPosition) blockposition_mutableblockposition)) { ++ if (worldserver.isLoaded(blockposition_mutableblockposition) && worldserver.a(enumcreaturetype, biomebase_biomemeta, (BlockPosition) blockposition_mutableblockposition)) { // Paper - don't load chunks for mob spawn EntityPositionTypes.Surface entitypositiontypes_surface = EntityPositionTypes.a(biomebase_biomemeta.b); if (entitypositiontypes_surface != null && a(entitypositiontypes_surface, worldserver, blockposition_mutableblockposition, biomebase_biomemeta.b)) { EntityInsentient entityinsentient;