Conversation
there are no such ores in the full pack either way
… targets items & oredict entries are being registered mostly in up to init stage, so reInit the recipes at the beginning of postInit so we have much less recipes to reload
Guvante
reviewed
Sep 10, 2026
Guvante
left a comment
Contributor
There was a problem hiding this comment.
Everything I checked seemed fine but still some parts I didn't get to (OreDictRegistrationHandler has some functions I haven't checked, and more importantly auditing GTProxy removals to ensure they seem covered by the new code)
The structure seems decent and is mostly of a form that would allow transitioning to an extendable model (I don't think it necessarily needs to move out of tree but allowing customizations without recompiling the project would be pretty cool)
This was referenced Sep 10, 2026
Guvante
approved these changes
Sep 11, 2026
danyadev
force-pushed
the
OreDictionary-cleanup
branch
from
September 12, 2026 16:34
5403358 to
8dfaec6
Compare
danyadev
force-pushed
the
OreDictionary-cleanup
branch
from
September 14, 2026 21:10
4538088 to
de6e99a
Compare
danyadev
force-pushed
the
OreDictionary-cleanup
branch
from
September 14, 2026 21:27
de6e99a to
447fc4e
Compare
4 tasks
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.
Summary
OreDictionary handling has accumulated a lot of lifecycle logic, special cases and outdated hacks inside GTProxy. This PR separates the different responsibilities and simplifies the registration flow
Changed recycling recipes
Details
Tier 1/2/3&4 gives:
Meteoric Iron/Ledox/Mythryl
Previously it always gave Meteoric Iron
Ender Chest
and other forge hammer recycling recipes
About Forge Hammer recycling changes, for example Enchanting Table and Ender Chest: previously, the code was looking for the first material component which is a non-metal crystal, but once found, added the main item material, provided it just has a dust form. Now it provides the first non-metal crystal dust instead, that's why we're getting diamond dust, ender eye dust, and so on, instead of, say, obsidian dust.
Unify OreDict prefix parsing
Some
OrePrefixiesmethods did not handle mismatches when resolving a prefix, leading to inconsistency and some potential bugsExtract and decompose OreDict registration
The large
GTProxy.registerOre()method was moved into a dedicatedOreDictRegistrationHandlerclass and split into smaller pieces for validation, aliases, special registrations, material handling and recipe processingImprove blacklisting
Previously, GTOreDictUnificator blacklisting had two parts:
sNoUnificationListlist, which was managed byaddToBlacklist()andisBlacklisted()ItemData.mBlackListed, which was mainly set onget()methods whenuseBlackListis true,isBlacklisted()is true andGregTechAPI.sUnificationEntriesRegisteredis falseSo the blacklisted state was only picked up if
get()happened to be called before a certain point during pack loading and with useBlackList=true. This was inherently unreliable: a stack could be blacklisted too late, or its unified form could simply be requested too late formBlackListedto ever be updatedNow, blacklist state lives only in two sets: one for exact ItemStack entries and one for wildcard-blacklisted items. The blacklist is managed exclusively through
addToBlacklist()andisBlacklisted(), andmBlackListedis entirely goneMake OreDict unification incremental
The old implementation replayed the entire OreDict events list during
registerUnificationEntries()twice: on Init and on PostInit in order to:mUnificationTarget)sItemStack2DataMap)sName2StackMap)GTRecipe.reInit()to apply the new unified stacks in the recipes where the previous unified stack was used (initially unified stack is the first stack we got from aoreDictEventsHashSet, which has undetermined order...)The new flow is truly incremental:
1.1. register an association
1.2. if an oredict is a specified override, make its stack unified and reset cached unified stacks for across its oredict
GTRecipe.reInit()once to update recipes created before the unified stack was overriddenIn result, the associations and the correct unified stacks are available right after the oredicts are registered, not only after two Init and PostInit checkpoints
I chose the beginning of PostInit because all of the unified stack overrides happened by the end of Init. Postponing the
GTRecipe.reInit()any longer would only result in slower reInit because the number of recipes is increasing constantly. I also added a warning log in case something goes wrong in another mod or when adding a new overrideSeparate aliases
A large chunk of spaghetti code turned out to be aliasing. Created a new
OreDictAliasesclass with direct and clear alias mappingsRemove dead code
A lot of checks were merely impossible to pass because the handler rejects an oredict via one of the earlier checks
The large ignore lists were cleaned up by simulating their registration and checking how the handler responds to each of them
Performance
There's a minor improvement due to regexp removal and only one
GTRecipe.reInit()pass instead of two:What is left
OrePrefixiesandGTOreDictUnificatorcould use some cleaning up tooChecklist