Make Internal wireless redstone work as machine controller
This commit is contained in:
parent
09e0361990
commit
4c17c2beff
1 changed files with 8 additions and 0 deletions
|
@ -2,10 +2,18 @@ package gregtech.common.covers;
|
|||
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.interfaces.tileentity.ICoverable;
|
||||
import gregtech.api.interfaces.tileentity.IMachineProgress;
|
||||
|
||||
public class GT_Cover_RedstoneReceiverInternal
|
||||
extends GT_Cover_RedstoneWirelessBase {
|
||||
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
|
||||
if (aTileEntity instanceof IMachineProgress) {
|
||||
if (getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity) >0)
|
||||
((IMachineProgress) aTileEntity).enableWorking();
|
||||
else
|
||||
((IMachineProgress) aTileEntity).disableWorking();
|
||||
((IMachineProgress) aTileEntity).setWorkDataValue(aInputRedstone);
|
||||
}
|
||||
return aCoverVariable;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue