Update RedstoneMachine.java

This commit is contained in:
fuj1n committed 2013-07-12 15:41:40 +10:00
1 parent fc867eddab
commit 7abe5cef86
1 file changed
+7 -6
@@ -36,14 +36,15 @@ public class RedstoneMachine extends InventoryBlock
@Override
public int getLightValue(IBlockAccess world, int x, int y, int z) {
TileEntityLandmine te = (TileEntityLandmine) world.getBlockTileEntity(x, y, z);
if(te != null){
if(te.getStackInSlot(3) != null){
return lightValue[te.getStackInSlot(1).itemID];
if(world.getBlockMetadata(x, y, z) == 0){
DrawbridgeLogic te = (DrawbridgeLogic) world.getBlockTileEntity(x, y, z);
if(te != null){
if(te.getStackInSlot(3) != null){
return lightValue[te.getStackInSlot(1).itemID];
}
}
}
return super.getLightValue(world, x, y, z);
}