summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityRabbit.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntityRabbit.patch')
-rw-r--r--nms-patches/EntityRabbit.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/nms-patches/EntityRabbit.patch b/nms-patches/EntityRabbit.patch
index 91309d3b..131620cc 100644
--- a/nms-patches/EntityRabbit.patch
+++ b/nms-patches/EntityRabbit.patch
@@ -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));
}