aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/covers
diff options
context:
space:
mode:
authorJohannes Gäßler <updrn@student.kit.edu>2017-06-04 20:31:28 +0200
committerJohannes Gäßler <updrn@student.kit.edu>2017-06-04 20:31:28 +0200
commite42ddd911a60fd58e1c5908b2206ad6afc1a9f96 (patch)
treeb9da75675f440cd264e0d91a58a8fd1bb9d5795b /src/main/java/gregtech/common/covers
parentd0247a5d73dc5074dba989b8ff6560a9023eebfb (diff)
parent7eb176f3a2334246229c6fc556c806e5f6a1ff03 (diff)
downloadGT5-Unofficial-e42ddd911a60fd58e1c5908b2206ad6afc1a9f96.tar.gz
GT5-Unofficial-e42ddd911a60fd58e1c5908b2206ad6afc1a9f96.tar.bz2
GT5-Unofficial-e42ddd911a60fd58e1c5908b2206ad6afc1a9f96.zip
Merge branch 'ChemistryUpdate' of https://github.com/JohannesGaessler/GT5-Unofficial into ChemistryUpdate
Diffstat (limited to 'src/main/java/gregtech/common/covers')
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java4
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java8
2 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
index 9c61f4feee..d76a05117b 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
@@ -57,8 +57,8 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior {
if(aCoverVariable <0){aCoverVariable = 2;}
switch(aCoverVariable) {
case 0: GT_Utility.sendChatToPlayer(aPlayer, "Emit if any Player is close"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Emit if you are close"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Emit if other player is close"); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, "Emit if other player is close"); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, "Emit if you are close"); break;
}
return aCoverVariable;
}
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;
}