Class GoalYLevel

java.lang.Object
baritone.api.pathing.goals.GoalYLevel
All Implemented Interfaces:
Goal, ActionCosts

public class GoalYLevel extends Object implements Goal, ActionCosts
Useful for mining (getting to diamond / iron level)
Author:
leijurv
  • Field Details

    • level

      public final int level
      The target Y level
  • Constructor Details

  • Method Details

    • isInGoal

      public boolean isInGoal(int x, int y, int z)
      Description copied from interface: Goal
      Returns whether or not the specified position meets the requirement for this goal based.
      Specified by:
      isInGoal in interface Goal
      Parameters:
      x - The goal X position
      y - The goal Y position
      z - The goal Z position
      Returns:
      Whether or not it satisfies this goal
    • heuristic

      public double heuristic(int x, int y, int z)
      Description copied from interface: Goal
      Estimate the number of ticks it will take to get to the goal
      Specified by:
      heuristic in interface Goal
      Parameters:
      x - The goal X position
      y - The goal Y position
      z - The goal Z position
      Returns:
      The estimate number of ticks to satisfy the goal
    • calculate

      public static double calculate(int goalY, int currentY)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object