mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Fix floating flower lightlevel crash
This commit is contained in:
1 parent
512884729e
commit
b9b066617a
1 file changed
+2
-1
@@ -84,7 +84,8 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess world, BlockPos pos) {
|
||||
int currentLight = ((TileSpecialFlower) world.getTileEntity(pos)).getLightValue();
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
int currentLight = tile instanceof TileSpecialFlower ? ((TileSpecialFlower) tile).getLightValue() : -1;
|
||||
if(currentLight == -1)
|
||||
currentLight = originalLight;
|
||||
return LightHelper.getPackedColor(world.getBlockState(pos).getValue(BotaniaStateProps.COLOR), currentLight);
|
||||
|
||||
Reference in new issue
Block a user