diff --git a/Spigot-Server-Patches/Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch b/Spigot-Server-Patches/Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch index 68099732f..d1cac0b51 100644 --- a/Spigot-Server-Patches/Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch +++ b/Spigot-Server-Patches/Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch @@ -13,6 +13,19 @@ Specially with servers using smaller mob spawn ranges than view distance, as wel This patch returns mob counting to use all loaded chunks, and 17x17 division. +diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/Chunk.java ++++ b/src/main/java/net/minecraft/server/Chunk.java +@@ -0,0 +0,0 @@ public class Chunk { + i = this.entitySlices.length - 1; + } + +- this.entitySlices[i].remove(entity); ++ if (!this.entitySlices[i].remove(entity)) { return; } // Paper + // Paper start - update counts + if (entity instanceof EntityItem) { + itemCounts[i]--; diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index 6d0356e03..491f6270c 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -120,6 +120,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return new Location(entity.getWorld().getWorld(), entity.locX, entity.locY, entity.locZ); + } + ++ public static BlockPosition toBlockPosition(Location loc) { ++ return new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()); ++ } ++ + public static boolean isEdgeOfChunk(BlockPosition pos) { + final int modX = pos.getX() & 15; + final int modZ = pos.getZ() & 15;