completely annihilated animation caching (not worth it)

This commit is contained in:
luisc committed 2025-02-11 18:03:41 -06:00
1 parent 4d963b0205
commit e5673a85e7
7 files changed
+11 -83

No files matched your search

@@ -1,8 +1,6 @@
package noppes.npcs.controllers.data;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import kamkeel.npcs.network.PacketHandler;
import kamkeel.npcs.network.packets.data.UpdateAnimationsPacket;
import net.minecraft.entity.Entity;
@@ -14,7 +12,6 @@ import net.minecraft.util.AxisAlignedBB;
import noppes.npcs.CommonProxy;
import noppes.npcs.DataDisplay;
import noppes.npcs.EventHooks;
import noppes.npcs.Server;
import noppes.npcs.api.entity.IAnimatable;
import noppes.npcs.api.entity.IEntity;
import noppes.npcs.api.handler.data.IAnimation;
@@ -25,7 +22,6 @@ import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.scripted.NpcAPI;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -41,8 +37,6 @@ public class AnimationData implements IAnimationData {
public Animation currentClientAnimation;
private boolean isClientAnimating;
private final HashSet<Integer> cachedAnimationIDs = new HashSet<>();
//Client-side values
public int finishedTime = -1;
public int finishedFrame = -1;
@@ -182,22 +176,6 @@ public class AnimationData implements IAnimationData {
}
}
public boolean isCached(int id) {
return this.cachedAnimationIDs.contains(id);
}
public void cacheAnimation(int id) {
this.cachedAnimationIDs.add(id);
}
public void uncacheAnimation(int id) {
this.cachedAnimationIDs.remove(id);
}
public void clearCache() {
this.cachedAnimationIDs.clear();
}
public void viewAnimation(Animation animation, AnimationData animationData, NBTTagCompound animationNBT) {
this.viewAnimation(animation, animationData, animationNBT, animationData.allowAnimation, -1, -1);
}