Condition class

The Condition class defines conditions for the if widget and more. It can also combines conditions and generates an argument list.

Constructors

Condition(dynamic cond)
The Condition class defines conditions for the if widget and more. It can also combines conditions and generates an argument list. A condition can accept many values and this makes the Condition very complex.
Condition.and(List conds)
accepts a list of dynamic condition types, that all have to be true to trigger
Condition.biome(Biome cond)
checks if the execution is in a matching biome
Condition.block(Location cond, {required Block block})
checks whether a block is at a given location
Condition.blocks(Area cond, {required Location compare, bool masked = false})
checks whether an area matches another area of blocks
Condition.data(Data cond)
Condition.dimension(Dimension cond)
checks if the execution is in a matching dimension
Condition.entity(Entity cond)
checks if the entity exists
Condition.loaded(Location cond)
checks if the chunk of the location is loaded:
Condition.not(dynamic cond)
accepts same dynamic condition types as Condition but negates them (if ⇒ unless, unless ⇒ if)
Condition.or(List conds)
accepts a list of dynamic condition types, but just one has to be true to trigger
Condition.predicate(Predicate cond)
checks for a predicate
Condition.score(Score cond)
checks the value of a score Attention! This needs a score condition method!
Condition.tag(Tag cond)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getList() List<List<_ConditionUtil>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getPrefixes(List<List> conds, [bool invert = false]) List<String>