diff options
author | Blood-Asp <bloodasphendrik@gmail.com> | 2017-05-31 21:37:26 +0200 |
---|---|---|
committer | Blood-Asp <bloodasphendrik@gmail.com> | 2017-05-31 21:37:26 +0200 |
commit | 4c17c2beffdaa88b316ab2797e18d54c8a27cf62 (patch) | |
tree | a6e9204ee96f3c523443e4dda660c3f235ef5415 /src | |
parent | 09e0361990e5842111bd062fce93c9b843b77bda (diff) | |
download | GT5-Unofficial-4c17c2beffdaa88b316ab2797e18d54c8a27cf62.tar.gz GT5-Unofficial-4c17c2beffdaa88b316ab2797e18d54c8a27cf62.tar.bz2 GT5-Unofficial-4c17c2beffdaa88b316ab2797e18d54c8a27cf62.zip |
Make Internal wireless redstone work as machine controller
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java | 8 |
1 files changed, 8 insertions, 0 deletions
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 3af0a7de99..371928ec58 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;
}
|