Naming improvements
This commit is contained in:
@@ -822,21 +822,21 @@ public class Platform {
|
|||||||
Preconditions.checkNotNull(src);
|
Preconditions.checkNotNull(src);
|
||||||
Preconditions.checkNotNull(mode);
|
Preconditions.checkNotNull(mode);
|
||||||
|
|
||||||
final T possible = cell.injectItems(input.copy(), Actionable.SIMULATE, src);
|
final T overflow = cell.injectItems(input.copy(), Actionable.SIMULATE, src);
|
||||||
|
|
||||||
long stored = input.getStackSize();
|
long transferAmount = input.getStackSize();
|
||||||
if (possible != null) {
|
if (overflow != null) {
|
||||||
stored -= possible.getStackSize();
|
transferAmount -= overflow.getStackSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
final double energyFactor = Math.max(1.0, cell.getChannel().transferFactor());
|
final double energyFactor = Math.max(1.0, cell.getChannel().transferFactor());
|
||||||
final double availablePower = energy.extractAEPower(stored / energyFactor, Actionable.SIMULATE,
|
final double availablePower = energy.extractAEPower(transferAmount / energyFactor, Actionable.SIMULATE,
|
||||||
PowerMultiplier.CONFIG);
|
PowerMultiplier.CONFIG);
|
||||||
final long itemToAdd = Math.min((long) ((availablePower * energyFactor) + 0.9), stored);
|
final long itemToAdd = Math.min((long) ((availablePower * energyFactor) + 0.9), transferAmount);
|
||||||
|
|
||||||
if (itemToAdd > 0) {
|
if (itemToAdd > 0) {
|
||||||
if (mode == Actionable.MODULATE) {
|
if (mode == Actionable.MODULATE) {
|
||||||
energy.extractAEPower(stored / energyFactor, Actionable.MODULATE, PowerMultiplier.CONFIG);
|
energy.extractAEPower(transferAmount / energyFactor, Actionable.MODULATE, PowerMultiplier.CONFIG);
|
||||||
if (itemToAdd < input.getStackSize()) {
|
if (itemToAdd < input.getStackSize()) {
|
||||||
final long original = input.getStackSize();
|
final long original = input.getStackSize();
|
||||||
final T leftover = input.copy();
|
final T leftover = input.copy();
|
||||||
|
|||||||
Reference in New Issue
Block a user