Class Node
java.lang.Object
com.chiefminingdad.autoplayer.node.Node
Stores important information about each Node in the algorithm.
-
Field Summary
FieldsModifier and TypeFieldDescriptionintnet.minecraft.core.Vec3inet.minecraft.core.Vec3iboolean -
Constructor Summary
ConstructorsConstructorDescriptionNode(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 TypeMethodDescriptiondoublebooleanvoidsetSearched(boolean searched) voidsetWeight(double weight) toString()
-
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
-