Ore Stages

Ore Stages

6M Downloads

Reloading Resources from main menu can NPE

Gegy opened this issue ยท 3 comments

commented

return GameStageHelper.clientHasStage(PlayerUtils.getClientPlayer(), this.stage) ? this.originalModel : this.replacementModel;

If client player is null (as it is on the main menu), the code will throw an NPE when calling:
https://github.com/Darkhax-Minecraft/Game-Stages/blob/9fed6009f53a8abea626251c927dd9afcbb03705/src/main/java/net/darkhax/gamestages/GameStageHelper.java#L271-L279

commented

How does someone even reload the resources on the main menu?

commented

I added a check to default to the replacement model if there is no player. You should check to see if this resolved your issue, and if your PR breaks the way I patch models.

commented

You can change language while on the main menu, which causes a resource reload.