diff --git a/Spigot-Server-Patches/Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch b/Spigot-Server-Patches/Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch index d3341af446..4a9ef8c75b 100644 --- a/Spigot-Server-Patches/Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch +++ b/Spigot-Server-Patches/Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch @@ -22,7 +22,7 @@ index 71d0db3f3..a51b648c5 100644 this.a(entity, entity.ac); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c0816b9f8..623290caa 100644 +index c0816b9f8..b1e7b63e0 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -76,13 +76,15 @@ index c0816b9f8..623290caa 100644 this.tileEntityListTick.remove(tileTickPosition--); //this.tileEntityList.remove(tileentity); // Paper - remove unused list - if (this.isLoaded(tileentity.getPosition())) { +- this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition()); + // Paper start + net.minecraft.server.Chunk chunk = tileentity.getCurrentChunk(); + if (chunk != null) { ++ chunk.removeTileEntity(tileentity.getPosition()); + // Paper end - this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition()); } } + } @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { int k = MathHelper.floor(entity.locZ / 16.0D);