[Question] In 2.0, GameStageHelper.hasStage/etc On Client Always Returns False
legendblade opened this issue ยท 2 comments
In testing, I've noticed that, when run on the client side, calling GameStageHelper.hasStage (and similar methods, without directly passing in an IStageData) will always return false - I assume this is because there are the client side specific methods, but I wanted to check if this was actually intended or not. This ultimately seems to be an issue that the local IStageData retrieved from GameStageSaveHandler, unless specifically accessed through GameStageSaveHandler.clientData, has no stages.
I've found this issue both:
- In my own development; this was resolved by adding a SidedProxy to switch to using clientHasStage instead of hasStage when on the client.
- In @codetaylor 's Artisan Worktables (https://github.com/codetaylor/artisan-worktables/blob/master/src/main/java/com/codetaylor/mc/artisanworktables/modules/worktables/integration/gamestages/GameStagesHelper.java#L12) where they're using GameStageHelper.getPlayerData, and then using IStageData's getStages function on both server and client. The client side is failing to recognize unlocked stages while the server side is fine.
This has been observed specifically with:
- Forge 14.23.4.2703
- GameStages 2.0.91
Sorry for the trouble; just wanted to double check. Thanks!