Paper/Spigot-Server-Patches/0633-Zombie-API-breaking-doors.patch
Josh Roy b31089a929
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5325)
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

Bukkit Changes:
d264e972 #591: Add option for a consumer before spawning an item
1c537fce #590: Add spawn and transform reasons for piglin zombification.

CraftBukkit Changes:
ee5006d1 #810: Add option for a consumer before spawning an item
f6a39d3c #809: Add spawn and transform reasons for piglin zombification.
0c24068a Organise imports

Spigot Changes:
bff52619 Organise imports
2021-03-08 15:12:31 -08:00

45 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 3e0b12fef4e0aa5bf8a9b905b829e2a305a53d12..88ccf77e0e124f64391f415a6e26d1187fade59e 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -78,10 +78,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