@@ -18,7 +18,7 @@
|
||||
@@ -397,9 +403,23 @@
|
||||
Integer integer = (Integer) iblockdata.get(BlockCarrots.AGE);
|
||||
|
||||
if (integer.intValue() == 0) {
|
||||
if (integer == 0) {
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.f, blockposition, Blocks.AIR.getBlockData()).isCancelled()) {
|
||||
+ return;
|
||||
@@ -31,11 +31,11 @@
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(
|
||||
+ this.f,
|
||||
+ blockposition,
|
||||
+ iblockdata.set(BlockCarrots.AGE, Integer.valueOf(integer.intValue() - 1))
|
||||
+ iblockdata.set(BlockCarrots.AGE, integer - 1)
|
||||
+ ).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCarrots.AGE, Integer.valueOf(integer.intValue() - 1)), 2);
|
||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCarrots.AGE, integer - 1), 2);
|
||||
world.triggerEffect(2001, blockposition, Block.getCombinedId(iblockdata));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user