Skip to content

Commit

Permalink
Implement 1.20+ smithing recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
beckadamtheinventor committed Jul 27, 2024
1 parent e5f1579 commit 2755dae
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 1 deletion.
25 changes: 24 additions & 1 deletion data/common/recipes/SmithingRecipe.m3ecjson
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
---if1 version_past_1.20
{
"type": "minecraft:smithing_transform",
"template": {
---if2 template
---if ?template #startswith #
"tag": "${template^substring(1)}"---fi---if ?!template #startswith #
"item": "${template}"---fi---2fi
},
"base": {
---if ?ingredient #startswith #
"tag": "${ingredient^substring(1)}"---fi---if ?!ingredient #startswith #
"item": "${ingredient}"---fi
},
"addition": {
---if ${ingredient2} #startswith #
"tag": "${ingredient2^substring(1)}"---fi---if !${ingredient2} #startswith #
"item": "${ingredient2}"---fi
},
"result": {
"item": "${result}"
}
}---1fi---if1 !version_past_1.20
{
"type": "minecraft:smithing",
"base": {
Expand All @@ -13,4 +36,4 @@
"result": {
"item": "${result}"
}
}
}---1fi
5 changes: 5 additions & 0 deletions data/fabric1.20.1/m3ec_build.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"action": "setdictkey",
"key": "version_past_1.19.3",
"value": true
},
{
"action": "setdictkey",
"key": "version_past_1.20",
"value": true
}
],
"preActions": [
Expand Down
5 changes: 5 additions & 0 deletions data/fabric1.20.4/m3ec_build.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
"action": "setdictkey",
"key": "version_past_1.19.3",
"value": true
},
{
"action": "setdictkey",
"key": "version_past_1.20",
"value": true
}
],
"preActions": [
Expand Down
5 changes: 5 additions & 0 deletions data/forge1.20.1/m3ec_build.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"action": "setdictkey",
"key": "version_past_1.19.3",
"value": true
},
{
"action": "setdictkey",
"key": "version_past_1.20",
"value": true
}
],
"preActions": [
Expand Down
5 changes: 5 additions & 0 deletions data/forge1.20.4/m3ec_build.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"action": "setdictkey",
"key": "version_past_1.19.3",
"value": true
},
{
"action": "setdictkey",
"key": "version_past_1.20",
"value": true
}
],
"preActions": [
Expand Down

0 comments on commit 2755dae

Please sign in to comment.