diff options
12 files changed, 29 insertions, 25 deletions
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java index ba2feafd..01c06af2 100644 --- a/src/main/java/net/minecraft/server/ItemBlock.java +++ b/src/main/java/net/minecraft/server/ItemBlock.java @@ -80,11 +80,11 @@ public class ItemBlock extends Item { org.bukkit.block.BlockState blockstate = org.bukkit.craftbukkit.block.CraftBlockState.getBlockState(world, x, y, z); world.callingPlaceEvent = true; - world.setTypeIdAndData(x, y, z, id, data, 3); + world.setTypeIdAndData(x, y, z, id, data, 2); org.bukkit.event.block.BlockPlaceEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockstate, clickedX, clickedY, clickedZ); if (event.isCancelled() || !event.canBuild()) { - blockstate.update(true); + blockstate.update(true, false); world.callingPlaceEvent = false; return false; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java index c39857ec..178f7eb0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java @@ -24,8 +24,8 @@ public class CraftBeacon extends CraftBlockState implements Beacon { } @Override - public boolean update(boolean force) { - boolean result = super.update(force); + public boolean update(boolean force, boolean applyPhysics) { + boolean result = super.update(force, applyPhysics); if (result) { beacon.update(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java index d2350452..2072db28 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java @@ -113,17 +113,21 @@ public class CraftBlockState implements BlockState { } public boolean update(boolean force) { + return update(force, true); + } + + public boolean update(boolean force, boolean applyPhysics) { Block block = getBlock(); - if (block.getType() != this.getType()) { + if (block.getType() != getType()) { if (force) { - block.setTypeId(this.getTypeId()); + block.setTypeId(getTypeId(), applyPhysics); } else { return false; } } - block.setData(getRawData()); + block.setData(getRawData(), applyPhysics); world.getHandle().notify(x, y, z); return true; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java index 074473cd..d306c3af 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java @@ -21,8 +21,8 @@ public class CraftBrewingStand extends CraftBlockState implements BrewingStand { } @Override - public boolean update(boolean force) { - boolean result = super.update(force); + public boolean update(boolean force, boolean applyPhysics) { + boolean result = super.update(force, applyPhysics); if (result) { brewingStand.update(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java index 60dea439..6ae2b303 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java @@ -61,8 +61,8 @@ public class CraftChest extends CraftBlockState implements Chest { } @Override - public boolean update(boolean force) { - boolean result = super.update(force); + public boolean update(boolean force, boolean applyPhysics) { + boolean result = super.update(force, applyPhysics); if (result) { chest.update(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java index 4572438d..c68e27ca 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java @@ -35,8 +35,8 @@ public class CraftCommandBlock extends CraftBlockState implements CommandBlock { this.name = name != null ? name : "@";
}
- public boolean update(boolean forced) {
- boolean result = super.update(forced);
+ public boolean update(boolean force, boolean applyPhysics) {
+ boolean result = super.update(force, applyPhysics);
if (result) {
commandBlock.b(command);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java index 9561ea9b..183ec43a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java @@ -39,8 +39,8 @@ public class CraftDispenser extends CraftBlockState implements Dispenser { } @Override - public boolean update(boolean force) { - boolean result = super.update(force); + public boolean update(boolean force, boolean applyPhysics) { + boolean result = super.update(force, applyPhysics); if (result) { dispenser.update(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java index 85b9af64..67da9323 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java @@ -36,8 +36,8 @@ public class CraftDropper extends CraftBlockState implements Dropper { } @Override - public boolean update(boolean force) { - boolean result = super.update(force); + public boolean update(boolean force, boolean applyPhysics) { + boolean result = super.update(force, applyPhysics); if (result) { dropper.update(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java index d50604d9..8c548f13 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java @@ -21,8 +21,8 @@ public class CraftFurnace extends CraftBlockState implements Furnace { } @Override - public boolean update(boolean force) { - boolean result = super.update(force); + public boolean update(boolean force, boolean applyPhysics) { + boolean result = super.update(force, applyPhysics); if (result) { furnace.update(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java b/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java index 787b609f..a46c472b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java @@ -21,8 +21,8 @@ public class CraftHopper extends CraftBlockState implements Hopper { } @Override - public boolean update(boolean force) { - boolean result = super.update(force); + public boolean update(boolean force, boolean applyPhysics) { + boolean result = super.update(force, applyPhysics); if (result) { hopper.update(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java index 8e8a1c58..16471009 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java @@ -31,8 +31,8 @@ public class CraftSign extends CraftBlockState implements Sign { } @Override - public boolean update(boolean force) { - boolean result = super.update(force); + public boolean update(boolean force, boolean applyPhysics) { + boolean result = super.update(force, applyPhysics); if (result) { for(int i = 0; i < 4; i++) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java index 0f3e0d8f..4e121a3d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java @@ -181,8 +181,8 @@ public class CraftSkull extends CraftBlockState implements Skull { } @Override - public boolean update(boolean force) { - boolean result = super.update(force); + public boolean update(boolean force, boolean applyPhysics) { + boolean result = super.update(force, applyPhysics); if (result) { skull.setSkullType(getSkullType(skullType), player); |