Naming improvements

This commit is contained in:
Sebastian Hartte
2020-07-19 13:16:50 +02:00
parent 223163aa0a
commit 71a91e51fb
+7 -7
View File
@@ -822,21 +822,21 @@ public class Platform {
Preconditions.checkNotNull(src);
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();
if (possible != null) {
stored -= possible.getStackSize();
long transferAmount = input.getStackSize();
if (overflow != null) {
transferAmount -= overflow.getStackSize();
}
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);
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 (mode == Actionable.MODULATE) {
energy.extractAEPower(stored / energyFactor, Actionable.MODULATE, PowerMultiplier.CONFIG);
energy.extractAEPower(transferAmount / energyFactor, Actionable.MODULATE, PowerMultiplier.CONFIG);
if (itemToAdd < input.getStackSize()) {
final long original = input.getStackSize();
final T leftover = input.copy();