Expose deferred holders as public fields - #11
Merged
CaitlynMainer merged 3 commits intoAug 5, 2026
Merged
Conversation
This allows it to run under Java 25.
SquidDev
force-pushed
the
squid/registration-tweaks
branch
from
August 5, 2026 15:56
635159a to
474644e
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.
Currently all item references in OpenComputers ends up going through the public
ItemInfoAPI, for instanceItems.get(Constants.ItemName.ServerTier1).item(). This is pretty verbose, inefficient (requires two map lookups on string keys) and not really in keeping with how most mods do things.Instead, we move every item to be a field, meaning the items can just be accessed via
Items.ServerTier1.get().The entire diff here is just the following repeated for every block/item in the mod, hence it being a bit verbose.
This change was mostly motivated by a second PR I have for data-generation, where there's a lot of references to blocks/items.
IMO it's worth getting rid of the whole
ItemInfosystem (just look up the entries from the registry directly if you need them!), but that's a much bigger change and worth discussing first.