Client-side cache is now cleared when leaving or joining worlds

This commit is contained in:
Luis C.M committed 2023-06-05 18:50:41 -05:00
1 parent 54b46129a9
commit 6470c8317b
9 files changed
+56 -43

No files matched your search

@@ -1,13 +1,12 @@
package noppes.npcs.mixin;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import noppes.npcs.AnimationData;
import noppes.npcs.client.Client;
import noppes.npcs.client.ClientCacheHandler;
import noppes.npcs.client.ClientEventHandler;
import noppes.npcs.constants.EnumAnimationPart;
import noppes.npcs.controllers.data.Frame;
@@ -110,8 +109,8 @@ public abstract class MixinModelRenderer {
if (ClientEventHandler.renderingPlayer != null) {
ClientEventHandler.playerModel = ((ModelRenderer) (Object) this).baseModel;
}
if (ClientEventHandler.renderingPlayer != null && Client.playerAnimations.containsKey(ClientEventHandler.renderingPlayer.getUniqueID())) {
animData = Client.playerAnimations.get(ClientEventHandler.renderingPlayer.getUniqueID());
if (ClientEventHandler.renderingPlayer != null && ClientCacheHandler.playerAnimations.containsKey(ClientEventHandler.renderingPlayer.getUniqueID())) {
animData = ClientCacheHandler.playerAnimations.get(ClientEventHandler.renderingPlayer.getUniqueID());
EnumAnimationPart mainPartType = null;
try{