Execute class

The execute command has multiple syntaxes that allow to manipulate the position, executer or condition.

Inheritance

Constructors

Execute({List<Widget> children = const [], Entity? as, Entity? at, Relation? on, dynamic location, String? align, String targetFilePath = 'objd', String? targetFileName, Facing? anchor, Condition? If, Condition? unless, dynamic facing, Rotation? rotation, Dimension? dimension, bool encapsulate = true, List<List<String>>? args, List<Widget>? writable})
All Execute classes are also an Group, so they will group commands in seperate files and allow multiple children.
Execute.align(String axis, {required List<Widget> children, bool encapsulate = true, String targetFilePath = 'objd', String? targetFileName})
Aligns the position to the corners of the block grid.
Execute.anchored(Facing anchor, {required List<Widget> children, bool encapsulate = true, String targetFilePath = 'objd', String? targetFileName})
Sets the execution position(^ ^ ^) to the eyes or the feet.
Execute.as(Entity entity, {required List<Widget> children, bool encapsulate = true, String targetFilePath = 'objd', String? targetFileName})
Execute.asat(Entity entity, {required List<Widget> children, bool encapsulate = true, String targetFilePath = 'objd', String? targetFileName})
Asat combines as and at to just one entity.
Execute.at(Entity entity, {required List<Widget> children, bool encapsulate = true, String targetFilePath = 'objd', String? targetFileName})
Execute.dimension(Dimension dimension, {required List<Widget> children, bool encapsulate = true, String targetFilePath = 'objd', String? targetFileName})
Sets the execution dimension(execute in) to either Dimension.overworld, Dimension.the_end or Dimension.the_nether.
Execute.facing(dynamic target, {required List<Widget> children, bool encapsulate = true, String targetFilePath = 'objd', String? targetFileName, Facing facing = Facing.eyes})
Sets the execution rotation so that it faces a location or an entity's feet or eyes. Example:
Execute.on(Relation relation, {required List<Widget> children, bool encapsulate = true, String targetFilePath = 'objd', String? targetFileName})
Changes the executor to a related entity, but keeps the position the same
Execute.positioned(dynamic loc, {required List<Widget> children, bool encapsulate = true, String targetFilePath = 'objd', String? targetFileName})
Positioned sets the execution point of the command to a new Location or Entity.
Execute.rotated(dynamic rot, {required List<Widget> children, bool encapsulate = true, String targetFilePath = 'objd', String? targetFileName})
Sets the execution rotation to the given rotation.
Execute.strait({required dynamic run(List<Widget>), Entity? as, Entity? at, Relation? on, dynamic location, String? align, String targetFilePath = 'objd', String? targetFileName, Facing? anchor, Condition? If, Condition? unless, dynamic facing, Rotation? rotation, Dimension? dimension, bool encapsulate = true, List<List<String>>? args, List<Widget>? writable})
Execute.summon(EntityType entity, {required List<Widget> children, bool encapsulate = true, String targetFilePath = 'objd', String? targetFileName})
Summons a new entity at execution position and changes the executor to this summoned entity.

Properties

args List<List<String>>
no setter
called bool
Contains the Information, if this RestAction is already called (and can't be called again)
getter/setter pairinherited
children List<Widget>
getter/setter pair
encapsulate bool
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
targetFileName String?
getter/setter pair
targetFilePath String
getter/setter pair
writable List<Widget>?
The writable list the RestAction writes it's contents on
getter/setter pairinherited

Methods

align(String axis) Execute
Aligns the position to the corners of the block grid.
anchored(Facing anchor) Execute
Sets the execution position(^ ^ ^) to the eyes or the feet.
as(Entity entity) Execute
asat(Entity entity) Execute
Asat combines as and at to just one entity.
at(Entity entity) Execute
center([double y = 0.5]) Execute
dimension(Dimension dimension) Execute
Sets the execution dimension(execute in) to either Dimension.overworld, Dimension.the_end or Dimension.the_nether.
facing(dynamic target, {Facing facing = Facing.eyes}) Execute
Sets the execution rotation so that it faces a location or an entity's feet or eyes. Example:
generate(Context context) Widget
override
If(Condition c) Execute
In(Dimension d) Execute
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on(Relation relation) Execute
Updates the executor, selecting entities based on relation to the current executor entity (changing the original executor), without changing execution position, rotation, dimension, and anchor.
over(Heightmap height) Execute
Positioned at the Y-coordinate of a specific heightmap
positioned(dynamic loc) Execute
Positioned sets the execution point of the command to a new Location, Heightmap or Entity.
queue([List<Widget>? writable]) → void
Execute this method to add this to the WidgetList (can use default list or as parameter given list) This method can only be executed once, if it is executed multiple times you will get an Error. You can read out if it is already executed in the boolean Called Example for a queue method:
inherited
rotated(dynamic rot) Execute
Sets the execution rotation to the given rotation.
run(Widget w) Execute
runStrait(dynamic f(List<Widget>)) Execute
storeBlock({ExecuteStoreResultType result = ExecuteStoreResultType.result, required Location location, required String path, int scale = 1, ExecuteStoreVarType varType = ExecuteStoreVarType.int}) Execute
storeBossbar({ExecuteStoreResultType result = ExecuteStoreResultType.result, required String name, BossbarOption setting = BossbarOption.value}) Execute
storeEntity({ExecuteStoreResultType result = ExecuteStoreResultType.result, required Entity entity, required String path, int scale = 1, ExecuteStoreVarType varType = ExecuteStoreVarType.int}) Execute
storeScore({ExecuteStoreResultType result = ExecuteStoreResultType.result, required Score score}) Execute
summon(EntityType entity) Execute
toMap() → dynamic
inherited
toString() String
A string representation of this object.
inherited
unless(Condition c) Execute
vcenter() Execute

Operators

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

Static Methods

internal_store_command(String type, Widget w, bool useSuccess) Group
just for internal use