Crash when being spotted while wearing mining helmet
Laike-Endaril opened this issue ยท 1 comments
Someone reported this on the issue tracker for my own mod, but I confirmed it happens with only Adventure Tools installed (no other mods), so I'm forwarding it to you! Check the link for detailed info.
Alright, I looked into this and it seems as if the problem was the light block I used.
@Override
@Nonnull
@SuppressWarnings("deprecation")
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
return NULL_AABB;
}
The path-finding algorithm calls this and uses the result for nearby blocks at some point, so returning null here causes the NullPointerException.
This should be fixed as it now instead returns
private static AxisAlignedBB Light_Block_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
Perhaps messy, but it works.
Marking as closed.