SPIGOT-7382: Player still on fire after respawn

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2023-06-11 17:30:03 +10:00
parent c49031bc5d
commit a7ce4d1a3f
3 changed files with 12 additions and 3 deletions

View file

@ -1090,7 +1090,7 @@
+ +
+ this.setHealth(this.getMaxHealth()); + this.setHealth(this.getMaxHealth());
+ this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset + this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset
+ this.remainingFireTicks = 0; + this.setRemainingFireTicks(0);
+ this.fallDistance = 0; + this.fallDistance = 0;
+ this.foodData = new FoodMetaData(this); + this.foodData = new FoodMetaData(this);
+ this.experienceLevel = this.newLevel; + this.experienceLevel = this.newLevel;

View file

@ -67,6 +67,15 @@
private static final Logger LOGGER = LogUtils.getLogger(); private static final Logger LOGGER = LogUtils.getLogger();
public static final String ID_TAG = "id"; public static final String ID_TAG = "id";
public static final String PASSENGERS_TAG = "Passengers"; public static final String PASSENGERS_TAG = "Passengers";
@@ -190,7 +248,7 @@
public boolean noPhysics;
protected final RandomSource random;
public int tickCount;
- public int remainingFireTicks;
+ private int remainingFireTicks;
public boolean wasTouchingWater;
protected Object2DoubleMap<TagKey<FluidType>> fluidHeight;
protected boolean wasEyeInWater;
@@ -240,6 +298,25 @@ @@ -240,6 +298,25 @@
public boolean hasVisualFire; public boolean hasVisualFire;
@Nullable @Nullable

View file

@ -580,7 +580,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@Override @Override
public int getFireTicks() { public int getFireTicks() {
return entity.remainingFireTicks; return entity.getRemainingFireTicks();
} }
@Override @Override
@ -590,7 +590,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@Override @Override
public void setFireTicks(int ticks) { public void setFireTicks(int ticks) {
entity.remainingFireTicks = ticks; entity.setRemainingFireTicks(ticks);
} }
@Override @Override