Closed inglettronald closed 5 months ago
I don't necessarily disagree with adding an option to remove handlers, but why would we need a close method? If you have the reference to the handler instance you should be able to handle anything else as a result of removing the handler yourself.
The user could certainly call there own close method after removing a handler. However, it looks like all of the mods can access each-other handlers currently, and this close method followed that expectation.
The handlers registered aren't currently accessible, the only way to add a handler is to provide the handler itself. Other mods don't have access to the handler added.
Other mods should be able to access it through mixin, reflection, or access wideners. However, at that point you could probably write your own injection into unregisterHandler
anyway to write a close method, so I don't really care if this close
method gets kept or not.
I think with the current goals and implementation of the Mod API, methods to unregister handlers are unnecessary
Description
Allows the user to close/unload
ClientBoundPacketHandler
implementations.Why?
Dynamic handler loading seems like a novel idea.