cabaletta / cabaletta/baritone

allowPlace does not always disallow placing

Open
#1,838 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
9.2k
Forks
2.1k
Avg merge
4d 3h
Merged PRs (30d)
3

Description

## Some information
Operating system: Windows 10
Java version:AdoptOpenJDK jdk-8.0.222.10-hotspot
Minecraft version: 1.12.2 (happens on 1.15.2 too)
Baritone version: 1.2.14

## Exception, error or logs
No exceptions thrown, but here it is.
[latest.zip](https://github.com/cabaletta/baritone/files/4854330/latest.zip)

## How to reproduce

### Preparation
1. Create a superflat world with the default grassy preset.
2. Grow a 2x2 spruce tree.
3. Select the tree by `#sel pos1` `#sel pos2` `#sel ex a up 80`.
4. Give yourself a diamond axe, a stack of dirt, and go into survival.
5. Run `#sel r log air` (or spruce_log for 1.15.2).

After the algorithm removes the bottom part, it suddenly realizes that it cannot reach the higher ones and tries to figure a way out. Somehow the temptation of all the blocks above makes it decide to place dirt and get itself up. Something similar happens when I have allowPlace on but am carrying no throwaway blocks.

A consequence of this problem is that tree removal can be quite suboptimal and really waste shovel durability. I only managed to coax baritone into doing a spiral once and I have already forgotten how.

## Modified settings
allowPlace (false)
chatControl (I have impact :/)

## Final checklist
- [x] I know how to properly use check boxes
- [x] I have included the version of Minecraft I'm running, baritone's version and forge mods (if used).
- [x] I have included steps to reproduce the issue.
- [x] I have not used any OwO's or UwU's in this issue.

* * *
A possible culprit is c780454b7888b00683f3e4b9047ab0d8a77ad6eb. The comment never actually made sense: there is no such thing as overflowing to negative in floating point. `double` only overflows to positive or negative infinity.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.