Fix crash displaying squeezer recipes with empty/missing tag-based outputs#1651
Closed
Copilot wants to merge 2 commits into
Closed
Fix crash displaying squeezer recipes with empty/missing tag-based outputs#1651Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…g item tag Use SlotDisplay.TagSlotDisplay instead of ItemStackFromIngredient.getIngredient().display() to avoid crashing when the tag doesn't exist in the registry (e.g. c:dusts/coal when no Coal Dust mod is installed). TagSlotDisplay safely handles missing/empty tags. Agent-Logs-Url: https://github.com/CyclopsMC/IntegratedDynamics/sessions/8c152d32-321d-4a39-aa9e-05f944019446 Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix coal dust recipe loading issue in JEI
Fix crash displaying squeezer recipes with empty/missing tag-based outputs
Apr 11, 2026
rubensworks
requested changes
Apr 11, 2026
rubensworks
left a comment
Member
There was a problem hiding this comment.
If the problem is that ItemStackFromIngredient.getIngredient().display() can throw, maybe you can make it non-throwing instead?
Contributor
Author
The current fix does exactly that. |
This was referenced Apr 11, 2026
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.
When a squeezer/mechanical squeezer recipe has a tag-based output (e.g.
c:dusts/coal) and no mod populates that tag, JEI crashes trying to build the recipe display.Root cause
RecipeSqueezer.getOutputItemsAsSlots()resolved tag outputs viaItemStackFromIngredient.getIngredient().display(), which internally callsBuiltInRegistries.ITEM.getOrThrow(tag)— throwing if the tag is absent from the registry.Fix
Use
SlotDisplay.TagSlotDisplaydirectly for tag-based outputs, bypassing registry lookup entirely.TagSlotDisplay.resolve()usesOptionaland returns an empty stream for missing/empty tags instead of throwing.This lets JEI render the recipe slot as empty (missing item placeholder) rather than crashing.