Class CustomWebPath
- java.lang.Object
- 
- org.dreambot.api.methods.walking.web.node.CustomWebPath
 
- 
 public class CustomWebPath extends java.lang.ObjectCustomWebPath is a helper class that makes creating and attaching custom web nodes to our standard web nodes easier
- 
- 
Constructor SummaryConstructors Constructor Description CustomWebPath(boolean connect, AbstractWebNode... nodes)Adds each web node to this custom web node path If connect is true, each node will have a two way connection to the previous nodeCustomWebPath(Tile... tiles)Creates a newBasicWebNodefor each Tile with two way connections between each nodeCustomWebPath(AbstractWebNode... nodes)seeCustomWebPath(boolean, AbstractWebNode...)with a default boolean of True
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNode(Tile tile)seeaddNode(Tile, boolean)with default of TruevoidaddNode(Tile tile, boolean twoWay)Creates aBasicWebNodeand adds it to this custom web path usingaddNode(AbstractWebNode, boolean)voidaddNode(AbstractWebNode node)Adds a web node to this custom path usingaddNode(AbstractWebNode, boolean)with a default of TruevoidaddNode(AbstractWebNode node, boolean twoWay)Adds a web node to the end of this path's list.voidaddNodes(Tile... tiles)Adds each Tile usingaddNode(Tile, boolean)with a default of TruevoidaddNodes(AbstractWebNode... nodes)Adds each node usingaddNode(AbstractWebNode, boolean)with a default of TruevoidattachToWeb()Attaches this custom web path into the global webbooleanattachToWeb(boolean attachStart, boolean attachEnd)Attaches this custom web path into the global web Will automatically callconnectStartToClosestNode()andconnectEndToClosestNode()based on the parameters passedbooleanconnectEndToClosestNode()This will connect the end of this path to the nearest BasicWebNode whenattachToWeb()orWebFinder.addCustomWebPath(CustomWebPath)is calledbooleanconnectStartToClosestNode()This will connect the start of this path to the nearest BasicWebNode whenattachToWeb()orWebFinder.addCustomWebPath(CustomWebPath)is called for this path This will NOT cadd this path to the full global web.voidconnectToEnd(int nodeIndex)This will connect the end of this path to the provided node index whenattachToWeb()orWebFinder.addCustomWebPath(CustomWebPath)is called for this path This will NOT connect this path to the full global webvoidconnectToStart(int nodeIndex)This will connect the start of this path to the provided node index whenattachToWeb()orWebFinder.addCustomWebPath(CustomWebPath)is called for this path This will NOT add this path to the full global web.AbstractWebNodegetEnd()java.util.ArrayList<AbstractWebNode>getNodes()AbstractWebNodegetStart()
 
- 
- 
- 
Constructor Detail- 
CustomWebPathpublic CustomWebPath(Tile... tiles) Creates a newBasicWebNodefor each Tile with two way connections between each node- Parameters:
- tiles-- Tiles to add to the custom web path
 
 - 
CustomWebPathpublic CustomWebPath(AbstractWebNode... nodes) seeCustomWebPath(boolean, AbstractWebNode...)with a default boolean of True
 - 
CustomWebPathpublic CustomWebPath(boolean connect, AbstractWebNode... nodes)Adds each web node to this custom web node path If connect is true, each node will have a two way connection to the previous node- Parameters:
- connect- If True will add two way connections, if False the connection will be one way from previous to current
- nodes-- AbstractWebNodenodes to add to this path
 
 
- 
 - 
Method Detail- 
addNodepublic void addNode(Tile tile) seeaddNode(Tile, boolean)with default of True
 - 
addNodespublic void addNodes(Tile... tiles) Adds each Tile usingaddNode(Tile, boolean)with a default of True
 - 
addNodespublic void addNodes(AbstractWebNode... nodes) Adds each node usingaddNode(AbstractWebNode, boolean)with a default of True
 - 
addNodepublic void addNode(Tile tile, boolean twoWay) Creates aBasicWebNodeand adds it to this custom web path usingaddNode(AbstractWebNode, boolean)- Parameters:
- tile- Tile to add as a- BasicWebNode
- twoWay- whether the connection should be two way or not to the current last node
 
 - 
addNodepublic void addNode(AbstractWebNode node) Adds a web node to this custom path usingaddNode(AbstractWebNode, boolean)with a default of True
 - 
addNodepublic void addNode(AbstractWebNode node, boolean twoWay) Adds a web node to the end of this path's list. If twoWay is true, it will do a two way connection to the previous node.- Parameters:
- node-- AbstractWebNodeto add to the end of the list
- twoWay- boolean whether the connection should be two way or one way
 
 - 
connectToStartpublic void connectToStart(int nodeIndex) This will connect the start of this path to the provided node index whenattachToWeb()orWebFinder.addCustomWebPath(CustomWebPath)is called for this path This will NOT add this path to the full global web.- Parameters:
- nodeIndex- The index of the AbstractWebNode to attach this path to
 
 - 
connectStartToClosestNodepublic boolean connectStartToClosestNode() This will connect the start of this path to the nearest BasicWebNode whenattachToWeb()orWebFinder.addCustomWebPath(CustomWebPath)is called for this path This will NOT cadd this path to the full global web.- Returns:
- true if there's a node within 32 tiles to attach it to, false otherwise
 
 - 
connectEndToClosestNodepublic boolean connectEndToClosestNode() This will connect the end of this path to the nearest BasicWebNode whenattachToWeb()orWebFinder.addCustomWebPath(CustomWebPath)is calledNote: This should only be called after all web nodes are added, otherwise it'll attach at the wrong point in your custom path This will NOT add this path to the full global web. - Returns:
- true if there's a node within 32 tiles to attach it to, false otherwise
 
 - 
connectToEndpublic void connectToEnd(int nodeIndex) This will connect the end of this path to the provided node index whenattachToWeb()orWebFinder.addCustomWebPath(CustomWebPath)is called for this path This will NOT connect this path to the full global web- Parameters:
- nodeIndex- The index of the AbstractWebNode to attach this path to
 
 - 
getStartpublic AbstractWebNode getStart() 
 - 
getEndpublic AbstractWebNode getEnd() 
 - 
getNodespublic java.util.ArrayList<AbstractWebNode> getNodes() 
 - 
attachToWebpublic void attachToWeb() Attaches this custom web path into the global web
 - 
attachToWebpublic boolean attachToWeb(boolean attachStart, boolean attachEnd)Attaches this custom web path into the global web Will automatically callconnectStartToClosestNode()andconnectEndToClosestNode()based on the parameters passed- Parameters:
- attachStart-
- attachEnd-
- Returns:
- False if attach start is requested and fails, false if attach end is requested and fails, else true
 
 
- 
 
-