0
\$\begingroup\$

I'm creating a Minecraft mod with Forge, and I need to create a custom crafting recipe that uses cocoa beans. However, when I try to create the recipe, it does not work (as in, I cannot craft items with the specified pattern).

When src/main/resources/assets/mymod/recipes/myrecipe.json looks like this, it works fine:

{
 "type": "minecraft:crafting_shaped",
 "pattern": [
 " X ",
 " X ",
 " X "
 ],
 "key": {
 "X": {
 "item": "minecraft:iron_ingot"
 }
 },
 "result": {
 "item": "minecraft:gold_ingot",
 "count": 1
 }
}

but when it looks like this, I can't craft items with the recipe:

{
 "type": "minecraft:crafting_shaped",
 "pattern": [
 " X ",
 " X ",
 " X "
 ],
 "key": {
 "X": {
 "item": "minecraft:cocoa_beans"
 }
 },
 "result": {
 "item": "minecraft:gold_ingot",
 "count": 1
 }
}

According to https://minecraft.gamepedia.com/Cocoa_Beans#ID, the name ID for cocoa beans is minecraft:cocoa_beans, which is exactly what I entered. However, the crafting recipe does not seem to be loaded into the game.

Why isn't the second crafting recipe working and how can I fix it?

I'm using Forge version 1.12.2-14.23.5.2768 and Eclipse version 2018-09 (4.9.0), and I'm running Minecraft directly from Eclipse.

Vaillancourt
16.4k17 gold badges56 silver badges61 bronze badges
asked May 2, 2019 at 20:40
\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Coco beans are brown dye.

Dye has metadata values that determine which specific item it is (until 1.13 and The Flattening). The data value you're looking for in this case, is 3.

"key": {
 "X": {
 "item": "minecraft:dye",
 "data": 3
 }
},
answered May 3, 2019 at 1:50
\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.