Skip to content

Commit 7d5c1a8

Browse files
committed
change food slot priority: offhand => hotbar => inventory
1 parent 6100f72 commit 7d5c1a8

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • src/main/java/meteordevelopment/meteorclient/systems/modules/player

src/main/java/meteordevelopment/meteorclient/systems/modules/player/AutoEat.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,18 +269,18 @@ public boolean shouldEat() {
269269

270270
/**
271271
* Finds the best slot to eat from, preferring:
272-
* hotbar => offhand => main inventory (if allowed).
272+
* offhand => hotbar => main inventory (if allowed).
273273
*/
274274
private int findSlot() {
275-
// prefer best in hotbar
276-
int slot = findBestFood(SlotUtils.HOTBAR_START, SlotUtils.HOTBAR_END);
277-
if (slot != -1) return slot;
278-
279-
// if hotbar empty, prefer offhand
275+
// prefer offhand
280276
Item offHandItem = mc.player.getOffHandStack().getItem();
281277
FoodComponent offHandFood = offHandItem.getComponents().get(DataComponentTypes.FOOD);
282278
if (offHandFood != null && !blacklist.get().contains(offHandItem)) return SlotUtils.OFFHAND;
283279

280+
// if offhand empty, prefer best in hotbar
281+
int slot = findBestFood(SlotUtils.HOTBAR_START, SlotUtils.HOTBAR_END);
282+
if (slot != -1) return slot;
283+
284284
// if allowed, search main inventory
285285
if (searchInventory.get()) {
286286
return findBestFood(SlotUtils.MAIN_START, SlotUtils.MAIN_END);

0 commit comments

Comments
 (0)