Dynamic Trees

Dynamic Trees

25M Downloads

Baritone Pathing nullPointerException errors when trying to path through forests

Argonius-Angelus opened this issue ยท 2 comments

commented

Describe the bug
I raised this issue on the baritone github and one of the contributors directed me here to get this issue fixed.
cabaletta/baritone#2290

I am using Baritone v1.2.14 when this error occurs, and when the pathing has to handle a dense forest of Dynamic Trees, it constantly gives nullPointerException errors in chat until I manually navigate through the forest.

My latest log can be found here:
https://paste.ee/p/PGape

From what I'm understanding from the stack trace (which may be wrong or very limited), it's failing to obtain some necessary block information for Baritone from the trunk?

To Reproduce
Steps to reproduce the behavior:
Try to path out of the middle of any forest using Baritone.

Additional context
The most common way to cause this error is by going into the middle of a forest and trying to get Baritone to path out of it. It can happen with smaller tree numbers, or them being more spaced apart, but it's much more sporadic.

Crashes

  • Are you running the latest version of Dynamic Trees? v0.9.21
  • If you are using the DT Biome O' Plenty Add-on do you have the latest version? v1.4.4

Mods List
If your crash log does not contain a list of mods or you have no crash log then please provide a full list of the mods you are using complete with mod versions.
What version of Forge are you running? 1.12.2-14.23.5.2855

commented

The issue is centered in their getBlockHardness override, however the actual issue is this line no-one on this repo will help you further than this.

Response from the Baritone devs regarding what exactly is causing the error.

commented

The issue is caused by https://github.com/cabaletta/baritone/blob/5eeb33a6f5a971f6052c1a6bf0abc23c3b4f2764/src/main/java/baritone/utils/ToolSet.java#L172

Baritone passes nulls to the get block hardness function so it's natural that the function would error out. It's not impossible that world nor pos be null, but it's somewhat understandable as most blocks don't use these parameters.