mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-08 06:26:43 +01:00
Fixed animations and burning states on disguised changelings
This commit is contained in:
parent
40e9a9d2f3
commit
161f61b138
1 changed files with 11 additions and 6 deletions
|
@ -11,6 +11,7 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.passive.EntityChicken;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -78,7 +79,8 @@ public class SpellDisguise extends AbstractSpell {
|
|||
}
|
||||
|
||||
if (entity != null) {
|
||||
|
||||
entity.onGround = owner.onGround;
|
||||
entity.onUpdate();
|
||||
|
||||
if (entity instanceof EntityLiving) {
|
||||
EntityLiving l = (EntityLiving)entity;
|
||||
|
@ -99,14 +101,11 @@ public class SpellDisguise extends AbstractSpell {
|
|||
l.swingProgressInt = owner.swingProgressInt;
|
||||
l.isSwingInProgress = owner.isSwingInProgress;
|
||||
|
||||
l.hurtTime = owner.hurtTime;
|
||||
|
||||
for (EntityEquipmentSlot i : EntityEquipmentSlot.values()) {
|
||||
l.setItemStackToSlot(i, owner.getItemStackFromSlot(i));
|
||||
}
|
||||
|
||||
if (l.world.rand.nextInt(1000) < l.livingSoundTime++) {
|
||||
l.playLivingSound();
|
||||
l.livingSoundTime = -l.getTalkInterval();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -129,6 +128,12 @@ public class SpellDisguise extends AbstractSpell {
|
|||
entity.distanceWalkedModified = owner.distanceWalkedModified;
|
||||
entity.prevDistanceWalkedModified = owner.prevDistanceWalkedModified;
|
||||
|
||||
if (owner.isBurning()) {
|
||||
entity.setFire(1);
|
||||
} else {
|
||||
entity.extinguish();
|
||||
}
|
||||
|
||||
entity.updateBlocked = true;
|
||||
|
||||
owner.height = entity.height;
|
||||
|
|
Loading…
Reference in a new issue