From 2681166072054b7f6a0aaa66db4df2644f460271 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Sun, 21 Dec 2014 17:32:35 +0000 Subject: [PATCH] Remove the delayed tile entity removal, fixes issues with recursive removal of comparators --- nms-patches/Chunk.patch | 40 ++++++---------------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/nms-patches/Chunk.patch b/nms-patches/Chunk.patch index 41fe5fbee0..fcb476013d 100644 --- a/nms-patches/Chunk.patch +++ b/nms-patches/Chunk.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/Chunk.java 2014-11-28 17:43:42.981707438 +0000 -+++ src/main/java/net/minecraft/server/Chunk.java 2014-11-28 17:38:22.000000000 +0000 +--- ../work/decompile-8eb82bde/net/minecraft/server/Chunk.java 2014-12-21 17:32:05.580576417 +0000 ++++ src/main/java/net/minecraft/server/Chunk.java 2014-12-21 17:32:05.580576417 +0000 @@ -1,6 +1,7 @@ package net.minecraft.server; @@ -79,35 +79,7 @@ public Chunk(World world, ChunkSnapshot chunksnapshot, int i, int j) { this(world, i, j); short short0 = 256; -@@ -465,7 +505,13 @@ - flag = j >= i1; - } - -- chunksection.setType(i, j & 15, k, iblockdata); -+ // CraftBukkit start - Delay removing containers until after they're cleaned up -+ if (!(block1 instanceof IContainer)) { -+ chunksection.setType(i, j & 15, k, iblockdata); -+ } -+ // CraftBukkit end -+ -+ - if (block1 != block) { - if (!this.world.isStatic) { - block1.remove(this.world, blockposition, iblockdata1); -@@ -474,6 +520,12 @@ - } - } - -+ // CraftBukkit start - Delay removing containers until after they're cleaned up -+ if (block1 instanceof IContainer) { -+ chunksection.setType(i, j & 15, k, iblockdata); -+ } -+ // CraftBukkit end -+ - if (chunksection.b(i, j & 15, k) != block) { - return null; - } else { -@@ -505,7 +557,8 @@ +@@ -505,7 +545,8 @@ } } @@ -117,7 +89,7 @@ block.onPlace(this.world, blockposition, iblockdata); } -@@ -586,7 +639,11 @@ +@@ -586,7 +627,11 @@ int j = MathHelper.floor(entity.locZ / 16.0D); if (i != this.locX || j != this.locZ) { @@ -130,7 +102,7 @@ entity.die(); } -@@ -673,6 +730,13 @@ +@@ -673,6 +718,13 @@ tileentity.D(); this.tileEntities.put(blockposition, tileentity); @@ -144,7 +116,7 @@ } } -@@ -716,7 +780,21 @@ +@@ -716,7 +768,21 @@ } for (int i = 0; i < this.entitySlices.length; ++i) {