RoleFollowers will not despawn if they have an owner

RoleFollowers canDespawn field will be changed back to the value set by the player in the gui/api if they stop following a player
This commit is contained in:
1whohears committed 2022-05-26 03:00:49 -05:00
1 parent 6698e8619c
commit 77ee403720
4 files changed
+9 -2

No files matched your search

+5 -2
View File
@@ -27,6 +27,7 @@ public class DataStats {
public int spawnCycle = 0;
public boolean hideKilledBody = false;
public boolean canDespawn = false;
public boolean playerSetCanDespawn = false;
public Resistances resistances = new Resistances();
@@ -110,8 +111,9 @@ public class DataStats {
compound.setBoolean("CanDrown", canDrown);
compound.setBoolean("BurnInSun", burnInSun);
compound.setBoolean("NoFallDamage", noFallDamage);
compound.setBoolean("CanDespawn", canDespawn);
compound.setBoolean("AttackInvisible", attackInvisible);
compound.setBoolean("CanDespawn", canDespawn);
compound.setBoolean("PlayerSetCanDespawn", playerSetCanDespawn);
return compound;
}
@@ -169,8 +171,9 @@ public class DataStats {
canDrown = compound.getBoolean("CanDrown");
burnInSun = compound.getBoolean("BurnInSun");
noFallDamage = compound.getBoolean("NoFallDamage");
canDespawn = compound.getBoolean("CanDespawn");
attackInvisible = compound.getBoolean("AttackInvisible");
canDespawn = compound.getBoolean("CanDespawn");
playerSetCanDespawn = compound.getBoolean("PlayerSetCanDespawn");
npc.setImmuneToFire(immuneToFire);
}