diff --git a/mods/tinker/tconstruct/blocks/RedstoneMachine.java b/mods/tinker/tconstruct/blocks/RedstoneMachine.java index 377293b1..6b70ea5a 100644 --- a/mods/tinker/tconstruct/blocks/RedstoneMachine.java +++ b/mods/tinker/tconstruct/blocks/RedstoneMachine.java @@ -34,6 +34,20 @@ public class RedstoneMachine extends InventoryBlock setStepSound(soundMetalFootstep); } + @Override + public int getLightValue(IBlockAccess world, int x, int y, int z) { + 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); + } + @Override public TileEntity createTileEntity (World world, int metadata) { diff --git a/mods/tinker/tconstruct/blocks/logic/DrawbridgeLogic.java b/mods/tinker/tconstruct/blocks/logic/DrawbridgeLogic.java index 48faecf1..e21abcbf 100644 --- a/mods/tinker/tconstruct/blocks/logic/DrawbridgeLogic.java +++ b/mods/tinker/tconstruct/blocks/logic/DrawbridgeLogic.java @@ -354,4 +354,10 @@ public class DrawbridgeLogic extends InventoryLogic implements IFacingLogic, IAc { return extension != 0; } + + @Override + public void onInventoryChanged() { + super.onInventoryChanged(); + this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } }