mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-12 18:01:07 +01:00
e886d8118e
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing
44 lines
1.9 KiB
Diff
44 lines
1.9 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/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
index 59bfb9c269aa95d66e7b9f107f6798f7f86fd245..2aaa6aa323e805423a8fd2bd32cc6a1e48edc817 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
@@ -79,10 +79,12 @@ public class EntityZombie extends EntityMonster {
|
|
return (Boolean) this.getDataWatcher().get(EntityZombie.DROWN_CONVERTING);
|
|
}
|
|
|
|
+ public boolean canBreakDoors() { return this.eU(); } // Paper - OBFHELPER
|
|
public boolean eU() {
|
|
return this.bs;
|
|
}
|
|
|
|
+ public void setCanBreakDoors(boolean canBreakDoors) { this.u(canBreakDoors); } // Paper - OBFHELPER
|
|
public void u(boolean flag) {
|
|
if (this.eK() && PathfinderGoalUtil.a(this)) {
|
|
if (this.bs != flag) {
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
|
|
index d334e656ea0f442a14864a05d4701df162487851..7fc71fad484502ad0e9c6c6f6b32aaaf7599a6dd 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
|
|
@@ -129,6 +129,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
|