igentuman / NuclearCraft-Neoteric

This is a re-creation of old but gold NuclearCraft on a modern MC version
https://curseforge.com/minecraft/mc-mods/nuclearcraft-neoteric
MIT License
19 stars 13 forks source link

All NuclearCraft recipes return `null` to `Recipe#getResultItem` which is explicitly not-null #64

Closed alcatrazEscapee closed 4 months ago

alcatrazEscapee commented 4 months ago

The offending code is here:

https://github.com/igentuman/NuclearCraft-Neoteric/blob/700ab034bc7da7abe675c105693dcb25c5b75e70/src/main/java/igentuman/nc/recipes/AbstractRecipe.java#L40-L43

This should be returning ItemStack.EMPTY, not null, as some mods may use getResultItem() for display purposes, and an item stack is generally assumed not to be null. See the Minecraft class CustomRecipe, which is used for vanilla's recipes that have custom behavior, this returns ItemStack.EMPTY. This is also marked @MethodsReturnNonnullByDefault by the package-info.java.