@Override public void updateEntity() { super.updateEntity(); if (!worldObj.isRemote) { if (activated.getValue() && _redstoneAnimTimer > 0) _redstoneAnimTimer--; if (activated.getValue() && _redstoneAnimTimer <= 0) { activated.setValue(false); } sync(); } }
public void setRedstoneSignal(boolean redstoneSignal) { if (redstoneSignal != _redstoneSignal) { _redstoneSignal = redstoneSignal; if (_redstoneSignal) { if (!worldObj.isRemote) { _redstoneAnimTimer = 5; activated.setValue(true); sync(); } breakBlock(); } } }
@SideOnly(Side.CLIENT) public boolean isActivated() { return activated.getValue(); }