Wiki 9Minecraft Wiki 9Minecraft

Adding Custom Recipes With Crafttweaker

Java EditionModFAQ 6Related mods 60
DownloadPrimitive Crafting

Get the files on 9Minecraft

You can add or remove primitive crafting recipes using CraftTweaker.

Methods

/**
 * Adds a primitive recipe.
 */
mods.primitivecrafting.addRecipe(IItemStack output, IIngredient a, IIngredient b)
/**
 * Adds a primitive recipe that is restricted by RecipeStages.
 */
mods.primitivecrafting.addRecipe(IItemStack output, IIngredient a, IIngredient b, String registryName, String stageName)
/**
 * Removes a primitive recipe. The ingredients and outputs must be 
 * exactly like in the recipe that you want to remove.
 */
mods.primitivecrafting.removeRecipe(IItemStack output, IIngredient a, IIngredient b)

Examples

Adding recipes

mods.primitivecrafting.addRecipe(<minecraft:sponge> * 4, <minecraft:egg>, <minecraft:wooden_pressure_plate>);
mods.primitivecrafting.addRecipe(<minecraft:arrow>, <minecraft:apple> * 3, <minecraft:stone:3>);
mods.primitivecrafting.addRecipe(<minecraft:sign>, <ore:plankWood>, <minecraft:gold_ingot>);
mods.primitivecrafting.addRecipe(<minecraft:pumpkin> * 4, <forge:bucketfilled>.withTag({FluidName: "blood", Amount: 1000}), <forge:bucketfilled>.withTag({FluidName: "honey", Amount: 1000}));

If you want to use liquids, you must put them in containers, like buckets. You may not do this:

mods.primitivecrafting.addRecipe(<minecraft:obsidian>, <liquid:water>, <liquid:lava>);

You should do this:

mods.primitivecrafting.addRecipe(<minecraft:obsidian>, <minecraft:water_bucket>, <minecraft:lava_bucket>);

Removing Recipes

mods.primitivecrafting.removeRecipe(<minecraft:trapped_chest>, <minecraft:chest>, <minecraft:tripwire_hook>);
mods.primitivecrafting.removeRecipe(<minecraft:sponge> * 4, <minecraft:egg> * 3, <minecraft:stone:3>);
mods.primitivecrafting.removeRecipe(<minecraft:wool:8>, <ore:plankWood> * 2, <ore:dyeOrange>, );
mods.primitivecrafting.removeRecipe(<minecraft:pumpkin> * 4, <forge:bucketfilled>.withTag({FluidName: "blood", Amount: 1000}), <forge:bucketfilled>.withTag({FluidName: "honey", Amount: 1000}));