Made animation thread exceptions print stack traces. Might remove before release, since this has the potential to spam up server/client consoles.

This commit is contained in:
luisc committed 2024-04-02 16:37:01 -05:00
1 parent 064c4123d6
commit f117e32fec
2 files changed
+5 -3

No files matched your search

+4 -2
View File
@@ -60,7 +60,8 @@ public class CommonProxy implements IGuiHandler {
synchronized (serverPlayingAnimations) {
serverPlayingAnimations.removeIf(CommonProxy.this::removeAnimation);
}
} catch (Exception ignored) {
} catch (Exception e) {
e.printStackTrace();
}
}
}});
@@ -100,7 +101,8 @@ public class CommonProxy implements IGuiHandler {
if (entity.worldObj != null && entity.worldObj.isRemote) {
return animation.parent.animation != animation || clientRemoveAnimation(entity);
} else {
return animation.parent.animation != animation && animation.parent.currentClientAnimation != animation
return !animation.parent.isClientAnimating()
|| animation.parent.animation != animation && animation.parent.currentClientAnimation != animation
|| entity.worldObj == null || !entity.worldObj.loadedEntityList.contains(entity)
|| CustomNpcs.getServer().isServerStopped();
}
@@ -98,7 +98,7 @@ public class PlayerDataScript implements INpcScriptHandler {
}
public boolean isClient() {
return FMLCommonHandler.instance().getEffectiveSide().isClient();
return false;
}
public boolean getEnabled() {
return ScriptController.Instance.playerScripts.enabled;