mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 09:41:29 +01:00
Fix tree related crashes due to lazy BlockState updating
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
parent
4955ab3981
commit
503f116feb
@ -140,14 +140,12 @@ public class CraftBlockState implements BlockState {
|
||||
Block block = getBlock();
|
||||
|
||||
if (block.getType() != getType()) {
|
||||
if (force) {
|
||||
block.setTypeId(getTypeId(), applyPhysics);
|
||||
} else {
|
||||
if (!force) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
block.setData(getRawData(), applyPhysics);
|
||||
block.setTypeIdAndData(getTypeId(), getRawData(), applyPhysics);
|
||||
world.getHandle().notify(new BlockPosition(x, y, z));
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user