Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

#build strictly compares block attributes

EntityinArray opened this issue ยท 2 comments

commented

Some information

Operating system: Windowos 10
Java version: 21
Minecraft version: 1.20.4
Baritone version: baritone-standalone-fabric-1.10.2.jar
Other mods (if used):

baritone-standalone-fabric-1.10.2.jar
cloth-config-13.0.121-fabric.jar
fabric-api-0.97.0+1.20.4.jar
fabric-language-kotlin-1.10.20+kotlin.1.9.24.jar
indium-1.0.30+mc1.20.4.jar
iris-1.7.0+mc1.20.4.jar
litematica-fabric-1.20.4-0.17.2.jar
malilib-fabric-1.20.4-0.18.1.jar
modmenu-9.2.0-beta.2.jar
reeses_sodium_options-1.7.2+mc1.20.4-build.102.jar
sodium-fabric-0.5.8+mc1.20.4.jar
worldedit-mod-7.3.0.jar
WorldEditCUI-1.20.3+01.jar
WorldTools-fabric-1.2.4+1.20.4.jar

Exception, error or logs

[07:35:52] [Render thread/INFO]: [CHAT] [Baritone] > r
[07:35:52] [Render thread/INFO]: [CHAT] [Baritone] Not paused
[07:35:52] [Render thread/INFO]: [CHAT] [Baritone] Missing materials for at least:
[07:35:52] [Render thread/INFO]: [CHAT] [Baritone] 1x Block{minecraft:barrel}[facing=up,open=false]
[07:35:52] [Render thread/INFO]: [CHAT] [Baritone] Unable to do it. Pausing. resume to resume, cancel to cancel

javaw_4ISwTnvWHe
latest.log

How to reproduce

  1. Have a schematic with a barrel[facing=up,open=false]
  2. Baritone will complain that it lacks resources, even though you have barrels in inv

Modified settings

[07:42:22] [Render thread/INFO]: [CHAT] [Baritone] > modified
[07:42:22] [Render thread/INFO]: [CHAT] [Baritone] All modified settings:
[07:42:22] [Render thread/INFO]: [CHAT] [Baritone] buildIgnoreExisting (Boolean) (true)
[07:42:22] [Render thread/INFO]: [CHAT] [Baritone] buildInLayers (Boolean) (true)
[07:42:22] [Render thread/INFO]: [CHAT] [Baritone] --
[07:42:22] [Render thread/INFO]: [CHAT] [Baritone] --
[07:42:22] [Render thread/INFO]: [CHAT] [Baritone] --
[07:42:22] [Render thread/INFO]: [CHAT] [Baritone] --
[07:42:22] [Render thread/INFO]: [CHAT] [Baritone] --
[07:42:22] [Render thread/INFO]: [CHAT] [Baritone] --
[07:42:22] [Render thread/INFO]: [CHAT] [Baritone] << | >> 1/1

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.
commented

If things were that simple this would be fixed by now. The real problem is getting the blockstates, not comparing them.
The states we want to compare here are "whatever the schematic wants" and "whatever we can place with the items in our inventory". Getting the former is simple but getting the latter is halting-problem-around-the-corner-hard. The current and obviously suboptimal approximation is simulating placing the block at the current position while facing straight down, which breaks for rotatable blocks for obvious reasons.

That error message simply tells you the whole state the schematic requested so you can map that to an item, because figuring out the item to place a specific block state is no easier than figuring out what states an item can place.

All the game provides is "if I happen to place this item right now at my current position with my current rotation, what would be placed if other placement code didn't exist?". Using temporary client side desyncs (setting blocks/position/rotation) you can get a little more, but that's still not enough.
If you have a solution, please let us know.

commented

Oh, I see, thank you for explanation