Commits
Brokkonaut authored and md_5 committed 3ec79a27d4f
52 52 | } else { |
53 53 | - this.placeDeadFlower(worldserver, blockposition); |
54 54 | + // CraftBukkit - add event |
55 55 | + if (CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, this.defaultBlockState().setValue(BlockChorusFlower.AGE, Integer.valueOf(5)), 2)) { |
56 56 | + this.placeDeadFlower(worldserver, blockposition); |
57 57 | + } |
58 58 | + // CraftBukkit end |
59 59 | } |
60 60 | |
61 61 | } |
62 + | |
63 + | BlockPosition blockposition = movingobjectpositionblock.getBlockPos(); |
64 + | |
65 + | if (!world.isClientSide && iprojectile.mayInteract(world, blockposition) && iprojectile.getType().is(TagsEntity.IMPACT_PROJECTILES)) { |
66 + | + // CraftBukkit start |
67 + | + if (CraftEventFactory.callEntityChangeBlockEvent(iprojectile, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) { |
68 + | + return; |
69 + | + } |
70 + | + // CraftBukkit end |
71 + | world.destroyBlock(blockposition, true, iprojectile); |
72 + | } |
73 + |