Fix Zombie ShouldBurnInDay API (#4268)

This commit is contained in:
Joshua Dean Küpper 2020-09-01 22:25:06 +02:00 committed by MiniDigger
parent ef5af6f604
commit 507f302cd2

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add more Zombie API
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 12f954723ac2f0058081d810ce83aed99532caad..02a845f99bb445fb4aa66a90273469a848195747 100644 index 12f954723ac2f0058081d810ce83aed99532caad..2c0246fe39e3a0f513d6be8d270b76a0016935f4 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java --- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -33,6 +33,7 @@ public class EntityZombie extends EntityMonster { @@ -33,6 +33,7 @@ public class EntityZombie extends EntityMonster {
@ -29,24 +29,24 @@ index 12f954723ac2f0058081d810ce83aed99532caad..02a845f99bb445fb4aa66a90273469a8
public void startDrownedConversion(int i) { public void startDrownedConversion(int i) {
this.lastTick = MinecraftServer.currentTick; // CraftBukkit this.lastTick = MinecraftServer.currentTick; // CraftBukkit
this.drownedConversionTime = i; this.drownedConversionTime = i;
@@ -226,10 +233,17 @@ public class EntityZombie extends EntityMonster { @@ -226,9 +233,16 @@ public class EntityZombie extends EntityMonster {
} }
+ public boolean shouldBurnInDay() { return T_(); } // Paper - OBFHELPER + public boolean shouldBurnInDay() { return T_(); } // Paper - OBFHELPER
protected boolean T_() { protected boolean T_() {
return true; - return true;
} + return this.shouldBurnInDay; // Paper - use api value instead
+ }
+
+ // Paper start + // Paper start
+ public void setShouldBurnInDay(boolean shouldBurnInDay) { + public void setShouldBurnInDay(boolean shouldBurnInDay) {
+ this.shouldBurnInDay = shouldBurnInDay; + this.shouldBurnInDay = shouldBurnInDay;
+ } }
+ // Paper end + // Paper end
+
@Override @Override
public boolean damageEntity(DamageSource damagesource, float f) { public boolean damageEntity(DamageSource damagesource, float f) {
if (!super.damageEntity(damagesource, f)) {
@@ -349,6 +363,7 @@ public class EntityZombie extends EntityMonster { @@ -349,6 +363,7 @@ public class EntityZombie extends EntityMonster {
nbttagcompound.setBoolean("CanBreakDoors", this.eU()); nbttagcompound.setBoolean("CanBreakDoors", this.eU());
nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bt : -1); nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bt : -1);