add resource reload start/end events#5108
Conversation
…f the test right next to the one I added so idk
| /** | ||
| * Called before the client begins loading resources. | ||
| */ | ||
| public static final Event<StartResourceReload> START_RESOURCE_RELOAD = EventFactory.createArrayBacked(StartResourceReload.class, callbacks -> (client, isFirst) -> { |
There was a problem hiding this comment.
It would be helpful to explain the isFirst parameter in the javadoc
LambdAurora
left a comment
There was a problem hiding this comment.
The events should be in resource-loader-v1, in a new class (ClientResourceLoadingEvents), and in a future PR most likely move the data-pack events to resource loader too.
Aside from that, the events are missing important context: the resource manager.
And in the case of the end event, it's also missing an Optional<Throwable> in the case of errors, (and the event should trigger even if the resource load fails).
It's the kind of low-bandwidth event where I'd recommend creating a context object just to ensure a stable API while allowing to add more context if needs be.
|
Could it also include the store on success? |
|
Including the store is not a bad idea, yes. |
im not sure exactly what package to put it in in the resource loader module, do i mimic the package structure from a typical event module?
what does this mean exactly? |
No description provided.