mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 07:22:20 +00:00
Revert "Animations now continue where they should be when players rejoin a world/server."
This reverts commit a5ed14183e.
This commit is contained in:
1 parent
a5ed14183e
commit
fd4a6d0a2c
7 files changed
+34
-117
No files matched your search
@@ -57,6 +57,7 @@ public class ClientCacheHandler {
|
||||
ClientCacheHandler.skinOverlays.clear();
|
||||
ClientCacheHandler.playerAnimations.clear();
|
||||
ClientCacheHandler.playerData.animationData.clearCache();
|
||||
CommonProxy.clientPlayingAnimations.clear();
|
||||
}
|
||||
|
||||
public static void clearSkinCache() {
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ClientTickHandler{
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void onClientTick(TickEvent.ClientTickEvent event){
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
if (mc.theWorld != null && this.prevWorld != mc.theWorld) {
|
||||
if ((this.prevWorld == null || mc.theWorld == null) && this.prevWorld != mc.theWorld) {
|
||||
ClientCacheHandler.clearCache();
|
||||
this.prevWorld = mc.theWorld;
|
||||
}
|
||||
|
||||
@@ -375,13 +375,8 @@ public class PacketHandlerClient extends PacketHandlerServer{
|
||||
}
|
||||
|
||||
animationData.setAnimation(ClientCacheHandler.animationCache.get(animationId));
|
||||
animationData.viewReadFromNBT(compound);
|
||||
|
||||
if (compound.hasKey("Frame")) {
|
||||
animationData.animation.readFromNBT(compound.getCompoundTag("Animation"));
|
||||
} else if (compound.hasKey("Animation")) {
|
||||
Client.sendData(EnumPacketServer.CacheAnimation, animationId);
|
||||
}
|
||||
animationData.readFromNBT(compound);
|
||||
Client.sendData(EnumPacketServer.CacheAnimation, animationId);
|
||||
}
|
||||
}
|
||||
else if(type == EnumPacketClient.DISABLE_MOUSE_INPUT) {
|
||||
|
||||
Reference in new issue
Block a user