Commits
26 26 | + itemstack.damage(1, entityhuman); |
27 27 | + return EnumInteractionResult.PASS; |
28 28 | + } |
29 29 | + |
30 30 | + CraftBlockState blockState = CraftBlockState.getBlockState(world, blockposition.getX(), blockposition.getY(), blockposition.getZ()); |
31 31 | + // CraftBukkit end |
32 32 | world.a(entityhuman, blockposition, SoundEffects.bw, SoundCategory.BLOCKS, 1.0F, ItemFlintAndSteel.i.nextFloat() * 0.4F + 0.8F); |
33 33 | world.setTypeAndData(blockposition, Blocks.FIRE.getBlockData(), 11); |
34 34 | + |
35 35 | + // CraftBukkit start |
36 - | + org.bukkit.event.block.BlockPlaceEvent placeEvent = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockState, clicked.getX(), clicked.getY(), clicked.getZ()); |
36 + | + org.bukkit.event.block.BlockPlaceEvent placeEvent = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, enumhand, blockState, clicked.getX(), clicked.getY(), clicked.getZ()); |
37 37 | + |
38 38 | + if (placeEvent.isCancelled() || !placeEvent.canBuild()) { |
39 39 | + placeEvent.getBlockPlaced().setTypeIdAndData(0, (byte) 0, false); |
40 40 | + return EnumInteractionResult.PASS; |
41 41 | + } |
42 42 | + // CraftBukkit end |
43 43 | } |
44 44 | |
45 45 | itemstack.damage(1, entityhuman); |