From 4c17c2beffdaa88b316ab2797e18d54c8a27cf62 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 31 May 2017 21:37:26 +0200 Subject: [PATCH] Make Internal wireless redstone work as machine controller --- .../common/covers/GT_Cover_RedstoneReceiverInternal.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java index 3af0a7de..371928ec 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java @@ -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; }