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

16 Zeilen
806 B
Diff

2015-02-26 23:41:06 +01:00
--- /home/matt/mc-dev-private//net/minecraft/server/PathfinderGoalBreakDoor.java 2015-02-26 22:40:22.931608136 +0000
+++ src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java 2015-02-26 22:40:22.931608136 +0000
@@ -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));