On a side note, what is up with this getLightValue() function? My coding background isn't really in Java, so I might be missing something, but I went into the source code for it and it looks useless and kind of a rabbit hole.
This is the getLightValue() I called, implemented in net.minecraftforge.common.extensions.IForgeBlockState:
default int getLightValue(IBlockReader world, BlockPos pos)
{
return getBlockState().getBlock().getLightValue(getBlockState(), world, pos);
}
It calls a different getLightValue(), which is in net.minecraftforge.common.extensions.IForgeBlock:
default int getLightValue(BlockState state, IBlockReader world, BlockPos pos)
{
return state.getLightValue();
}
This getLightValue() calls yet another getLightValue(), and it only requires the BlockState to be called. This getLightValue() is in the net.minecraft.block.BlockState:
public int getLightValue() {
return this.lightLevel;
}
Is this a java thing, or just the leftovers of previous versions?