Darkhax-Minecraft / Game-Stages

An API for universal player based progression.
https://minecraft.curseforge.com/projects/game-stages
GNU Lesser General Public License v2.1
63 stars 17 forks source link

Custom unlockable unlocks gamestage, but doesn't trigger orestages update #11

Closed codetaylor closed 6 years ago

codetaylor commented 6 years ago

What

  1. Stage blocks using OreStages mod
  2. Create Reskillable unlockable to unlock ore stage
  3. Unlock Reskillable unlockable
  4. Notice "You have unlocked..." message
  5. Notice staged blocks aren't changed and no chunks are re-rendered

This happens in single player. Leaving the world and re-entering the world will display the staged blocks properly. Also, entering the command to add the stage does trigger the block change and the chunk update. Adding a different stage to the player does trigger the chunk update, but doesn't reveal the blocks.

Maybe the added stage isn't being synced to the client. I'm going to cross-post this in CompatSkills and GameStages. When PlayerDataHandler.getStageData(player).unlockStage(gameStage) is called, does GameStages sync the change with the client or is that the responsibility of the caller?

Reference

Versions

Forge: 14.23.2.2618 Reskillable-1.12.2-1.0.0 CompatSkills-1.12.2-1.0.0 GameStages-1.12.2-1.0.85 OreStages-1.12.2-1.0.26

Darkhax commented 6 years ago

I can confirm that this is the case. He is not firing the events that other mods are listening to. I could have designed the API to be a bit more friendly towards this, however other mods unlocking the stage in this way wasn't really planned by me when I first started and due to backwards compat reasons it can not be improved until 1.13.

codetaylor commented 6 years ago

Thanks @darkhax ! :)