Special flower lighting crash

This commit is contained in:
Vincent Lee committed 2016-01-09 19:31:58 -06:00
1 parent 57398723a4
commit a6899a9f40
1 file changed
+1 -1
@@ -160,7 +160,7 @@ public class BlockSpecialFlower extends BlockFlower implements ITileEntityProvid
@Override
public int getLightValue(IBlockAccess world, BlockPos pos) {
int currentLight = ((TileSpecialFlower) world.getTileEntity(pos)).getLightValue();
int currentLight = world.getTileEntity(pos) == null ? -1 : ((TileSpecialFlower) world.getTileEntity(pos)).getLightValue();
if(currentLight == -1)
currentLight = 0;
return LightHelper.getPackedColor(world.getBlockState(pos).getValue(BotaniaStateProps.COLOR), currentLight);