Some crafting recipes, like the one for the cake, have items that do not disappear from the crafting grid when the item gets crafted. Instead, they transform into a different item. For example, milk buckets turn into regular buckets when a cake is crafted.
This behavior is currently hard-coded per item, this means that milk buckets always turn into buckets and honey bottles always turn into glass bottles, regardless of crafting recipe. When adding custom crafting recipes using datapacks, this behavior may not always be desirable. Therefore, I am suggesting that recipe remainders should be stored in the recipe.json, something like this:
{
...,
"key": {
"A": "minecraft:milk_bucket",
"B": "minecraft:sugar",
"C": "minecraft:wheat",
"E": "minecraft:egg"
},
"remainder": {
"A": [
{
"max": 3,
"id": "minecraft:bucket"
}
]
}
}
In "remainder", specify the key for the item type that should be replaced. "id" is the item id to replace with. "max" is optional, it specifies how many items can at most be replaced, checked in writing order.
If you want to, let's say, have the third milk bucket turn into cobblestone, you'd do:
"remainder": {
"A": [
{
"max": 2,
"id": "minecraft:bucket"
},
{
"max": 1,
"id": "minecraft:cobblestone"
]
}
Of course, this is just a rough example, and the developers are free to implement this feature in any way they like if they do choose to do so.
Please sign in to leave a comment.
0 Comments