cubex2 / customstuff4

A Minecraft mod for adding content
https://minecraft.curseforge.com/projects/custom-stuff-4
GNU General Public License v3.0
25 stars 14 forks source link

Trying to add a recepe into the game but i am having problems #102

Open SophieBunBun opened 5 years ago

SophieBunBun commented 5 years ago

I am quite inexperienced with coding and modpack creation, decided to make a little project just for fun but ended up getting the desire to finish it, i would really apreciate your help!

The first thing i tried was to follow what the wiki says and it didnt work and next i tried to add recipies using crafttweaker 2 but both didnt work.

This is what i wrote in the main.json file:

{ "type":"shapedRecipe","entries": [{ "shape": ["ABA","CDC","EFE"], "items": { "A":"minecraft:gold_ingot", "B":"minecraft:redstone", "C":"enderio:item_material:10", "D":"customstuff:copper_coil", "E":"minecraft:piston", "F":"ore:ingotCopper" }, "result": { "item":"customstuff:heatgenerator", "amount":"1" }, "recipeList": "customstuff:recipes" } ] } Note: All items here were added and are working fine.

On custom stuff i tried both through the ingame method and zen script method but both didnt work...

Im using Custom stuff 4 (the latest version), forge 1.12.2-14.23.5.2768, with ender.io, mekanism, betterquesting,crafttweaker and jei (wich for some reason isnt showing the custom stuff 4 items i added)

Am i doing something wrong?

luoxingzlx commented 5 years ago

66

You need to use minecraft's recipe system to add recipes for the crafting table, Like this

{
    "type": "minecraft:crafting_shaped",
    "pattern": [
        "###",
        "###",
        "###"
    ],
    "key": {
        "#": {
            "item": "kuronekosgift:hairy_ball_ingot",
            "data": 1
        }
    },
    "result": {
        "item": "kuronekosgift:hairy_ball_block",
        "data": 1
    }
  }

Then put the json file in assets\modid\recipes ,vanilla recipes are loaded automatically without requiring main.json to add content to load it.