mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-21 05:44:33 +00:00
Fixed doors not updating their state to reflect any redstone currents when placed.
This commit is contained in:
parent
b530299759
commit
25f72c9caa
2 changed files with 3 additions and 2 deletions
|
@ -154,6 +154,7 @@ public class BlockTrapdoor extends Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
world.setData(i, j, k, b0);
|
world.setData(i, j, k, b0);
|
||||||
|
doPhysics(world, i, j, k, Block.REDSTONE_WIRE.id); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canPlace(World world, int i, int j, int k, int l) {
|
public boolean canPlace(World world, int i, int j, int k, int l) {
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class ItemDoor extends Item {
|
||||||
|
|
||||||
// CraftBukkit start - bed
|
// CraftBukkit start - bed
|
||||||
world.suppressPhysics = false;
|
world.suppressPhysics = false;
|
||||||
world.applyPhysics(i, j, k, block.id);
|
world.applyPhysics(i, j, k, Block.REDSTONE_WIRE.id);
|
||||||
BlockPlaceEvent event = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockState, clickedX, clickedY, clickedZ, block);
|
BlockPlaceEvent event = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockState, clickedX, clickedY, clickedZ, block);
|
||||||
|
|
||||||
if (event.isCancelled() || !event.canBuild()) {
|
if (event.isCancelled() || !event.canBuild()) {
|
||||||
|
@ -91,7 +91,7 @@ public class ItemDoor extends Item {
|
||||||
world.setTypeIdAndData(i, j + 1, k, block.id, i1 + 8);
|
world.setTypeIdAndData(i, j + 1, k, block.id, i1 + 8);
|
||||||
world.suppressPhysics = false;
|
world.suppressPhysics = false;
|
||||||
// world.applyPhysics(i, j, k, block.id); // CraftBukkit - moved up
|
// world.applyPhysics(i, j, k, block.id); // CraftBukkit - moved up
|
||||||
world.applyPhysics(i, j + 1, k, block.id);
|
world.applyPhysics(i, j + 1, k, Block.REDSTONE_WIRE.id);
|
||||||
--itemstack.count;
|
--itemstack.count;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue