summaryrefslogtreecommitdiffstats
path: root/nms-patches/PathfinderGoalBreakDoor.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/PathfinderGoalBreakDoor.patch')
-rw-r--r--nms-patches/PathfinderGoalBreakDoor.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/nms-patches/PathfinderGoalBreakDoor.patch b/nms-patches/PathfinderGoalBreakDoor.patch
new file mode 100644
index 00000000..c690fcf5
--- /dev/null
+++ b/nms-patches/PathfinderGoalBreakDoor.patch
@@ -0,0 +1,15 @@
+--- ../work/decompile-bb26c12b/net/minecraft/server/PathfinderGoalBreakDoor.java 2014-11-27 08:59:46.817421336 +1100
++++ src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java 2014-11-27 08:42:10.152850911 +1100
+@@ -63,6 +63,12 @@
+ }
+
+ if (this.g == 240 && this.a.world.getDifficulty() == EnumDifficulty.HARD) {
++ // CraftBukkit start
++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreakDoorEvent(this.a, this.b.getX(), this.b.getY(), this.b.getZ()).isCancelled()) {
++ this.c();
++ return;
++ }
++ // CraftBukkit end
+ this.a.world.setAir(this.b);
+ this.a.world.triggerEffect(1012, this.b, 0);
+ this.a.world.triggerEffect(2001, this.b, Block.getId(this.c));