I wrote the IItemHandler code for 1.10.2 when null stacks were still a thing. Now we have ItemStack.EMPTY and the getStackInSlot is marked as @Nonnull, this should be updated to say the returned value should never be null.
Are the annotations fixed? Only the annotations really matter
The javadoc shouldn't disagree with the annotation though.
I'd like to request that extractItem (and possibly insertItem) explicitly mention whether the returned stack can (or cannot) be modified. I've seen a few mods who return their internal stack on simulate, and dupes pop up when other mods modify that (because they expected it to be a copy already)
Also, there's this bit of javadoc:
* If the result is not null but the stack size is zero, then it represents
* an empty slot that will only accept* a specific itemstack.
Stack size zero? Completely impossible.
Fixed here: bbd4d8d
Most helpful comment
The javadoc shouldn't disagree with the annotation though.
I'd like to request that
extractItem(and possiblyinsertItem) explicitly mention whether the returned stack can (or cannot) be modified. I've seen a few mods who return their internal stack on simulate, and dupes pop up when other mods modify that (because they expected it to be a copy already)