From cfdae48f52960f473f940dab0af7595eac0c22ca Mon Sep 17 00:00:00 2001 From: 90 Date: Mon, 11 Nov 2024 18:48:04 +0000 Subject: [PATCH] Revert "Better address #20 by taking into account the "amount per operation" when transmuting" This reverts commit 83abf1c8a24c04f9bd8a481379230d23050bcd6a. --- src/main/java/gripe/_90/appliede/AppliedEConfig.java | 3 ++- src/main/java/gripe/_90/appliede/me/service/EMCStorage.java | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/gripe/_90/appliede/AppliedEConfig.java b/src/main/java/gripe/_90/appliede/AppliedEConfig.java index a2a6052..b16518d 100644 --- a/src/main/java/gripe/_90/appliede/AppliedEConfig.java +++ b/src/main/java/gripe/_90/appliede/AppliedEConfig.java @@ -21,7 +21,8 @@ public class AppliedEConfig { private AppliedEConfig(ForgeConfigSpec.Builder builder) { moduleEnergyUsage = builder.comment("The amount of AE energy per tick used by the ME Transmutation Module.") .defineInRange("moduleEnergyUsage", 25.0, 0, Double.MAX_VALUE); - transmutationPowerMultiplier = builder.comment("The amount of AE energy used to transmute items, per 2000 EMC.") + transmutationPowerMultiplier = builder.comment( + "The amount of AE energy used to transmute 1 EMC through the ME Transmutation Module.") .defineInRange("transmutationPowerMultiplier", 1.0, 0, Double.MAX_VALUE); emcPerByte = builder.comment( "The number of EMC units (of any tier) per byte as used in AE2 auto-crafting.", diff --git a/src/main/java/gripe/_90/appliede/me/service/EMCStorage.java b/src/main/java/gripe/_90/appliede/me/service/EMCStorage.java index c771c2b..00785f2 100644 --- a/src/main/java/gripe/_90/appliede/me/service/EMCStorage.java +++ b/src/main/java/gripe/_90/appliede/me/service/EMCStorage.java @@ -24,7 +24,6 @@ import gripe._90.appliede.AppliedE; import gripe._90.appliede.AppliedEConfig; import gripe._90.appliede.me.key.EMCKey; -import gripe._90.appliede.me.key.EMCKeyType; import gripe._90.appliede.menu.TransmutationTerminalMenu; import moze_intel.projecte.api.ItemInfo; @@ -324,8 +323,7 @@ private List getProvidersForExtraction(IActionSource source) private long getAmountAfterPowerExpenditure(BigInteger maxEmc, BigInteger itemEmc) { var energyService = service.getGrid().getEnergyService(); var multiplier = BigDecimal.valueOf(PowerMultiplier.CONFIG.multiplier) - .multiply(BigDecimal.valueOf(AppliedEConfig.CONFIG.getTransmutationPowerMultiplier())) - .divide(BigDecimal.valueOf(EMCKeyType.TYPE.getAmountPerOperation()), 4, RoundingMode.HALF_UP); + .multiply(BigDecimal.valueOf(AppliedEConfig.CONFIG.getTransmutationPowerMultiplier())); var toExpend = new BigDecimal(maxEmc).multiply(multiplier).min(BigDecimal.valueOf(Double.MAX_VALUE)); var available = energyService.extractAEPower(toExpend.doubleValue(), Actionable.SIMULATE, PowerMultiplier.ONE);