Repository navigation
Fix registry issues - #108
Open
SpaceWalkerRS wants to merge 8 commits into
Open
SpaceWalkerRS wants to merge 8 commits into
SpaceWalkerRS wants to merge 8 commits into
Conversation
This fixes an issue in 18w43a+, where Registry::<clinit> both creates and populates all registries. Several OSL APIs wrap Vanilla registries, which was triggered in regular mod entrypoints, which are invoked before Registry::<clinit>. This leads to the OSL registries being null and as a result crashes if any mod tries to use those APIs to register content. The new registry-init entrypoint is carefully invoked after vanilla registries are created but before they are populated, which avoids the earlier issue. In 1.13.2- this issue does not exist, and the registry-init entrypoint is simply invoked at the beginning of Bootstrap::init
SpaceWalkerRS
force-pushed
the
fix-registry-issues
branch
from
November 5, 2026 11:54
85b741c to
64efa9a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Registry::iteratorreturning anIteratorwithout a reliable order - now it returns a iterator that's ordered by numerical IDsIn 18w43a+,
Registry::<clinit>both creates and populates all registries. Several OSL APIs wrap Vanilla registries, which was triggered in regular mod entrypoints, which are invoked beforeRegistry::<clinit>. This leads to the OSL registries beingnulland as a result crashes if any mod tries to use those APIs to register content.The new
registry-initentrypoint is carefully invoked after vanilla registries are created but before they are populated, which avoids the earlier issue. In 1.13.2- this issue does not exist, and theregistry-initentrypoint is simply invoked at the beginning ofBootstrap::init.