下面完成合成配方的制作;
合成分为有序合成和无序合成;
无序合成:无摆放位置要求
有序合成:需要正确的摆放位置
一、在recipes下放置json
json名字建议与产物相关,但非必须。
首先找到recipes文件
recipes文件下建json文件;
合成分为有序合成和无序合成。
二、无序合成
如需要多种类物品合成,如:什么颜色羊毛都可以合成,可使用data:32767表示任意类型,多种类物品必须使用data。
json文件代码格式:
{
“result”:{
"item":"物品资源路径",
"count":个数
},
"ingredients":[
[{"item":"物品资源路径"}],
[{"item":"物品资源路径"}]
],
"type":"forge:ore_shapeless"
}
例:
三个钻石无序合成三个钻石
{
"result": {
"item": "minecraft:diamond",
"count": 3
},
"ingredients": [
[
{ "item": "minecraft:diamond" }
],
[
{ "item": "minecraft:diamond" }
],
[
{ "item": "minecraft:diamond" }
]
],
"type": "forge:ore_shapeless"
}
三、有序合成
{
"type":"minecraft:crafting_shaped",
"pattern":["模式","模式"],
"key":{
"符号":{"item":"物品资源路径"},
"符号":{"item":"物品资源路径"}
},
"result":{
"item":"物品资源路径",
"count":个数
},
}
例:
使用任意类型羊毛合成一个皮革帽子
{
"type": "minecraft:crafting_shaped",
"pattern":
[
"111",
"1 1",
" "
],
"key":
{
"1":
{
"item": "minecraft:wool",
"data": 32767
}
},
"result":
{
"item": "minecraft:leather_helmet",
"count": 1
}
}
四、常见错误
1、漏掉或多余的逗号、括号
2、打字错误,打成不存在的物品
如:mincraft:dimaond
3、有序合成配方每行长度不同,未用空格补齐
如:("AA""A")
4、没有指明meta变种
"data":变种值
5、改的不是src目录下的内容