Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Baritone tries to place air, and gets stuck in a loop #3399

Open
4 tasks done
XorOwl opened this issue Apr 16, 2022 · 3 comments · May be fixed by #3400
Open
4 tasks done

Baritone tries to place air, and gets stuck in a loop #3399

XorOwl opened this issue Apr 16, 2022 · 3 comments · May be fixed by #3400
Labels
bug Something isn't working

Comments

@XorOwl
Copy link

XorOwl commented Apr 16, 2022

Some information

Operating system: Windows
Java version: dunno, not important for this one
Minecraft version: 1.18.2
Baritone version: 1.8.3
Other mods (if used):
appleskin-fabric-mc1.18.2-2.4.0.jar architectury-4.1.32.jar
baritone-standalone-fabric-1.8.3.jar beehive-tooltips-fabric-1.4.2.jar
BetterF3-1.2.3-Fabric-1.18.2.jar cloth-config-6.2.57-fabric.jar
Clumps-fabric-1.18.2-8.0.0+7.jar Controlling-fabric-1.18.2-9.0+17.jar
entityculling-fabric-mc1.18-1.5.0.jar fabric-api-0.48.0+1.18.2.jar
FPS-Monitor-1.18-1.1.0-Fabric.jar InventoryHUD-fabric-[1.18] -3.4.2.jar
InventorySorter-1.8.6-1.18.jar iris-mc1.18.2-1.2.2-build.32.jar.disabled
light-overlay-6.0.5.jar lithium-fabric-mc1.18.2-0.7.9.jar
malilib-fabric-1.18.2-0.12.1.jar modmenu-3.1.0.jar
morevillagers-FABRIC-1.18.2-3.2.0.jar MouseTweaks-fabric-mc1.18-2.22.jar
notenoughcrashes-4.1.4+1.18.2-fabric.jar phosphor-fabric-mc1.18.x-0.8.1.jar
replaymod-1.18.2-2.6.4.jar RoughlyEnoughItems-8.0.442.jar
sodium-fabric-mc1.18.2-0.4.1+build.15.jar tweakeroo-fabric-1.18.2-0.13.1.jar
wthit-fabric-4.7.3.jar XaerosWorldMap_1.20.4.1_Fabric_1.18.2.jar
Xaeros_Minimap_22.3.1.1_Fabric_1.18.2.jar

9000% sure this modlist wont help you though

Exception, error or logs

Please find your latest.log or debug.log in this folder and attach it to the issue

The error appears as baritone appears to try to put a block down, but cant seem to. It violently disallows you to move anything, the player, the camera, the active toolbar slot, and the empty slot in your hand.
I've seen a few patterns it does, One where it tries to place nothing below it, one where it backs up and moves closer and backs up and moves closer while crouching, or just stopping, and staring at the block it needs to place as hard as it can.

How to reproduce

Add your steps to reproduce the issue/bug experienced here.

if minecraft:air gets added to throwaway items, it tries to PLACE AIR. It decides that you can place air by having an empty inventory slot and right clicking for scaffolding and building and getting places.

Modified settings

To get the modified settings run #modified in game
acceptableThrowawayItems
allowInventory
blocksToAvoidBreaking
replantNetherWart
useSwordToMine

Suggested Solution

Disallow air from being selected as a viable block to place, or ignore it's presence in the acceptableThrowawayItems list.

Final checklist

  • I know how to properly use check boxes
  • I have included the version of Minecraft I'm running, baritone's version and forge mods (if used).
  • I have included logs, exceptions and / or steps to reproduce the issue.
  • I have not used any OwO's or UwU's in this issue.
@XorOwl XorOwl added the bug Something isn't working label Apr 16, 2022
@XorOwl XorOwl changed the title Please add a brief but descriptive title Baritone tries to place air, and gets stuck in a loop Apr 16, 2022
@scorbett123
Copy link
Collaborator

I've got a really simple solution to this for you, don't add air to acceptable throwaway items.

However yes there should probably be some check that scaffolding block can actually be walked on.

@XorOwl
Copy link
Author

XorOwl commented Apr 16, 2022

I've got a really simple solution to this for you, don't add air to acceptable throwaway items.

However yes there should probably be some check that scaffolding block can actually be walked on.

Yeah, i didn't understand that "throwaway" explicitly meant "for scaffolding". I thought it was for throwing out items to make room for others.

I've already written a teensy bit of code to handle the air bit. I'm trying to figure out how to rebuilt it to test it myself before opening a PR

@XorOwl
Copy link
Author

XorOwl commented Apr 16, 2022

I have exhausted myself trying to built this thing. kept getting a sh\r error, finally found the fix for that in another issue, then couldnt get it to build the fabric jar despite passing the flag for it. I give up here, but the gist is, in InventoryBehavior.java, the logic in firstValidThrowaway() should read as

if (
    invy.get(i).getItem() != Item.getItemFromBlock(Blocks.AIR) 
    && Baritone.settings().acceptableThrowawayItems.value.contains(invy.get(i).getItem())
  ) {
      return i;
  }```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants