Class GoalBlock

java.lang.Object
baritone.api.pathing.goals.GoalBlock
All Implemented Interfaces:
Goal, IGoalRenderPos

public class GoalBlock extends Object implements Goal, IGoalRenderPos
A specific BlockPos goal
Author:
leijurv
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    The X block position of this goal
    final int
    The Y block position of this goal
    final int
    The Z block position of this goal
  • Constructor Summary

    Constructors
    Constructor
    Description
    GoalBlock(int x, int y, int z)
     
    GoalBlock(net.minecraft.core.BlockPos pos)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    calculate(double xDiff, int yDiff, double zDiff)
     
    boolean
     
    net.minecraft.core.BlockPos
     
    int
     
    double
    heuristic(int x, int y, int z)
    Estimate the number of ticks it will take to get to the goal
    boolean
    isInGoal(int x, int y, int z)
    Returns whether or not the specified position meets the requirement for this goal based.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface baritone.api.pathing.goals.Goal

    heuristic, heuristic, isInGoal
  • Field Details

    • x

      public final int x
      The X block position of this goal
    • y

      public final int y
      The Y block position of this goal
    • z

      public final int z
      The Z block position of this goal
  • Constructor Details

    • GoalBlock

      public GoalBlock(net.minecraft.core.BlockPos pos)
    • GoalBlock

      public GoalBlock(int x, int y, int z)
  • 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
    • 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
    • getGoalPos

      public net.minecraft.core.BlockPos getGoalPos()
      Specified by:
      getGoalPos in interface IGoalRenderPos
      Returns:
      The position of this goal as a BlockPos
    • calculate

      public static double calculate(double xDiff, int yDiff, double zDiff)