From 06a621d3700f020bb29005dfdd4640ca392356ea Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Tue, 18 Mar 2025 22:47:26 +0700 Subject: [PATCH] Prioritize chests closer to player first --- .../ru/dbotthepony/mc/otm/network/MatteryPlayerPackets.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryPlayerPackets.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryPlayerPackets.kt index c1ff400fc..697e01acb 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryPlayerPackets.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryPlayerPackets.kt @@ -464,6 +464,8 @@ class QuickStackPacket( if (findCaps.isEmpty()) return + findCaps.sortBy { it.first.blockPos.distToCenterSqr(player.position) } + val eyes = player.eyePosition val ignoreBlockstates = HashSet() findCaps.forEach { (b, _) -> ignoreBlockstates.add(b.blockState) }