From e5e6e2fdbaf45c424c09747043f0ad19661e7a4c Mon Sep 17 00:00:00 2001 From: Pilzinsel64 Date: Mon, 1 May 2023 22:55:20 +0200 Subject: [PATCH] use config for transceiver's energy buffer (#119) --- src/main/java/crazypants/enderio/config/Config.java | 8 ++++++++ .../enderio/machine/transceiver/TileTransceiver.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/crazypants/enderio/config/Config.java b/src/main/java/crazypants/enderio/config/Config.java index 93ddfe0ca3..23eb19701f 100644 --- a/src/main/java/crazypants/enderio/config/Config.java +++ b/src/main/java/crazypants/enderio/config/Config.java @@ -101,6 +101,7 @@ public String lc() { public static int transceiverUpkeepCostRF = 10; public static int transceiverBucketTransmissionCostRF = 100; public static int transceiverMaxIoRF = 20480; + public static int transceiverInternalBuffer = 500000; public static boolean transceiverUseEasyRecipe = false; public static File configDirectory; @@ -1002,6 +1003,13 @@ public static void processConfig(Configuration config) { transceiverMaxIoRF, "Maximum RF/t sent and received by a Dimensional Transceiver per tick. Input and output limits are not cumulative") .getInt(transceiverMaxIoRF); + transceiverInternalBuffer = config + .get( + sectionPower.name, + "transceiverInternalBuffer", + transceiverInternalBuffer, + "Maximum RF for the send/receive buffer. Need to be at least transceiverMaxIoRF.") + .getInt(transceiverInternalBuffer); transceiverBucketTransmissionCostRF = config .get( sectionEfficiency.name, diff --git a/src/main/java/crazypants/enderio/machine/transceiver/TileTransceiver.java b/src/main/java/crazypants/enderio/machine/transceiver/TileTransceiver.java index b2de5b3910..80acbaa130 100644 --- a/src/main/java/crazypants/enderio/machine/transceiver/TileTransceiver.java +++ b/src/main/java/crazypants/enderio/machine/transceiver/TileTransceiver.java @@ -54,7 +54,7 @@ public class TileTransceiver extends AbstractPoweredTaskEntity private final ICapacitor capacitor = new BasicCapacitor( 0, Config.transceiverMaxIoRF * 2, - 500000, + Config.transceiverInternalBuffer, Config.transceiverMaxIoRF); private boolean sendChannelsDirty = false; private boolean recieveChannelsDirty = false;