Repository navigation
Conversation
maxX/maxY/maxZ were taken from minX/minY/minZ instead of themselves, so the box only covered the last position.
distX * distX overflows once a region is ~46k blocks from the player, so whether it got pruned was down to how the overflow happened to land.
toPackMap has soft values, so remove() can return null and ChunkPacker.pack(null) threw an NPE that got printed to the log.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five small bugs, one commit each. None of them is meant to change how Baritone behaves in game.
GoalRunAway.heuristic():maxX/maxY/maxZwere computed fromminX/minY/minZinstead of from themselves, so with several positions the box only covered the last one. Baritone itself only ever builds aGoalRunAwaywith a single position (mine and get to block), where the old code happened to give the same box, so this only matters for API users.GoalAxis.equals(null)threw an NPE instead of returningfalse.CachedWorld.prune():distX * distX + distZ * distZwas done inintand overflows once a region is ~46k blocks from the player. The result could be negative (sqrtgivesNaN) or small, so far away regions could stay in RAM.CachedWorld.PackerThread:toPackMaphas soft values, soremove(pos)can returnnullonce the chunk has been collected, andChunkPacker.pack(null)then threw an NPE that got printed to the log. These are now skipped.ExploreProcess.JsonChunkFilternever closed the reader for the#explorefilterfile, which keeps the file locked on Windows until the next GC.Compiled and ran the existing unit tests with these changes applied.