Posted November 30, 20213 yr 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
November 30, 20213 yr Author Yes, i also realized that, but where does this method get called from and why does a get() function return null?
November 30, 20213 yr Author 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()?
December 1, 20213 yr Author https://github.com/Kiwilis/simple-automation There's not much there yet, because this project isn't even a week old and I don't have a lot of time to work on it.
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.