{
"type": "minecraft:crafting_shaped",
//你在合成台中的3×3方格中的摆放图案
"pattern":
[
"RRR",
"RRQ",
"RRX"
],
//进行键值对映射(合成的材料)
"key":
{
//此处的R代表modid中的object物品(原版的modid为minecraft)
"R":
{
"item": "modid:object"
//modid 方块名称
}, //要加","
"Q":
{
"item": "modid:object"
//modid 方块名称
}, //要加","
"X":
{
"item": "modid:object"
//modid 方块名称
}
//X是最后一项,不用加","(json经典语法)
},
//合成结果
"result":
{
"item": "modid:object"
//modid 方块名称
"count": 1
//合成几个出来
}
}
{
"type": "minecraft:crafting_shaped",
//将工作台摆满
"pattern":
[
"ZZZ",
"ZZZ",
"ZZZ"
],
//合成材料映射
"key":
{
//Z代表joymod(我的modid)中的zs_block(第四讲中创作的方块)
"Z":
{
"item": "joymod:zs_block"
}
},
//合成结果
"result":
{
//合成结果为minecraft:黑曜石
"item": "minecraft:obsidian",
"count": 9
//设置可以合成出9个黑曜石
}
}
关于Minecraft中的物品名称可以在我的世界Wiki中进行查找:
我的世界中文Wiki百科
{
"type": "minecraft:crafting_shaped",
// 用空格代替即可
"pattern":
[
"ZZZ",
"Z Z",
"ZZZ"
],
"key":
{
"Z":
{
"item": "joymod:zs_block"
}
},
"result":
{
"item": "minecraft:obsidian",
"count": 9
}
}
{
"type" : "minecraft:crafting_shapeless",
//所有所需材料
"ingredients":
[
{
"item": "modid:object"
},
{
"item": "modid:object"
},
{
"item": "modid:object"
}
],
//结果生成
"result":
{
"item": "modid:object"
"count": 1
}
}
{
"type" : "minecraft:crafting_shapeless",
"ingredients":
[
//第一个铁锭
{
"item" : "minecraft:iron_ingot"
},
//第二个铁锭
{
"item" : "minecraft:iron_ingot"
},
//一个青金石(染料dye中的第4号元素)
{
"item": "minecraft:dye",
"data": 4
}
],
//结果
"result":
{
"item" :"joymod:labor_shovel",
"count": 1
//生成1个
}
}