Closed Shmen8980 closed 6 months ago
If getStack()
is null you have something exceptionally wrong in your instance. Catching an NPE here is not a correct nor appropriate solution.
The ItemStack
codec provided by placebo (ItemAdapter.CODEC
) is not able to produce a null either, and that's the only means of creating an AffixLootEntry
, unless you have a mod directly instantiating them or something.
There's an error with GatewaysCompat where if entry.getStack() returns a null value the game will become softlocked and crash on world join. Some variation of the following will fix the issue and cause it to properly generate a log event instead of infinitely crashing.