mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-21 06:28:56 +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);
|
iblockdata.onPlace(this.world, blockposition, iblockdata1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -654,7 +695,15 @@
|
@@ -654,7 +695,12 @@
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||||
- TileEntity tileentity = (TileEntity) this.tileEntities.get(blockposition);
|
- TileEntity tileentity = (TileEntity) this.tileEntities.get(blockposition);
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ TileEntity tileentity = null;
|
+ TileEntity tileentity = world.capturedTileEntities.get(blockposition);
|
||||||
+ if (world.captureBlockStates) {
|
|
||||||
+ tileentity = world.capturedTileEntities.get(blockposition);
|
|
||||||
+ }
|
|
||||||
+ if (tileentity == null) {
|
+ if (tileentity == null) {
|
||||||
+ tileentity = (TileEntity) this.tileEntities.get(blockposition);
|
+ tileentity = (TileEntity) this.tileEntities.get(blockposition);
|
||||||
+ }
|
+ }
|
||||||
|
@ -107,7 +104,7 @@
|
||||||
|
|
||||||
if (tileentity == null) {
|
if (tileentity == null) {
|
||||||
if (chunk_enumtileentitystate == Chunk.EnumTileEntityState.IMMEDIATE) {
|
if (chunk_enumtileentitystate == Chunk.EnumTileEntityState.IMMEDIATE) {
|
||||||
@@ -689,6 +738,13 @@
|
@@ -689,6 +735,13 @@
|
||||||
|
|
||||||
tileentity.z();
|
tileentity.z();
|
||||||
this.tileEntities.put(blockposition, tileentity);
|
this.tileEntities.put(blockposition, tileentity);
|
||||||
|
@ -121,7 +118,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -735,9 +791,21 @@
|
@@ -735,9 +788,21 @@
|
||||||
int i = aentityslice.length;
|
int i = aentityslice.length;
|
||||||
|
|
||||||
for (int j = 0; j < i; ++j) {
|
for (int j = 0; j < i; ++j) {
|
||||||
|
@ -145,7 +142,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -799,8 +867,8 @@
|
@@ -799,8 +864,8 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
|
|
||||||
|
@ -156,7 +153,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1006,13 +1074,13 @@
|
@@ -1006,13 +1071,13 @@
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public LongSet b(String s) {
|
public LongSet b(String s) {
|
||||||
|
@ -172,7 +169,7 @@
|
||||||
return new LongOpenHashSet();
|
return new LongOpenHashSet();
|
||||||
})).add(i);
|
})).add(i);
|
||||||
}
|
}
|
||||||
@@ -1061,14 +1129,14 @@
|
@@ -1061,14 +1126,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.t instanceof ProtoChunkTickList) {
|
if (this.t instanceof ProtoChunkTickList) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue