Refactor processBlockPlace logic. Fixes BUKKIT-3406 and BUKKIT-3454
The previous logic was faulty since it lost the logic of "placing" the block. It was also taking into account data that could have been changed outside of the processing of this event, which is irrelevant to the processing of this event.
This commit is contained in:
@@ -429,8 +429,8 @@ public class Chunk {
|
||||
|
||||
if (l != 0) {
|
||||
if (!this.world.isStatic) {
|
||||
// CraftBukkit start - Don't extend piston until data is set
|
||||
if (!(Block.byId[l] instanceof BlockPiston) || i2 != 0) {
|
||||
// CraftBukkit start - Don't extend piston until data is set, don't "place" if we're processing the event
|
||||
if (!this.world.suppressPhysics && (!(Block.byId[l] instanceof BlockPiston) || i2 != 0)) {
|
||||
Block.byId[l].onPlace(this.world, j2, j, k2);
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
Reference in New Issue
Block a user