mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 19:46:42 +01:00
Fixed players still burning on respawn
This commit is contained in:
parent
5502084b18
commit
5e5be1bf4e
1 changed files with 4 additions and 1 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue