mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 18:12:09 +01:00
SPIGOT-7593: Fix sapling growth physics / client-side updates
By: md_5 <git@md-5.net>
This commit is contained in:
parent
db29270cd0
commit
4624f313ca
1 changed files with 8 additions and 7 deletions
|
@ -135,7 +135,7 @@
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -207,6 +304,17 @@
|
||||
@@ -207,6 +304,18 @@
|
||||
|
||||
@Override
|
||||
public boolean setBlock(BlockPosition blockposition, IBlockData iblockdata, int i, int j) {
|
||||
|
@ -147,13 +147,14 @@
|
|||
+ this.capturedBlockStates.put(blockposition.immutable(), blockstate);
|
||||
+ }
|
||||
+ blockstate.setData(iblockdata);
|
||||
+ blockstate.setFlag(i);
|
||||
+ return true;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (this.isOutsideBuildHeight(blockposition)) {
|
||||
return false;
|
||||
} else if (!this.isClientSide && this.isDebug()) {
|
||||
@@ -214,13 +322,29 @@
|
||||
@@ -214,13 +323,29 @@
|
||||
} else {
|
||||
Chunk chunk = this.getChunkAt(blockposition);
|
||||
Block block = iblockdata.getBlock();
|
||||
|
@ -184,7 +185,7 @@
|
|||
if (iblockdata2 == iblockdata) {
|
||||
if (iblockdata1 != iblockdata2) {
|
||||
this.setBlocksDirty(blockposition, iblockdata1, iblockdata2);
|
||||
@@ -247,12 +371,69 @@
|
||||
@@ -247,12 +372,69 @@
|
||||
|
||||
this.onBlockStateChange(blockposition, iblockdata1, iblockdata2);
|
||||
}
|
||||
|
@ -254,7 +255,7 @@
|
|||
public void onBlockStateChange(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {}
|
||||
|
||||
@Override
|
||||
@@ -338,6 +519,14 @@
|
||||
@@ -338,6 +520,14 @@
|
||||
|
||||
@Override
|
||||
public IBlockData getBlockState(BlockPosition blockposition) {
|
||||
|
@ -269,7 +270,7 @@
|
|||
if (this.isOutsideBuildHeight(blockposition)) {
|
||||
return Blocks.VOID_AIR.defaultBlockState();
|
||||
} else {
|
||||
@@ -543,6 +732,16 @@
|
||||
@@ -543,6 +733,16 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity getBlockEntity(BlockPosition blockposition) {
|
||||
|
@ -286,7 +287,7 @@
|
|||
return this.isOutsideBuildHeight(blockposition) ? null : (!this.isClientSide && Thread.currentThread() != this.thread ? null : this.getChunkAt(blockposition).getBlockEntity(blockposition, Chunk.EnumTileEntityState.IMMEDIATE));
|
||||
}
|
||||
|
||||
@@ -550,6 +749,12 @@
|
||||
@@ -550,6 +750,12 @@
|
||||
BlockPosition blockposition = tileentity.getBlockPos();
|
||||
|
||||
if (!this.isOutsideBuildHeight(blockposition)) {
|
||||
|
@ -299,7 +300,7 @@
|
|||
this.getChunkAt(blockposition).addAndRegisterBlockEntity(tileentity);
|
||||
}
|
||||
}
|
||||
@@ -680,7 +885,7 @@
|
||||
@@ -680,7 +886,7 @@
|
||||
|
||||
for (int k = 0; k < j; ++k) {
|
||||
EntityComplexPart entitycomplexpart = aentitycomplexpart[k];
|
||||
|
|
Loading…
Reference in a new issue