mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
Add pulse mode to redstone control.
(I am going somewhere with this)
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user