The method being overridden is not annotated @Nullable, it is by-default annotated not-null by mojang's convention and being an ItemStack, it is strongly preferred that you don't return null, rather instead use ItemStack.EMPTY here.
Reason being, some mods (hello!) like to iterate over all recipes, and call .getResultItem(), and expect, given it's an ItemStack returned from a non-null method, to in fact be non-null.
Here:
https://github.com/Lance5057/Butchercraft/blob/1f1b37f3eaef3dbc85d64e1bc48b89a70b6927f6/src/main/java/com/lance5057/butchercraft/workstations/recipes/meathook/HookRecipe.java#L51-L54
The method being overridden is not annotated
@Nullable
, it is by-default annotated not-null by mojang's convention and being anItemStack
, it is strongly preferred that you don't returnnull
, rather instead useItemStack.EMPTY
here.Reason being, some mods (hello!) like to iterate over all recipes, and call
.getResultItem()
, and expect, given it's anItemStack
returned from a non-null method, to in fact be non-null.Thanks!