Fixed players still burning on respawn

This commit is contained in:
Sollace 2019-02-23 16:26:43 +02:00
parent 5502084b18
commit 5e5be1bf4e

View file

@ -142,6 +142,7 @@ public class SpellDisguise extends AbstractSpell implements IAttachedEffect, ISu
entity.setCustomNameTag(source.getOwner().getName()); entity.setCustomNameTag(source.getOwner().getName());
((EntityPlayer)entity).readFromNBT(nbt.getCompoundTag("playerNbt")); ((EntityPlayer)entity).readFromNBT(nbt.getCompoundTag("playerNbt"));
entity.setUniqueId(UUID.randomUUID()); entity.setUniqueId(UUID.randomUUID());
entity.extinguish();
PlayerSpeciesList.instance().getPlayer((EntityPlayer)entity).setEffect(null); PlayerSpeciesList.instance().getPlayer((EntityPlayer)entity).setEffect(null);
@ -164,6 +165,7 @@ public class SpellDisguise extends AbstractSpell implements IAttachedEffect, ISu
)), source)).start(); )), source)).start();
} else { } else {
entity = EntityList.createEntityFromNBT(nbt, source.getWorld()); entity = EntityList.createEntityFromNBT(nbt, source.getWorld());
entity.extinguish();
} }
onEntityLoaded(source); onEntityLoaded(source);
@ -183,6 +185,7 @@ public class SpellDisguise extends AbstractSpell implements IAttachedEffect, ISu
protected void copyBaseAttributes(EntityLivingBase from, Entity to) { protected void copyBaseAttributes(EntityLivingBase from, Entity to) {
// Set first because position calculations rely on it // Set first because position calculations rely on it
to.isDead = from.isDead;
to.onGround = from.onGround; to.onGround = from.onGround;
if (isAttachedEntity(entity)) { if (isAttachedEntity(entity)) {
@ -264,7 +267,7 @@ public class SpellDisguise extends AbstractSpell implements IAttachedEffect, ISu
((EntityTameable)to).setSitting(from.isSneaking()); ((EntityTameable)to).setSitting(from.isSneaking());
} }
if (from instanceof EntityPlayer && ((EntityPlayer)from).isCreative()) { if (from.ticksExisted < 100 || from instanceof EntityPlayer && ((EntityPlayer)from).isCreative()) {
to.extinguish(); to.extinguish();
} }