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

Add Item Type Merge Adapter #292

Merged
merged 7 commits into from
Jun 23, 2023
Merged

Add Item Type Merge Adapter #292

merged 7 commits into from
Jun 23, 2023

Conversation

WolfyScript
Copy link
Owner

@WolfyScript WolfyScript commented Jun 23, 2023

The item type merge adapter allows recipes to change the type of the result stack depending on an ingredient.

This is useful for repair recipes, and similar recipes inside the crafting grid, where the type of the ingredient should determine the result type.
The id of the merge adapter is customcrafting:item.

One example is for a recipe that converts swords into axes:

target {
  mergeOptions : [ {
    slots : [ 4 ]
    adapters : [ {
      key : "customcrafting:item"
      typeMappings { // Maps the sword types of the ingredient to a type for the result stack
        wooden_sword = wooden_axe
        stone_sword = stone_axe
        iron_sword  = iron_axe
        golden_sword = golden_axe
        diamond_sword = diamond_axe
      }
    } ]
  } ]
}

For the recipe to work, it of course needs to allow all the different variants of items.
You can do that by shift + right-click on ingredient slots!

This is not meant to replace type specific recipes like for boats, doors, etc.
For those it is still required to create separate recipes, because this can only ever target a single ingredient!

@WolfyScript WolfyScript self-assigned this Jun 23, 2023
@WolfyScript WolfyScript added the enhancement New feature or request label Jun 23, 2023
@WolfyScript WolfyScript merged commit b5e984e into master Jun 23, 2023
1 check passed
@WolfyScript WolfyScript deleted the item_type_merge_adapter branch July 7, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant