Class BasicWebNode
- java.lang.Object
-
- org.dreambot.api.methods.walking.web.node.AbstractWebNode
-
- org.dreambot.api.methods.walking.web.node.impl.BasicWebNode
-
- All Implemented Interfaces:
PathAwareWebNode
,Locatable
public class BasicWebNode extends AbstractWebNode implements PathAwareWebNode
Basic web node, which stores connections and location.
-
-
Constructor Summary
Constructors Constructor Description BasicWebNode(int x, int y)
BasicWebNode(int x, int y, int z)
BasicWebNode(org.dreambot.internal.web.WebNodes.WebNode node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
execute(AbstractWebNode next)
This is the same asAbstractWebNode.execute()
except the web walker will pass the next web node in the path after this node.double
getRandomizationFactor()
WebNodeType
getType()
Returns the WebNodeType of this node, used during path finding to ensure they're not disabled by the scriptCondition
getValid()
boolean
hasRequirements()
This is used to determine during path finding if the current player can use this nodeboolean
isValid()
Checks the validity of this web node to see if it should be considered at all during path findingvoid
setRandomizationFactor(double randomizationFactor)
void
setValid(Condition valid)
-
Methods inherited from class org.dreambot.api.methods.walking.web.node.AbstractWebNode
addConnections, addDualConnections, addIncomingConnections, addOutgoingConnections, clear, distance, equals, execute, forceNext, getConnections, getGridX, getGridY, getIndex, getRequiredItems, getTile, getTileReference, getWeight, getX, getY, getZ, hashCode, initializeConnections, removeConnections, removeDualConnections, setConnections, setWeight, toString, walkingDistance
-
Methods inherited from interface org.dreambot.api.wrappers.interactive.Locatable
canReach, canReach, tileDistance
-
-
-
-
Method Detail
-
getType
public WebNodeType getType()
Description copied from class:AbstractWebNode
Returns the WebNodeType of this node, used during path finding to ensure they're not disabled by the script- Overrides:
getType
in classAbstractWebNode
- Returns:
- the type of web node
-
hasRequirements
public boolean hasRequirements()
Description copied from class:AbstractWebNode
This is used to determine during path finding if the current player can use this node- Overrides:
hasRequirements
in classAbstractWebNode
- Returns:
- true if it's usable by the current player, false otherwise
-
isValid
public boolean isValid()
Description copied from class:AbstractWebNode
Checks the validity of this web node to see if it should be considered at all during path finding- Overrides:
isValid
in classAbstractWebNode
- Returns:
- true if it's usable, false otherwise
-
execute
public boolean execute(AbstractWebNode next)
Description copied from interface:PathAwareWebNode
This is the same asAbstractWebNode.execute()
except the web walker will pass the next web node in the path after this node.Important note: if your node implements this interface, the walker will call
PathAwareWebNode.execute(AbstractWebNode)
instead ofAbstractWebNode.execute()
.- Specified by:
execute
in interfacePathAwareWebNode
- Parameters:
next
- the web node after this node in the web path, or null if this is the last web node- Returns:
- true if the node is successfully handled, false otherwise
-
getRandomizationFactor
public double getRandomizationFactor()
-
setRandomizationFactor
public void setRandomizationFactor(double randomizationFactor)
-
getValid
public Condition getValid()
-
setValid
public void setValid(Condition valid)
-
-