Made steps fire a BlockPlace event. Fixes BUKKIT-394

This commit is contained in:
Tahg
2012-02-08 21:26:49 -05:00
committed by EvilSeph
parent 6abd178ea7
commit 10ab7b96ed
2 changed files with 13 additions and 21 deletions

View File

@@ -36,12 +36,15 @@ public class ItemStep extends ItemBlock {
int j1 = world.getData(i, j, k);
if (l == 1 && i1 == Block.STEP.id && j1 == itemstack.getData()) {
// CraftBukkit start - handle this in super
/*
if (world.setTypeIdAndData(i, j, k, Block.DOUBLE_STEP.id, j1)) {
world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), Block.DOUBLE_STEP.stepSound.getName(), (Block.DOUBLE_STEP.stepSound.getVolume1() + 1.0F) / 2.0F, Block.DOUBLE_STEP.stepSound.getVolume2() * 0.8F);
--itemstack.count;
}
return true;
*/
return super.a(itemstack, entityhuman, world, i, j, k, -1);
// CraftBukkit end
} else {
return super.a(itemstack, entityhuman, world, i, j, k, l);
}