Class Node

java.lang.Object
com.chiefminingdad.autoplayer.node.Node

public class Node extends Object
Stores important information about each Node in the algorithm.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
     
    net.minecraft.core.Vec3i
     
    net.minecraft.core.Vec3i
     
    boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Node(net.minecraft.core.Vec3i location)
    For when a temporary node with just a location is required.
    Node(net.minecraft.core.Vec3i location, int layer)
    Used for the starting Node as it does not have a previous Node.
    Node(net.minecraft.core.Vec3i location, net.minecraft.core.Vec3i previousLocation)
    Should not be used as does not have the important information for Nodes to be used.
    Node(net.minecraft.core.Vec3i location, net.minecraft.core.Vec3i previousLocation, int layer)
    Basic constructor for Node.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
     
    boolean
     
    void
    setSearched(boolean searched)
     
    void
    setWeight(double weight)
     
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • location

      public net.minecraft.core.Vec3i location
    • previousLocation

      public net.minecraft.core.Vec3i previousLocation
    • layer

      public int layer
    • searched

      public boolean searched
  • Constructor Details

    • Node

      public Node(net.minecraft.core.Vec3i location, net.minecraft.core.Vec3i previousLocation)
      Should not be used as does not have the important information for Nodes to be used.
      Parameters:
      location - Location of the Node.
      previousLocation - Location of the Parent Node.
    • Node

      public Node(net.minecraft.core.Vec3i location, net.minecraft.core.Vec3i previousLocation, int layer)
      Basic constructor for Node. Includes all needed information for a basic Node.
      Parameters:
      location - Location of the Node.
      previousLocation - Location of the Parent Node.
      layer - The "layer" of the search tree the Node is in. Should be 0 for this constructor. Used to limit search depth.
    • Node

      public Node(net.minecraft.core.Vec3i location)
      For when a temporary node with just a location is required.
      Parameters:
      location - The location of the Node.
    • Node

      public Node(net.minecraft.core.Vec3i location, int layer)
      Used for the starting Node as it does not have a previous Node.
      Parameters:
      location - The location of the Node.
      layer - The "layer" of the search tree the Node is in. Should be 0 for this constructor. Used to limit search depth.
  • Method Details

    • getWeight

      public double getWeight()
    • setWeight

      public void setWeight(double weight)
    • isSearched

      public boolean isSearched()
    • setSearched

      public void setSearched(boolean searched)
    • toString

      public String toString()
      Overrides:
      toString in class Object