[Bug] [Fabric] "NullPointerException: Entry type minecraft:item doesn't exist!" on some mods with custom special crafting recipes..
Tacodiva opened this issue ยท 4 comments
Describe the bug
The following exception is spammed in console once every tick when an effected mod is installed.
java.lang.NullPointerException: Entry type minecraft:item doesn't exist!
at me.shedaniel.rei.impl.common.entry.type.EntryTypeDeferred.getDefinition(EntryTypeDeferred.java:60)
at me.shedaniel.rei.api.common.entry.EntryStack.of(EntryStack.java:64)
at me.shedaniel.rei.api.common.util.EntryStacks.of(EntryStacks.java:57)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ReferencePipeline.java:197
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133) Iterator.java:133
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) Spliterators.java:1801
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) ReferencePipeline.java:762
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276) ReferencePipeline.java:276
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) Spliterators.java:948
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) AbstractPipeline.java:484
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) AbstractPipeline.java:474
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ReduceOps.java:913
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) AbstractPipeline.java:234
at java.base/java.util.stream.LongPipeline.collect(LongPipeline.java:515) LongPipeline.java:515
at me.shedaniel.rei.impl.client.ClientHelperImpl._getInventoryItemsTypes(ClientHelperImpl.java:239)
at me.shedaniel.rei.impl.client.gui.craftable.CraftableFilter.tick(CraftableFilter.java:58)
at me.shedaniel.rei.impl.client.gui.ScreenOverlayImpl.tick(ScreenOverlayImpl.java:143)
at me.shedaniel.rei.impl.client.REIRuntimeImpl.lambda$onInitializeClient$1(REIRuntimeImpl.java:226)
at dev.architectury.event.fabric.EventHandlerImpl.lambda$registerClient$3(EventHandlerImpl.java:52)
at net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents.lambda$static$2(ClientTickEvents.java:65) ClientTickEvents.java:65
at net.minecraft.client.MinecraftClient.handler$zzm000$onEndTick(MinecraftClient.java:3116) MinecraftClient.java:3116
at net.minecraft.client.MinecraftClient.tick(MinecraftClient.java:1843) MinecraftClient.java:1843
at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1125) MinecraftClient.java:1125
at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:746) MinecraftClient.java:746
at net.minecraft.client.main.Main.main(Main.java:191) Main.java:191
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) NativeMethodAccessorImpl.java:78
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) DelegatingMethodAccessorImpl.java:43
at java.base/java.lang.reflect.Method.invoke(Method.java:567) Method.java:567
at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:226) MinecraftGameProvider.java:226
at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:146) Knot.java:146
at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28) KnotClient.java:28
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
Steps to Reproduce
Steps to reproduce the behavior:
- Install an effected mod (my mod https://www.curseforge.com/minecraft/mc-mods/totemic-overhaul has this issue)
- Start the game and observe the console errors
Environment:
- Fabric 1.17
- RoughlyEnoughItems-6.0.262-alpha-fabric
- cloth-config-5.0.34-fabric
- architectury-2.0.16-fabric
Additional Info
Even if this is an issue with my mod, the logs from the error being spammed can quickly reach large sizes, so it's proabbly best this error be handled in a more elegant way. If this is an issue with my mod can somebody enlighten me as to what I'm doing wrong.
In the issue you linked it says that you broke the vanilla recipe book, REI relies on the vanilla recipe book's sync recipe packet to start initialization, the constant spam in the logs is caused by the uninitialized state of REI, would you look into whether your mod is halting the vanilla recipe book packets?
Thanks for the help (I'm still new to this whole modding thing :P). In case anybody else finds this issue it turns out I wasn't passing the ingredients into the abstract constructor of net.minecraft.recipe.SmithingRecipe
. Not sure why this just started causing issues in 1.17 but it's fixed now.