mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 17:52:28 +01:00
Always return captured tiles from chunks as well.
Missed in 22c613d869
Fixes replacing tile entities in BlockPlaceEvent (or calling setBlockData on them)
This commit is contained in:
parent
4e2f571337
commit
1c7adf74e4
1 changed files with 7 additions and 10 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue