Refined Storage

Refined Storage

77M Downloads

ItemStacks should never be null

ExpensiveKoala opened this issue ยท 1 comments

commented

https://github.com/raoulvdberge/refinedstorage/blob/mc1.12/src/main/java/com/raoulvdberge/refinedstorage/apiimpl/autocrafting/task/CraftingTask.java#L134

instead of null, it should be ItemStack.EMPTY

Caused an issue with getOutputs and getByproducts of a class implementing the ICraftingPattern interface in creating an InventoryCrafting using the ItemStack array that gets passed in.

commented

That doesn't matter, the crafting task uses null as a symbolic value. It's also an implementation detail, meaning that you can't rely on that behavior.