aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java16
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java16
2 files changed, 2 insertions, 30 deletions
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
index 953318c455..e4de13b65d 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
@@ -100,21 +100,7 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter.
}
}
- byte signal = GT_Utility.convertRatioToRedstone(used, max);
-
- if (inverted) {
- signal = (byte) (15 - signal);
- }
-
- if (threshold > 0) {
- if (inverted && used >= threshold) {
- return 0;
- } else if (!inverted && used < threshold) {
- return 0;
- }
- }
-
- return signal;
+ return GT_Utility.convertRatioToRedstone(used, max, threshold, inverted);
}
@Override
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
index 7816e3dd48..48304d3fed 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
@@ -70,21 +70,7 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe
}
}
- byte signal = GT_Utility.convertRatioToRedstone(used, max);
-
- if (inverted) {
- signal = (byte) (15 - signal);
- }
-
- if (threshold > 0) {
- if (inverted && used >= threshold) {
- return 0;
- } else if (!inverted && used < threshold) {
- return 0;
- }
- }
-
- return signal;
+ return GT_Utility.convertRatioToRedstone(used, max, threshold, inverted);
} else {
return 0;
}