From e708d3e6b281066e6ebae8f15f6572bbc1c08b6f Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Tue, 11 Feb 2025 01:17:34 +0700 Subject: [PATCH] There is no need for "greedy" strategy when searching for extra cable paths --- .../mc/otm/block/entity/cable/EnergyCableGraph.kt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/cable/EnergyCableGraph.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/cable/EnergyCableGraph.kt index 2e5dbd9c0..c00d7d159 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/cable/EnergyCableGraph.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/cable/EnergyCableGraph.kt @@ -10,6 +10,9 @@ import ru.dbotthepony.mc.otm.UNIVERSE_TICKS import ru.dbotthepony.mc.otm.capability.receiveEnergy import ru.dbotthepony.mc.otm.config.CablesConfig import ru.dbotthepony.mc.otm.core.addAll +import ru.dbotthepony.mc.otm.core.collect.map +import ru.dbotthepony.mc.otm.core.collect.max +import ru.dbotthepony.mc.otm.core.collect.reduce import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.core.math.RelativeSide import ru.dbotthepony.mc.otm.core.shuffle @@ -168,6 +171,11 @@ class EnergyCableGraph : GraphNodeList