WorldInfo.setDifficulty(EnumDifficulty newDifficulty) event
Currently I don't see a way to detect when the game difficulty is changed (besides polling every tick). To change the difficulty setting, the WorldInfo.setDifficulty(EnumDifficulty newDifficulty) is called. Would it be possible to add an event that is fired every time the difficulty is changed with that method?
Why do I want this? My idea was to add the current difficulty as a 'task' to the BetterQuesting mod. With this I'd be able to react to the (currently) set difficulty level and offer different quests/rewards based on that. Making use of dynamically changing difficulty in the same adventure map would also be possible (hard dungeon, peaceful town center).
@williewillus added labels [Feature]
PR sent #3525
@mezz For #3525, is this use case a good one? Or @sjx233 would not send a pull request for this.
@liach this is a good use-case, and the part of the PR that supports this case is good. The part of the PR that is not good: changing the difficulty using the event.
The use case for changing difficulty, e.g. during a task in an RPG-style modification, you cannot change difficulty during the task; if you change, you are likely to receive a punishment--an increased difficulty. You can only change after you have done the task.
Ok that's a better use-case. Can you write that in the PR discussion?
https://github.com/MinecraftForge/MinecraftForge/pull/3525