3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00
Paper/nms-patches/PathfinderGoalBreakDoor.patch

16 Zeilen
727 B
Diff

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/PathfinderGoalBreakDoor.java
+++ b/net/minecraft/server/PathfinderGoalBreakDoor.java
2018-07-15 02:00:00 +02:00
@@ -44,6 +44,12 @@
}
2018-07-15 02:00:00 +02:00
if (this.d == 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);
2016-02-29 22:32:46 +01:00
this.a.world.triggerEffect(1021, this.b, 0);
2018-07-15 02:00:00 +02:00
this.a.world.triggerEffect(2001, this.b, Block.getCombinedId(this.a.world.getType(this.b)));