Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Issue with the ToolSaver

randomairborne opened this issue ยท 5 comments

commented

/home/valkyrie_pilot/Mod Raw Files/baritone-1.16.2/src/main/java/baritone/behavior/InventoryBehavior.java:120: error: cannot find symbol
if (speed > bestSpeed && !(stack.getItemDamage() >= stack.getMaxDamage() && Baritone.settings().itemSaver.value && stack.getMaxDamage() > 1)) {
^
symbol: method getItemDamage()
location: variable stack of type ItemStack
/home/valkyrie_pilot/Mod Raw Files/baritone-1.16.2/src/main/java/baritone/utils/ToolSet.java:120: error: cannot find symbol
if (itemStack.getItemDamage() >= itemStack.getMaxDamage() && Baritone.settings().itemSaver.value && itemStack.getMaxDamage() > 1) {
^
symbol: method getItemDamage()
location: variable itemStack of type ItemStack
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors

I manually added the code for toolsaver, and get this error.

Final checklist

  • I know how to properly use check boxes
  • I have not used any OwO's or UwU's in this issue.
commented

I'll fix this when merging upstream, if I find time

commented

thanks!

commented

I still get errors, bur less errors.

/home/valkyrie_pilot/Mod Raw Files/baritone-1.16.2/src/main/java/baritone/utils/ToolSet.java:120: error: cannot find symbol
            if (itemStack.getItemDamage() >= itemStack.getMaxDamage() && Baritone.settings().itemSaver.value && itemStack.getMaxDamage() > 1) {
                         ^
  symbol:   method getItemDamage()
  location: variable itemStack of type ItemStack
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

edit: wow that was stupid of me, one sec

commented

OK, I got it working by not being dumb and also just deleting the word item. It works fine.

commented

I believe in 1.16.2 instead of getItemDamage() you need to use getDamage().