Jump to content

Setting output path for generated custom recipes


MistaOmega

Recommended Posts

Hello all, new day, new low effort meme

spacer.png

 

On to the problem, I've decided to do datagen for the recipes for my grinder, which you can see here:
https://github.com/MistaOmega/Opes/blob/master/src/main/java/mistaomega/opes/datagen/GrindingRecipeBuilder.java

It's basically a slightly rewritten ShapedRecipeBuilder without things like keys and whatnot

 

The thing I would like to do is set a constant location for what I make, say for example, I need a recipe for diamonds from diamond ore, this will go under opes/recipes/grinder/diamond.json

I thought this line would be the culprit: https://github.com/MistaOmega/Opes/blob/master/src/main/java/mistaomega/opes/datagen/GrindingRecipeBuilder.java#L84

More importantly the "pathIn" field, but no matter what I change it to, it always outputs as minecraft/recipes/diamond.json

 

Where could I set this file path so that it goes where I would like it to?

 

Thank you all, covid safe hugs to whoever has the big brain to solve❤️

~Omega

Edited by MistaOmega
Link to comment
Share on other sites

You use the #build(Consumer) overload of your GrindingRecipeBuilder, which uses the registry name of the result ItemStack for the recipe ID. In all of your cases, the items come from vanilla Minecraft ("minecraft:diamond", "minecraft:glowstone", etc.), meaning the recipe ID is the same so they are stored under the "minecraft" namespace. Use the #build(Consumer, ResourceLocation) overload to pass in your own custom recipe ID ("opes:grinder/diamond" for 'data/opes/recipes/grinder/diamond').

  • Thanks 1
Link to comment
Share on other sites

8 hours ago, sciwhiz12 said:

You use the #build(Consumer) overload of your GrindingRecipeBuilder, which uses the registry name of the result ItemStack for the recipe ID. In all of your cases, the items come from vanilla Minecraft ("minecraft:diamond", "minecraft:glowstone", etc.), meaning the recipe ID is the same so they are stored under the "minecraft" namespace. Use the #build(Consumer, ResourceLocation) overload to pass in your own custom recipe ID ("opes:grinder/diamond" for 'data/opes/recipes/grinder/diamond').

 

10 hours ago, poopoodice said:

Not sure but you did not pass your mod id into the resource location?

Thank you both :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Create didn't work but i did figure out the issue, it was everycompat, my assumption with my coding experience was that since it was index out of bounds there was a mod adding too many items that caused the items index to be out of bounds, now i have to knowledge of the backend of minecraft so it was just a assumption so i just tested removing different mods that added a lot of blocks and everycompat was the problem.
    • So I got into the client thanks to someone on the forge discord and got a server up and running, but now I'm trying to join the server but I keep getting this error when I try and join, and I cant figure it out. can anyone help me out? https://pastebin.com/9Kv7p1wn
    • Hello everyone , I am trying to develop an AI controlled player with the help of dl4j using reinforcement learning.   Unfortunatly when i try to add it to my gradle as shown in this link My Build won't work with this error: A problem occurred starting process 'command 'C:\Program Files\Java\jdk-17\bin\java.exe'' > Could not start 'C:\Program Files\Java\jdk-17\bin\java.exe' > Cannot run program "C:\Program Files\Java\jdk-17\bin\java.exe" (in directory "E:\minecraft_mod\build\reobfJar"): CreateProcess error=206,The filename or extension is too long > CreateProcess error=206, The filename or extension is too long I litteraly just spent 4 hours searching for solutions but none of them would work. The command size limitation made by windows is creating this error , there is a workaround in intelliJ , name "Shorten command lines" but it is only for application lauching. I found  this solution for gradle but it also doesn't work. Most of the solution that i found were used for spring application using gradle so i am afraid it need more configuration for forge or it just won't work.
    • Thank you! But, it still isnt working..   https://mclo.gs/ypYZRbM I have a new Log.  
    • Thanks! It solved my bugs, all the mods loaded.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.