Merge pull request #44 from fuj1n/patch-1

Made the block mimic the light value of the camo block.
This commit is contained in:
mDiyo committed 2013-07-11 22:48:03 -07:00
commit 9c654ecb62
2 files changed
+20

No files matched your search

@@ -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)
{
@@ -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);
}
}