Skip to content

Fix RegisterRegistryEvent.GameScoped being fired too soon#4062

Merged
Yeregorix merged 1 commit intoapi-11from
fix/early-registry-events
Jun 25, 2024
Merged

Fix RegisterRegistryEvent.GameScoped being fired too soon#4062
Yeregorix merged 1 commit intoapi-11from
fix/early-registry-events

Conversation

@Yeregorix
Copy link
Member

@Yeregorix Yeregorix commented Jun 25, 2024

Forge constructs mods after bootstrapping registries. That's why we shouldn't fire events during SpongeLifecycle#establishEarlyGlobalRegistries and SpongeLifecycle#finalizeEarlyGlobalRegistries.

RegisterRegistryValueEvent.BuiltIn is fired in SpongeLifecycle#finalizeEarlyGlobalRegistries. I'm not sure how we could fix that because vanilla registries are frozen before mods are constructed.

@Yeregorix Yeregorix merged commit 625fba4 into api-11 Jun 25, 2024
@Yeregorix Yeregorix deleted the fix/early-registry-events branch June 25, 2024 18:22
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

Successfully merging this pull request may close these issues.

1 participant