Fix sequenced assembly recipe misselection when recipes have the same transition item #9310
+9
−7
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.
I've got a long one here so get ready. Fixes #3947 and probably a lot more that were previously unexplainable.
There are no recipes in base Create that use the same transition item. Most or maybe all recipes use a separate, unique item like
create:incomplete_track
orcreate:incomplete_precision_mechanism
. This is all fine and works.By using data packs, we can add recipes that do not have this constraint. For example, both recipes below use
minecraft:netherrack
as the starter ingredient and the transition item. See section at the end for the full json for each.Both recipes are straight forward, so lets try to craft them using the below setup.
One loop of the warped mushroom yields a netherrack block with the correct sequenced nbt and the correct next step.

But one loop of the crimson mushroom yields .. the same item with the exact same nbt. It is as if the deployer applied the warped fungus when should have applied the crimson.
And when finishing the second loop for both cases, only warped nylium is ever produced. Furthermore, when mixing the steps together, you expectedly get the same result. There is no way to get crimson. So clearly something is wrong here.
Observations:
If (1) and the first step is the same then we have a truly ambiguous recipe - not much you can do and it is expected that something is wrong - but we don't have a ambiguous recipe in the nylium example. Create should differentiate these recipes.
If (2), Create breaks currently and leads to the above behavior. This should be fixed.
If (3), and we use the transition item with nbt as the starter ingredient for another recipe, it is up for debate. Should we
Either could work, but I think passing on the item is better (and easier to implement).
So this all leads to the code change which is thankfully really simple. Just check for the existence of the sequenced assembly nbt before checking if the item is the same. Changing these lines makes the nylium example work as expected and makes (3) pass on the item.
Attachments
crimson_nylium.json
warped_nylium.json