geforkt von Mirrors/Paper
45 Zeilen
2.0 KiB
Diff
45 Zeilen
2.0 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||
|
Date: Wed, 18 Nov 2020 11:32:46 -0800
|
||
|
Subject: [PATCH] Zombie API - breaking doors
|
||
|
|
||
|
|
||
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||
|
index 4105c1763d25824aac35d305a793823c1604eee8..77634a1e8e7539000f7db0b96f4548137af1a819 100644
|
||
|
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||
|
@@ -137,10 +137,12 @@ public class Zombie extends Monster {
|
||
|
return (Boolean) this.getEntityData().get(Zombie.DATA_DROWNED_CONVERSION_ID);
|
||
|
}
|
||
|
|
||
|
+ public boolean canBreakDoors() { return this.canBreakDoors(); } // Paper - OBFHELPER
|
||
|
public boolean canBreakDoors() {
|
||
|
return this.canBreakDoors;
|
||
|
}
|
||
|
|
||
|
+ public void setCanBreakDoors(boolean canBreakDoors) { this.setCanBreakDoors(canBreakDoors); } // Paper - OBFHELPER
|
||
|
public void setCanBreakDoors(boolean canBreakDoors) {
|
||
|
if (this.supportsBreakDoorGoal() && GoalUtils.hasGroundPathNavigation(this)) {
|
||
|
if (this.canBreakDoors != canBreakDoors) {
|
||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
|
||
|
index 86f65c07806a118c49e900c59be86c2bd2eb124c..44f21b3b1c2f2fbc1f3f53931349b9a9426e97f8 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
|
||
|
@@ -128,6 +128,16 @@ public class CraftZombie extends CraftMonster implements Zombie {
|
||
|
public void setShouldBurnInDay(boolean shouldBurnInDay) {
|
||
|
getHandle().setShouldBurnInDay(shouldBurnInDay);
|
||
|
}
|
||
|
+
|
||
|
+ @Override
|
||
|
+ public boolean canBreakDoors() {
|
||
|
+ return getHandle().canBreakDoors();
|
||
|
+ }
|
||
|
+
|
||
|
+ @Override
|
||
|
+ public void setCanBreakDoors(boolean canBreakDoors) {
|
||
|
+ getHandle().setCanBreakDoors(canBreakDoors);
|
||
|
+ }
|
||
|
// Paper end
|
||
|
|
||
|
@Override
|