Condition Nodes - Lyinginbedmon/TricksyFoxes GitHub Wiki
These nodes perform a simple check and return success or failure. This allows the mob to adjust its behaviour according to its circumstances, such as by sleeping only when its health is sufficiently low.
Index
Items
-
Has Any Items
Inputs: A position, a direction (default: down), and an optional item filter
Returns success if there is an inventory at the given position which contains any matching item from the filter in a slot accessed from the given direction.
Miscellaneous
-
Block Powered
Inputs: A position
Returns success if the block at the given position is being powered with redstone, such as a redstone lamp.
-
Closer Than
Inputs: A position, a position to measure from (default: the mob's current position), and a maximum distance number (default: 8)
Returns success if the distance between the two positions is less than the maximum distance input.
-
Is Crop
Inputs: A position
Returns success if the block at the given position is a crop block, such as wheat seeds, melon stems, or cocoa pods.
-
Is Matching Entity
Inputs: An entity (default: the mob) and an optional entity filter
Returns success if the given entity matches the given entity filter (or always if the filter is blank)
-
Is Matching Item
Inputs: An item (default: the mob's main-hand item) and an optional item filter
Returns success if the given item matches the given item filter (or always if the filter is blank).
-
Is Mature Crop
Inputs: A position
Returns success if in addition to the block at the given position being a crop block, it is in its highest age state and ready for harvesting.
-
Is Minable
Inputs: A position
Returns success if the block at the given position is minable.
-
Is On Fire
Inputs: An entity (default: the mob)
Returns success if the given entity is currently on fire.
Values
-
Greater Than
Inputs: Two numbers
Returns success if the first number is greater than the second number.
-
Less Than
Inputs: Two numbers
Returns success if the first number is less than the second number. This differs from using an inverter decorator with the greater than condition in that !(A<B) also returns success if the values are equal.
-
Values Equal
Inputs: Two values
Returns success if both input values are of the same type and contents.
-
Value Exists
Inputs: Any value
Returns success if there is any value received, regardless of its actual contents.
-
Value True
Inputs: Any value
Returns success if the boolean yes/no value of the given value equates to true/yes. Since blank values evaluate to false/no, this is often functionally indistinguishable from Value Exists.