Started by
Th3Eye
on
Topic category: Help with Minecraft modding (Java Edition)
I want to get the recipe of an item available in Minecraft, ie. what is required in the recipe when given what is made. I haven't found anything like this in the blocky procedures, so how can I do this in code? Thanks in advance!
Edited by Th3Eye on Wed, 10/10/2018 - 18:45
AFAIK, you can't do this with blocks, or with code for that matter, don't quote me. There are, however, two ways of getting recipes easily:
1. Typing in the command /recipe give @a *
What this command does is self-explanatory - It will give you every recipe for every item, including modded items. You can change the * for minecraft:* or <modname>:* to get recipes.
2. Using a mod that shows recipes, like JEI (Just Enough Items)
Just Enough Items, along with any other inventory-type mod that has this feature, allows you to see the recipes for certain items.
That is not at all what I meant. I want to get the recipes for items to use in the mod, not get the recipes to give the player.
You cant edit Vanilla recipes they are hardcoded by MCreator
Not edit, access.
All internal Minecraft recipes are located in their respective .JAR files in the .minecraft/versions folder. So if you wanted to get the recipes for a version of Minecraft, lets say 1.12, you need to have downloaded the 1.12 version from the launcher, then go to .minecraft/versions/1.12/1.12.jar and open via WinRAR/7Zip. The recipes are in JSON format and can be found in assets/minecraft/recipes.
But how do I access them in MCreator? I need them for a custom crafter block.
You cannot access the crafting recipes that are built in Minecraft, i.e. Bows and Swords, in custom crafting blocks using MCreator, as MCreator does not use the same crafting mechanics as Minecraft's internal MATTIS system. You have to make recipes through the "Recipe" elements, which do work with the vanilla MATTIS Crafting Table, or through Procedures/coding, which only work with custom Crafting Blocks with inventory.
Thank you. That's all I needed to know.