Skip to content

Datagen SimpleDatagenIngredient without wrapping in neoforge:compound#10223

Open
VoidLeech wants to merge 1 commit into
Creators-of-Create:mc1.21.1/devfrom
VoidLeech:mc1.21.1/codec-injection
Open

Datagen SimpleDatagenIngredient without wrapping in neoforge:compound#10223
VoidLeech wants to merge 1 commit into
Creators-of-Create:mc1.21.1/devfrom
VoidLeech:mc1.21.1/codec-injection

Conversation

@VoidLeech
Copy link
Copy Markdown
Collaborator

Modifies the MapCodec for Ingredient.Values, only when datagen is ran, so that we can use one of vanilla's private constructors and serialize non-registered items as if they were. At runtime we don't change anything and they're just resolved as normal Ingredients backed by an ItemValue.

Marginally decreases file size (18.688 -> 18.681 kB on my machine) and should have slightly lower memory usage as well due to not having single ingredients wrapped in lists inside a CompoundIngredient.

Prevents issues like #10203 (comment) from popping up with recipes output from Create's datagen (api). Wouldn't resolve them for people using a compound ingredient with multiple options but I believe that'd require overhauling the entire recipe syntax.

…ompound

improves compatibility with Almost Unified for processing recipes generated through Create's datagen
@VoidLeech VoidLeech added the pr type: feature PR adds a new feature or changes an existing feature label Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr type: feature PR adds a new feature or changes an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant