Class Waypoint

java.lang.Object
baritone.api.cache.Waypoint
All Implemented Interfaces:
IWaypoint

public class Waypoint extends Object implements IWaypoint
Basic implementation of IWaypoint
Author:
leijurv
  • Constructor Details

    • Waypoint

      public Waypoint(String name, IWaypoint.Tag tag, BetterBlockPos location)
    • Waypoint

      public Waypoint(String name, IWaypoint.Tag tag, BetterBlockPos location, long creationTimestamp)
      Constructor called when a Waypoint is read from disk, adds the creationTimestamp as a parameter so that it is reserved after a waypoint is wrote to the disk.
      Parameters:
      name - The waypoint name
      tag - The waypoint tag
      location - The waypoint location
      creationTimestamp - When the waypoint was created
  • Method Details

    • hashCode

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

      public String getName()
      Specified by:
      getName in interface IWaypoint
      Returns:
      The label for this waypoint
    • getTag

      Description copied from interface: IWaypoint
      Returns the tag for this waypoint. The tag is a category for the waypoint in a sense, it describes the source of the waypoint.
      Specified by:
      getTag in interface IWaypoint
      Returns:
      The waypoint tag
    • getCreationTimestamp

      public long getCreationTimestamp()
      Description copied from interface: IWaypoint
      Returns the unix epoch time in milliseconds that this waypoint was created. This value should only be set once, when the waypoint is initially created, and not when it is being loaded from file.
      Specified by:
      getCreationTimestamp in interface IWaypoint
      Returns:
      The unix epoch milliseconds that this waypoint was created
    • getLocation

      Description copied from interface: IWaypoint
      Returns the actual block position of this waypoint.
      Specified by:
      getLocation in interface IWaypoint
      Returns:
      The block position of this waypoint
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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