Added a priority to IAEPowerStorage (#4473)
Added a priority to IAEPowerStorage
This commit is contained in:
@@ -36,8 +36,10 @@ import appeng.util.SettingsFrom;
|
||||
|
||||
public class EnergyCellTileEntity extends AENetworkTileEntity implements IAEPowerStorage {
|
||||
|
||||
private static final double MAX_STORED = 200000.0;
|
||||
|
||||
private double internalCurrentPower = 0.0;
|
||||
private double internalMaxPower = 200000.0;
|
||||
private double internalMaxPower = MAX_STORED;
|
||||
|
||||
private byte currentMeta = -1;
|
||||
|
||||
@@ -179,6 +181,11 @@ public class EnergyCellTileEntity extends AENetworkTileEntity implements IAEPowe
|
||||
return pm.divide(this.extractAEPower(pm.multiply(amt), mode));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriority() {
|
||||
return 200;
|
||||
}
|
||||
|
||||
private double extractAEPower(double amt, final Actionable mode) {
|
||||
if (mode == Actionable.SIMULATE) {
|
||||
if (this.internalCurrentPower > amt) {
|
||||
@@ -218,4 +225,5 @@ public class EnergyCellTileEntity extends AENetworkTileEntity implements IAEPowe
|
||||
void setInternalMaxPower(final double internalMaxPower) {
|
||||
this.internalMaxPower = internalMaxPower;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user