mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Fix Zombie ShouldBurnInDay API (#4268)
This commit is contained in:
parent
ef5af6f604
commit
507f302cd2
1 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
index 12f954723ac2f0058081d810ce83aed99532caad..02a845f99bb445fb4aa66a90273469a848195747 100644
|
||||
index 12f954723ac2f0058081d810ce83aed99532caad..2c0246fe39e3a0f513d6be8d270b76a0016935f4 100644
|
||||
--- a/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 {
|
||||
|
@ -29,24 +29,24 @@ index 12f954723ac2f0058081d810ce83aed99532caad..02a845f99bb445fb4aa66a90273469a8
|
|||
public void startDrownedConversion(int i) {
|
||||
this.lastTick = MinecraftServer.currentTick; // CraftBukkit
|
||||
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
|
||||
protected boolean T_() {
|
||||
return true;
|
||||
}
|
||||
|
||||
- return true;
|
||||
+ return this.shouldBurnInDay; // Paper - use api value instead
|
||||
+ }
|
||||
+
|
||||
+ // Paper start
|
||||
+ public void setShouldBurnInDay(boolean shouldBurnInDay) {
|
||||
+ this.shouldBurnInDay = shouldBurnInDay;
|
||||
+ }
|
||||
}
|
||||
+ // Paper end
|
||||
+
|
||||
|
||||
@Override
|
||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||
if (!super.damageEntity(damagesource, f)) {
|
||||
@@ -349,6 +363,7 @@ public class EntityZombie extends EntityMonster {
|
||||
nbttagcompound.setBoolean("CanBreakDoors", this.eU());
|
||||
nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bt : -1);
|
||||
|
|
Loading…
Reference in a new issue