Add pulse mode to redstone control.

(I am going somewhere with this)
This commit is contained in:
Ben Spiers committed 2014-09-16 02:47:54 +01:00
1 parent 999e2de8e6
commit e84f176583
20 files changed
+122 -11

No files matched your search

@@ -43,6 +43,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
public int ticker;
public boolean redstone = false;
public boolean redstoneLastTick = false;
public boolean doAutoSync = true;
@@ -72,6 +73,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
}
ticker++;
redstoneLastTick = redstone;
}
public void open(EntityPlayer player)
@@ -227,6 +229,11 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
return redstone;
}
public boolean wasPowered()
{
return redstoneLastTick;
}
public void onNeighborChange(Block block)
{
if(!worldObj.isRemote)