From 7abe5cef86e3cc87e2aa8b83750ac10baaccf91c Mon Sep 17 00:00:00 2001 From: fuj1n Date: Fri, 12 Jul 2013 15:41:40 +1000 Subject: [PATCH] Update RedstoneMachine.java --- mods/tinker/tconstruct/blocks/RedstoneMachine.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mods/tinker/tconstruct/blocks/RedstoneMachine.java b/mods/tinker/tconstruct/blocks/RedstoneMachine.java index 1a5dcfa8..894d7d06 100644 --- a/mods/tinker/tconstruct/blocks/RedstoneMachine.java +++ b/mods/tinker/tconstruct/blocks/RedstoneMachine.java @@ -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); }