mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 13:04:46 +00:00
Animation fixes, temporarily removed caching.
This commit is contained in:
1 parent
572077b7e5
commit
34d002191e
3 files changed
+28
-24
No files matched your search
@@ -120,12 +120,9 @@ public class AnimationData implements IAnimationData {
|
||||
|
||||
entities.removeIf(player -> Arrays.stream(excludedPlayers).anyMatch(exp -> player == exp));
|
||||
|
||||
NBTTagCompound animationNBT = null;
|
||||
for (EntityPlayer player : entities) {
|
||||
AnimationData animationData = PlayerDataController.Instance.getPlayerData(player).animationData;
|
||||
if (animationNBT == null && this.animation != null && !animationData.isCached(this.animation.getID())) {
|
||||
animationNBT = this.animation.writeToNBT();
|
||||
}
|
||||
NBTTagCompound animationNBT = this.animation != null ? this.animation.writeToNBT() : null;
|
||||
animationData.viewAnimation(this.animation, this, animationNBT);
|
||||
}
|
||||
}
|
||||
@@ -221,12 +218,8 @@ public class AnimationData implements IAnimationData {
|
||||
data.setInteger("Time", time);
|
||||
}
|
||||
|
||||
if (animation != null) {
|
||||
if (this.cachedAnimationIDs.contains(animation.getID()) && !data.hasKey("Frame")) {
|
||||
data.setInteger("AnimationID", animation.getID());
|
||||
} else {
|
||||
data.setTag("Animation", animationNBT);
|
||||
}
|
||||
if (animationNBT != null) {
|
||||
data.setTag("Animation", animationNBT);
|
||||
}
|
||||
|
||||
IAnimatable animatable = animationData.getEntity();
|
||||
|
||||
Reference in new issue
Block a user