Thursday, November 24, 2022
HomeGame Developmentjava - Registering recipe for Minecraft with Forge on IntelliJ

java – Registering recipe for Minecraft with Forge on IntelliJ

I am utilizing Forge on IntelliJ IDEA to make a mod for Minecraft, and I believe I’m caught on the place I have to register a recipe for an merchandise.

How I acquired to that concept:
I examined it out and every thing labored. No bugs/errors: The merchandise that may be made with the recipe (a rubber band) was obtainable straight away in artistic mode. Nevertheless, after I was attempting to do the recipe half for creating the rubber band, which would come with getting a dandelion that results in an achievement(?) that exhibits the participant they might then be capable to make a rubber band with dandelions, the achievement solely confirmed the common recipe that is within the unique sport.

I do know the setup of the information that import different strategies works as a result of I attempted it out with this instance. It additionally exhibits that the rubber_band.json was made within the sources, so my guess is that the half that went mistaken is almost definitely how I didn’t embrace the registration of the recipe for the rubber band. I am simply uncertain learn how to get that settled.

Here’s what I’ve to this point:

public class Recipes  extends RecipeProvider {

    public Recipes(DataGenerator generatorIn) {

    protected void buildCraftingRecipes(Client<FinishedRecipe> shopper) {
                .requires(Gadgets.DANDELION, 9)
                .unlockedBy("has_dandelion", has(Gadgets.DANDELION))

^ with imports, that is the recipes (the one one I’ve to this point)

    public static ultimate RegistryObject<Merchandise> RUBBER_BAND = ITEMS.register("rubber_band", () -> new Merchandise(ITEM_PROPERTIES));
    public static ultimate TagKey<Merchandise> DANDELION_ITEM = TagKey.create(Registry.ITEM_REGISTRY, new ResourceLocation(glow.MODID, "dandelion_item"));

^ that is in the direction of registration

singleTexture(Registration.RUBBER_BAND.getId().getPath(), mcLoc("merchandise/generated"), "layer0", modLoc("merchandise/rubber_band"));

^ that is in the direction of ItemModelProvider


^ these are the tags

add(Registration.RUBBER_BAND.get(), "Rubber band");

^ that is the title

I’m following this tutorial and this tutorial to get the format organized (and perceive issues higher). I’m additionally utilizing this doc to see what I am on the lookout for, although I am nonetheless not getting an excellent grasp on studying it.

As soon as extra, my aim is to have the ability to craft the rubber band. Additionally, that is for sport 1.18.2. Thanks upfront!



Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments