Custom Model Data ingredients for smelting recipes, with datapacks #4398
Unanswered
dogtorbloo
asked this question in
Mod Dev Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Hi. I am trying to make a food mod with datapacks, adding custom ingredients and cooking them using furnaces and campfires. Someone told me that Fabric API can help with this and gave me the template recipe. But I am having problems trying to figure out how to set my custom model data, functions, and everything to my ingredient. Could someone help?
Inside my recipe:
{
"type": "minecraft:smelting",
"category": "food",
"cookingtime": 160,
"experience": 0.35,
"ingredients": [
{
"fabric:type": "fabric:components",
"base": {
"item": "minecraft:cooked_beef"
},
"functions": [
{
"add": false,
"count": 1,
"function": "minecraft:set_count"
},
{
"function": "minecraft:set_custom_model_data",
"value": 2
},
{
"function": "minecraft:set_name",
"entity": "this",
"name": {
"text": "Slowpoke Tail",
"type": "text"
},
"target": "item_name",
"conditions": []
}
],
"components": {
"minecraft:food": {
"nutrition": 2,
"saturation": 2,
"can_always_eat": true,
"eat_seconds": 1.61,
"effects": []
}
},
"strict": false
}
],
"result": {
"id": "minecraft:cooked_beef",
"components": {
"minecraft:custom_model_data": 3,
"minecraft:item_name": ""Roast Slowpoke Tail"",
"minecraft:food": {
"nutrition": 5,
"saturation": 3.6,
"can_always_eat": true,
"eat_seconds": 1.61
}
}
}
}
This is my datapack structure
Beta Was this translation helpful? Give feedback.
All reactions