mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-23 21:49:45 +00:00
Merge pull request #44 from fuj1n/patch-1
Made the block mimic the light value of the camo block.
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user