Non complainant capability provider implementations causing null dereferences
pau101 opened this issue ยท 3 comments
The classes TileEntityModulT1
, TileEntityModulT2
, TileEntityIndustrialFurnace
, and TileEntityBlockPlacer
contain implementations of ICapabilityProvider#getCapability
which erroneously return null
, as opposed to the correct LazyOptional.empty()
, resulting in null dereferences in mods querying capabilities of these blocks.
An instance which I have received of such a crash: pau101/Fairy-Lights#84
Most likely more machines are affected:
if(facing==null)
return null;
This code is used for all machines with configureable sides.
When I checked most with the null facing check do actually return empty, but just some not, but do ensure I didn't miss any.