Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Potential bug in the map and list setting parsers

ZacSharp opened this issue ยท 1 comments

commented

Some information

Operating system: N/A
Java version: N/A
Minecraft version: N/A
Baritone version: can be a problem since ae90121
Other mods (if used): N/A

Exception, error or logs

N/A

The problem

The parsers for lists and maps look up the element types on the setting provided via the context object, use that to get the parsers for their elements and then pass the context on to those parsers. The problem is that if those sub-parsers themselves look up type parameters they will do so on the type of the setting itself and on on the type they are supposed to work on. This did not cause a bug so far because so far all settings of type Map<x,List<y>> are actually of type Map<Block,List<Block>>, using the same type for their keys and the elements of the mapped lists so when the list parser tries to determine the type of list by grabbing the first type parameter there is no difference between operating on Map<x,List<x>> and List<x>.

Note

Fixing this might also provide a good opportunity to make the parser system more usable for #2306 / #3037

Modified settings

N/A

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 myself have not used any OwO's or UwU's in this issue.
commented

This was fixed in #4324.