aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/power/Power.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common/power/Power.java')
-rw-r--r--src/main/java/gregtech/common/power/Power.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/power/Power.java b/src/main/java/gregtech/common/power/Power.java
index 13d1cc37c1..0c80c43bf3 100644
--- a/src/main/java/gregtech/common/power/Power.java
+++ b/src/main/java/gregtech/common/power/Power.java
@@ -7,9 +7,15 @@ public abstract class Power {
protected final byte tier;
protected int recipeEuPerTick;
protected int recipeDuration;
+ protected final int specialValue;
public Power(byte tier) {
+ this(tier, 0);
+ }
+
+ public Power(byte tier, int specialValue) {
this.tier = tier;
+ this.specialValue = specialValue;
}
public byte getTier() {
@@ -23,6 +29,10 @@ public abstract class Power {
*/
public abstract void computePowerUsageAndDuration(int euPerTick, int duration);
+ public void computePowerUsageAndDuration(int euPerTick, int duration, int specialValue) {
+ computePowerUsageAndDuration(euPerTick, duration);
+ }
+
public int getEuPerTick() {
return recipeEuPerTick;
}
@@ -53,4 +63,11 @@ public abstract class Power {
public abstract String getVoltageString();
public abstract String getAmperageString();
+
+ public int compareTo(byte tier, int specialValue) {
+ if (this.tier != tier) {
+ return this.tier - tier;
+ }
+ return this.specialValue - specialValue;
+ }
}