2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/PathfinderGoalBreakDoor.java
|
|
|
|
+++ b/net/minecraft/server/PathfinderGoalBreakDoor.java
|
2019-04-23 04:00:00 +02:00
|
|
|
@@ -66,6 +66,12 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
if (this.a == this.f() && this.a(this.entity.world.getDifficulty())) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // CraftBukkit start
|
2019-04-23 04:00:00 +02:00
|
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreakDoorEvent(this.entity, this.door).isCancelled()) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ this.c();
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
2019-04-23 04:00:00 +02:00
|
|
|
this.entity.world.a(this.door, false);
|
|
|
|
this.entity.world.triggerEffect(1021, this.door, 0);
|
|
|
|
this.entity.world.triggerEffect(2001, this.door, Block.getCombinedId(this.entity.world.getType(this.door)));
|