Guidebook

Guidebook

6M Downloads

[1.19.3] `BookRegistryEvent` fires while the Forge event bus is still shut down

XFactHD opened this issue ยท 4 comments

commented

At the moment, the BookRegistryEvent is fired at a point in time where the Forge event bus is not available yet:
grafik

Since the event only fires exactly once, the simplest fix would most likely be to make the event implement IModBusEvent and fire it on the mod bus via ModLoader.get().postEvent().
I'm going to assume that this event has been broken for a few versions and didn't just break in the 1.19.3 update.

Forge: 1.19.3-44.1.0
Guidebook: Guidebook-1.19.3-3.7.1

commented

I'm thinking about it and I should probably just deprecate it and remove it in the future. There isn't really a good place to keep this event without turning it into a mod-bus event and an IMC message people can post from their constructor would make more sense.

commented

IMC or purely the JSON seem like adequate solutions to me as well.

commented

v3.7.2 deprecates the event, although I didn't add an alternative besides the existing book json resource.

commented

Oops I forgot this event existed. I normally use the books via the books.json file, similar to how you add sound files via sounds.json