Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NeoForge PR#1915 (21.4.84-beta [1.21.x]) breaks mixins reload listeners #458

Open
NunyaBiznass opened this issue Feb 12, 2025 · 0 comments

Comments

@NunyaBiznass
Copy link

From NeoForge PR#1915:

This PR introduces dependency sorting for both client and server reload listeners. The sort is topological, using FML's TopologicalSort class as the backbone. Reload listeners are added to a DAG where an edge from a->b means that a must run before b.

The sorting logic, and the modder-facing API, is in SortedReloadListenerEvent, the parent class of both AddServerReloadListenersEvent and AddClientReloadListenersEvent (formerly RegisterClientReloadListenersEvent).

Requirements
As a prerequisite, this change enforces that all reload listeners are named. The name must be provided via SortedReloadListenerEvent#addListener at the time of registration. Vanilla listeners are automatically named, via VanillaClientListeners and VanillaServerListeners, which hold the class->RL maps for all known vanilla listener types.

Note: Mods that are currently using mixins or other non-event means to inject reload listeners will crash after this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@NunyaBiznass and others