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

Switch to NeoForge data map feature for bulk compression overrides #165

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

62832
Copy link
Owner

@62832 62832 commented Jan 19, 2025

While serviceable to a point, the conventional #megacells:compression_overrides tag suffers from the inability to specify a clear desired variant for items to override. This inherent imprecision leads to odd cases such as AllTheMods/ATM-10#1864, where the compression system may generate multiple (often nonsensical) chains for the same overridden item which have to be covered for one-by-one by blacklisting odd items such as these, potentially every time a new override is added. In fact, MEGA itself already had to provide default cover for a dumb case like this by blacklisting the tag for wrenches of all things.

The solution to this problem is to switch to NeoForge's data map feature introduced in MC 1.20.4 by neoforged/NeoForge#519. With the new data map in place of the tag, it is now possible to specify the exact next variant expected for a given override, with any recipes which may involve the overridden item but not provide the appropriate variant as the output being rejected to prevent further situations like the above. This should also hopefully ease the burden on modpack developers when it comes to the amount of items to blacklist just to prevent such scenarios as above.

The old tag will still be present and also remain in use for the time being as a fallback, but has been deprecated and is subject to removal for when pack developers have fully switched away from the tag.

@62832 62832 merged commit 9f54e40 into master Jan 19, 2025
2 checks passed
@62832 62832 deleted the compression-datamap branch January 20, 2025 00:40
@62832
Copy link
Owner Author

62832 commented Jan 22, 2025

Further to the initial PR, fb0bdfe also now deprecates the #megacells:compression_blacklist tag and consolidates the blacklist system within the new data map.

For blacklisting, instead of specifying an item ID, the variant key may now be set to NONE as below in order to prevent the given item or any items in a given tag from ever being handled by bulk compression.

"#c:seeds": {
  "variant": "NONE"
}

NOTE (22/01): currently a bug in NeoForge requires removal entries in data maps to be present at runtime when they should normally be optional. As MEGA currently ships with a default blacklist which excludes another mod's item (Inferium Essence from Mystical Agriculture), this will prevent data packs from being loaded without errors unless MystAg is also present, so a release build will be postponed until the bug is fixed. See neoforged/NeoForge#1886 / neoforged/NeoForge#1889.

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