diff --git a/Spigot-Server-Patches/Change-implementation-of-tile-entity-removal-list.patch b/Spigot-Server-Patches/Change-implementation-of-tile-entity-removal-list.patch index 0218e03cf6..89aa2144fb 100644 --- a/Spigot-Server-Patches/Change-implementation-of-tile-entity-removal-list.patch +++ b/Spigot-Server-Patches/Change-implementation-of-tile-entity-removal-list.patch @@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // Spigot end - protected final List f = Lists.newArrayList(); + protected final Set f = Sets.newHashSet(); // Paper - //public final List tileEntityList = Lists.newArrayList(); // Paper - Remove unused list + public final List tileEntityList = Lists.newArrayList(); public final List tileEntityListTick = Lists.newArrayList(); private final List b = Lists.newArrayList(); - private final List tileEntityListUnload = Lists.newArrayList(); diff --git a/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch index 0edda7ffc5..ab3988be6d 100644 --- a/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/Optimize-TileEntity-Ticking.patch @@ -186,53 +186,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g); } -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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 { - }; - // Spigot end - protected final List f = Lists.newArrayList(); -- public final List tileEntityList = Lists.newArrayList(); -+ //public final List tileEntityList = Lists.newArrayList(); // Paper - Remove unused list - public final List tileEntityListTick = Lists.newArrayList(); - private final List b = Lists.newArrayList(); - private final List tileEntityListUnload = Lists.newArrayList(); -@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { - // CraftBukkit start - From below, clean up tile entities before ticking them - if (!this.tileEntityListUnload.isEmpty()) { - this.tileEntityListTick.removeAll(this.tileEntityListUnload); -- this.tileEntityList.removeAll(this.tileEntityListUnload); -+ //this.tileEntityList.removeAll(this.tileEntityListUnload); // Paper - Remove unused list - this.tileEntityListUnload.clear(); - } - // CraftBukkit end -@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { - if (tileentity.x()) { - tilesThisCycle--; - this.tileEntityListTick.remove(tileTickPosition--); -- this.tileEntityList.remove(tileentity); -+ //this.tileEntityList.remove(tileentity); // Paper - Remove unused list - if (this.isLoaded(tileentity.getPosition())) { - this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition()); - } -@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { - protected void l() {} - - public boolean a(TileEntity tileentity) { -- boolean flag = this.tileEntityList.add(tileentity); -+ boolean flag = true; // Paper - Remove unused list - - if (flag && tileentity instanceof ITickable) { - this.tileEntityListTick.add(tileentity); -@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { - } else { - if (tileentity != null) { - this.b.remove(tileentity); -- this.tileEntityList.remove(tileentity); -+ //this.tileEntityList.remove(tileentity); // Paper - Remove unused list - this.tileEntityListTick.remove(tileentity); - } - -- \ No newline at end of file