PaperMC/patches/server-remapped/Zombie-API-breaking-doors.patch
MiniDigger | Martin 95d25d98e8 Move patches around
2021-06-11 14:02:28 +02:00

44 lines
2 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
@@ -0,0 +0,0 @@ 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