summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-07-22 19:35:42 +1000
committermd_5 <git@md-5.net>2018-07-22 19:35:42 +1000
commit1c7adf74e45bb83545603c1e4b7974ad979c442c (patch)
treece7bbde03f370fd9e5748f9738c5ac5afef61b04
parent4e2f57133714acc3f84bec56d8ebcbcfc0228326 (diff)
downloadcraftbukkit-1c7adf74e45bb83545603c1e4b7974ad979c442c.tar
craftbukkit-1c7adf74e45bb83545603c1e4b7974ad979c442c.tar.gz
craftbukkit-1c7adf74e45bb83545603c1e4b7974ad979c442c.tar.lz
craftbukkit-1c7adf74e45bb83545603c1e4b7974ad979c442c.tar.xz
craftbukkit-1c7adf74e45bb83545603c1e4b7974ad979c442c.zip
Always return captured tiles from chunks as well.
Missed in 22c613d8690880ca7d269db709054b4886429d98 Fixes replacing tile entities in BlockPlaceEvent (or calling setBlockData on them)
-rw-r--r--nms-patches/Chunk.patch17
1 files changed, 7 insertions, 10 deletions
diff --git a/nms-patches/Chunk.patch b/nms-patches/Chunk.patch
index 7159a34c..cc5917d3 100644
--- a/nms-patches/Chunk.patch
+++ b/nms-patches/Chunk.patch
@@ -90,16 +90,13 @@
iblockdata.onPlace(this.world, blockposition, iblockdata1);
}
-@@ -654,7 +695,15 @@
+@@ -654,7 +695,12 @@
@Nullable
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
- TileEntity tileentity = (TileEntity) this.tileEntities.get(blockposition);
+ // CraftBukkit start
-+ TileEntity tileentity = null;
-+ if (world.captureBlockStates) {
-+ tileentity = world.capturedTileEntities.get(blockposition);
-+ }
++ TileEntity tileentity = world.capturedTileEntities.get(blockposition);
+ if (tileentity == null) {
+ tileentity = (TileEntity) this.tileEntities.get(blockposition);
+ }
@@ -107,7 +104,7 @@
if (tileentity == null) {
if (chunk_enumtileentitystate == Chunk.EnumTileEntityState.IMMEDIATE) {
-@@ -689,6 +738,13 @@
+@@ -689,6 +735,13 @@
tileentity.z();
this.tileEntities.put(blockposition, tileentity);
@@ -121,7 +118,7 @@
}
}
-@@ -735,9 +791,21 @@
+@@ -735,9 +788,21 @@
int i = aentityslice.length;
for (int j = 0; j < i; ++j) {
@@ -145,7 +142,7 @@
}
}
-@@ -799,8 +867,8 @@
+@@ -799,8 +864,8 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -156,7 +153,7 @@
}
}
}
-@@ -1006,13 +1074,13 @@
+@@ -1006,13 +1071,13 @@
@Nullable
public LongSet b(String s) {
@@ -172,7 +169,7 @@
return new LongOpenHashSet();
})).add(i);
}
-@@ -1061,14 +1129,14 @@
+@@ -1061,14 +1126,14 @@
}
if (this.t instanceof ProtoChunkTickList) {