Fixed animation data not working on players.

This commit is contained in:
luisc committed 2024-04-02 15:32:55 -05:00
1 parent d2a189ac3a
commit e51198bab8
1 file changed
+5 -5
@@ -45,11 +45,7 @@ public class AnimationData implements IAnimationData {
public AnimationData(Object parent){
this.parent = parent;
if (parent instanceof DataDisplay) {
this.animationEntity = ((DataDisplay) parent).npc;
} else if (parent instanceof EntityPlayer) {
this.animationEntity = (EntityLivingBase) parent;
}
this.animationEntity = this.getMCEntity();
}
public static AnimationData getData(Entity entity) {
@@ -71,6 +67,10 @@ public class AnimationData implements IAnimationData {
}
public EntityLivingBase getMCEntity() {
if (this.animationEntity != null) {
return this.animationEntity;
}
if (this.parent instanceof DataDisplay) {
return ((DataDisplay) this.parent).npc;
} else {