
Calling `player.difficulty` on `#sideonly client` causing crash loop (game freeze)
Krutoy242 opened this issue ยท 0 comments
My code (only key calls):
#sideonly client
item.addAdvancedTooltip(function (item) {
return client.player.difficulty;
});
Error:
[Client thread/ERROR] [Had Enough Items]: Failed to get tooltip: 1xitem.thermalfoundation.material@772 thermalfoundation:material
java.lang.NullPointerException: Cannot invoke "net.minecraft.entity.player.EntityPlayer.hashCode()" because "player" is null
at net.silentchaos512.scalinghealth.utils.SHPlayerDataHandler.getKey(SHPlayerDataHandler.java:103) ~[SHPlayerDataHandler.class:?]
at net.silentchaos512.scalinghealth.utils.SHPlayerDataHandler.get(SHPlayerDataHandler.java:69) ~[SHPlayerDataHandler.class:?]
at xyz.tcreopargh.ctintegration.scalinghealth.DifficultyManager.getDifficulty(DifficultyManager.java:63) ~[DifficultyManager.class:1.8.0]
at xyz.tcreopargh.ctintegration.scalinghealth.PlayerExpansionSH.getDifficulty(PlayerExpansionSH.java:18) ~[PlayerExpansionSH.class:1.8.0]
at CrafttweakerReloadablecategory\Uu_client319.process(category\uu_client.zs:13) ~[?:?]
https://mclo.gs/zdnHN9Z
The error written in debug.log indefinitely.