Toggle throwaway slot
Describe your suggestion
The throwaway slot can be annoying to many individuals, so I'm asking that you either make it only swap when building, or implement my change.
Settings
- to Settings.java:
public final Setting<Boolean> autoMoveThrowawayBlocks = new Setting<>(true);edit to InventoryBehavior.java:if (Baritone.settings().autoMoveThrowawayBlocks.value && firstValidThrowaway() >= 9) { // aka there are none on the hotbar, but there are some in main inventory requestSwapWithHotBar(firstValidThrowaway(), 8); }
Context
Users get annoyed by it automatically adding dirt or cobblestone to their 9th slot when they aren't building, so I thought this would be a useful change! Please add settings for this too if you add it. Thank you :)
Final checklist
- [x] I know how to properly use check boxes
- [x] I have not used any OwO's or UwU's in this issue.
I am aware of allow inventory, I just thought this would be a lot better (especially if you add both, would be useful)
This is how I did it in my fork
From b41b37fb19aa64a5c4486c2c5f0730c5f34d8ba4 Mon Sep 17 00:00:00 2001
From: Babbaj <[email protected]>
Date: Sun, 23 Mar 2025 01:48:42 -0400
Subject: [PATCH] only fill the throwaway slot if we're going to scaffold
---
src/main/java/baritone/behavior/InventoryBehavior.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main/java/baritone/behavior/InventoryBehavior.java b/src/main/java/baritone/behavior/InventoryBehavior.java
index b093b8eb..b756e71c 100644
--- a/src/main/java/baritone/behavior/InventoryBehavior.java
+++ b/src/main/java/baritone/behavior/InventoryBehavior.java
@@ -71,8 +71,11 @@ 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(), THROWAWAY_SLOT);
+ var currentPath = baritone.getPathingBehavior().getCurrent();
+ if (currentPath != null && !currentPath.toPlace().isEmpty()) {
+ if (firstValidThrowaway() >= 9) { // aka there are none on the hotbar, but there are some in main inventory
+ requestSwapWithHotBar(firstValidThrowaway(), THROWAWAY_SLOT);
+ }
}
int anvil = firstValidAnvil();
if (anvil != ANVIL_SLOT && anvil != -1 &&
Patch to achieve something similar, but I haven't actually used it: https://github.com/ZacSharp/baritone/commit/42f5deae773c09f5ff67985bc75fc759a76b6a90