Jump to content

Recommended Posts

Posted

Hi, as the title says, my recipe generator doesn't work. Everytime I try to run it, it gives me this error:

Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.world.item.CreativeModeTab.getRecipeFolderName()" because the return value of "net.minecraft.world.item.Item.getItemCategory()" is null
    at TRANSFORMER/[email protected]/net.minecraft.data.recipes.ShapedRecipeBuilder.save(ShapedRecipeBuilder.java:94)
    at TRANSFORMER/[email protected]/net.minecraft.data.recipes.RecipeBuilder.save(RecipeBuilder.java:21)
    at TRANSFORMER/[email protected]/kiwilis.simpleautomation.datagen.Recipes.buildCraftingRecipes(Recipes.java:20)
    at TRANSFORMER/[email protected]/net.minecraft.data.recipes.RecipeProvider.run(RecipeProvider.java:97)
    at TRANSFORMER/[email protected]/net.minecraft.data.DataGenerator.run(DataGenerator.java:44)
    at TRANSFORMER/[email protected]/net.minecraftforge.forge.event.lifecycle.GatherDataEvent$DataGeneratorConfig.lambda$runAll$0(GatherDataEvent.java:112)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.api.LamdbaExceptionUtils.lambda$rethrowConsumer$0(LamdbaExceptionUtils.java:34)
    at java.base/java.util.HashMap$Values.forEach(HashMap.java:1067)
    at TRANSFORMER/[email protected]/net.minecraftforge.forge.event.lifecycle.GatherDataEvent$DataGeneratorConfig.runAll(GatherDataEvent.java:108)
    at TRANSFORMER/[email protected]/net.minecraftforge.fmllegacy.DatagenModLoader.begin(DatagenModLoader.java:59)
    at TRANSFORMER/[email protected]/net.minecraft.data.Main.main(Main.java:65)
    ... 13 more

Log: https://www.toptal.com/developers/hastebin/kafuhaxoya.yaml

My recipe generator class: https://www.toptal.com/developers/hastebin/ulaqajopat.less

Posted

I still can't figure what's happening. Apparently ShapedRecipeBuilder.save() tries to run this.result.getItemCategory(), but this.result is null, but shoudn't this.result already be defined by ShapedRecipeBuilder.shaped()?

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



×
×
  • Create New...

Important Information

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