mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
Send block updates even when applyPhysics is false. Fixes BUKKIT-3971
The CraftBlock class is setting bit 0x4 of the update flag when bit 0x2 should in fact be set here. Bit 0x2 means "do updates"; bit 0x4 means "don't do updates if the world is static, even when bit 0x2 is set".
This commit is contained in:
parent
4e7ad05111
commit
28fb514a4d
1 changed files with 3 additions and 3 deletions
|
@ -92,7 +92,7 @@ public class CraftBlock implements Block {
|
||||||
if (applyPhysics) {
|
if (applyPhysics) {
|
||||||
chunk.getHandle().world.setData(x, y, z, data, 3);
|
chunk.getHandle().world.setData(x, y, z, data, 3);
|
||||||
} else {
|
} else {
|
||||||
chunk.getHandle().world.setData(x, y, z, data, 4);
|
chunk.getHandle().world.setData(x, y, z, data, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ public class CraftBlock implements Block {
|
||||||
if (applyPhysics) {
|
if (applyPhysics) {
|
||||||
return setTypeId(type);
|
return setTypeId(type);
|
||||||
} else {
|
} else {
|
||||||
return chunk.getHandle().world.setTypeIdAndData(x, y, z, type, getData(), 4);
|
return chunk.getHandle().world.setTypeIdAndData(x, y, z, type, getData(), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ public class CraftBlock implements Block {
|
||||||
if (applyPhysics) {
|
if (applyPhysics) {
|
||||||
return chunk.getHandle().world.setTypeIdAndData(x, y, z, type, data, 3);
|
return chunk.getHandle().world.setTypeIdAndData(x, y, z, type, data, 3);
|
||||||
} else {
|
} else {
|
||||||
boolean success = chunk.getHandle().world.setTypeIdAndData(x, y, z, type, data, 4);
|
boolean success = chunk.getHandle().world.setTypeIdAndData(x, y, z, type, data, 2);
|
||||||
if (success) {
|
if (success) {
|
||||||
chunk.getHandle().world.notify(x, y, z);
|
chunk.getHandle().world.notify(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue