From 5f736854a12c0e027b4ba189fb3b9e41e25f9f04 Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Sun, 14 Jun 2026 16:42:33 +0200 Subject: [PATCH 1/2] Fix Litematica detection --- .../utils/schematic/litematica/LitematicaHelper.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/baritone/utils/schematic/litematica/LitematicaHelper.java b/src/main/java/baritone/utils/schematic/litematica/LitematicaHelper.java index febe985d23..9b8fdc7b83 100644 --- a/src/main/java/baritone/utils/schematic/litematica/LitematicaHelper.java +++ b/src/main/java/baritone/utils/schematic/litematica/LitematicaHelper.java @@ -25,7 +25,6 @@ import fi.dy.masa.litematica.schematic.placement.SchematicPlacement; import fi.dy.masa.litematica.schematic.placement.SubRegionPlacement; import fi.dy.masa.litematica.world.SchematicWorldHandler; -import fi.dy.masa.litematica.world.WorldSchematic; import net.minecraft.core.BlockPos; import net.minecraft.core.Vec3i; import net.minecraft.util.Tuple; @@ -37,6 +36,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; +import java.util.function.Supplier; /** * Helper class that provides access or processes data related to Litmatica schematics. @@ -99,7 +99,11 @@ public static Tuple getSchematic(int i) { int minY = Integer.MAX_VALUE; int minZ = Integer.MAX_VALUE; HashMap subRegions = new HashMap<>(); - Level schematicWorld = SchematicWorldHandler.getSchematicWorld(); + + // doing this the normal way class loaded WorldSchematic too early + Supplier supplier = SchematicWorldHandler::getSchematicWorld; + Level schematicWorld = supplier.get(); + for (Map.Entry entry : placement.getEnabledRelativeSubRegionPlacements().entrySet()) { SubRegionPlacement subPlacement = entry.getValue(); Vec3i pos = transform(subPlacement.getPos(), placement.getMirror(), placement.getRotation()); From 8a70635e3a175fbc8e3c655b9f57da567bda93d1 Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Sun, 5 Jul 2026 14:37:25 +0200 Subject: [PATCH 2/2] Only move pickaxe/throwaway to hotbar when active --- .../java/baritone/behavior/InventoryBehavior.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/baritone/behavior/InventoryBehavior.java b/src/main/java/baritone/behavior/InventoryBehavior.java index 43a553d4d8..9d50153522 100644 --- a/src/main/java/baritone/behavior/InventoryBehavior.java +++ b/src/main/java/baritone/behavior/InventoryBehavior.java @@ -65,12 +65,14 @@ public void onTick(TickEvent event) { return; } ticksSinceLastInventoryMove++; - if (firstValidThrowaway() >= 9) { // aka there are none on the hotbar, but there are some in main inventory - requestSwapWithHotBar(firstValidThrowaway(), 8); - } - int pick = bestToolAgainst(Blocks.STONE, PickaxeItem.class); - if (pick >= 9) { - requestSwapWithHotBar(pick, 0); + if (baritone.getPathingBehavior().isPathing()) { + if (firstValidThrowaway() >= 9) { // aka there are none on the hotbar, but there are some in main inventory + requestSwapWithHotBar(firstValidThrowaway(), 8); + } + int pick = bestToolAgainst(Blocks.STONE, PickaxeItem.class); + if (pick >= 9) { + requestSwapWithHotBar(pick, 0); + } } if (lastTickRequestedMove != null) { logDebug("Remembering to move " + lastTickRequestedMove[0] + " " + lastTickRequestedMove[1] + " from a previous tick");