Directional block placement support in build mode.
Working-Joe opened this issue · 7 comments
Suggestion
I have been playing around with using Baritone for building settings, and I'm quite impressed. From my testing, Baritone can build most structures nearly unsupervised. However, unless I'm overlooking some major feature (I've tried a lot of settings, but to no avail) baritone always pauses builds including directional blocks such as stairs. It may place a couple, but not always in the right direction and occasionally it breaks them again entirely. The simplest testing configuration includes just a couple of stairs in different directions placed on a flat floor.
Problematic blocks include torches (mainly against walls), stairs and slabs.
Allowing proper stair placement would allow much more complex/detailed builds, and would put baritone well over other building tools such as schematica. (:
Settings / implementation.
I fear it wouldn't be too easy to implement, though. The least complex solution I can think of contains at least the following steps:
-Test if the block to be placed is directional.
-Determine the correct relative position to place the block from.
-Place a support block to place the directional block against, unless already present (this step is required, for example upside down stairs have to be placed against a top/side block)
-Navigate to the position to place the block from.
-place the block.
This may cause some problems, however, if this position is not easily reachable. (A good example being an upside down slab above a solid floor.) Baritone may have to break some blocks to get into the required position relative to the block to be placed.
This may be fine, unless the blocks broken are also directional, which would certainly cause a loop. It might be possible to add a setting to add an extra (high) cost for breaking directional blocks.
This still is an issue with any block that can have multiple directions. How has this not been fixed for more than 3 years?
There is no way to tell how a block has to be placed. The game simply doesn't have this information (unless you write the most advanced code analysis ever) and Baritone can't look it up on the internet either.
Hardcoding it would work for just vanilla blocks and then there's still quite some effort making the builder use that knowledge in a way that does not cause countless stupid loops (trying to change builder behavior has a tendency to end up like #3237).