Execute.facing constructor

Execute.facing(
  1. dynamic target, {
  2. required List<Widget> children,
  3. bool encapsulate = true,
  4. String targetFilePath = 'objd',
  5. String? targetFileName,
  6. Facing facing = Facing.eyes,
})

Sets the execution rotation so that it faces a location or an entity's feet or eyes. Example:

Execute.facing(
	Entity.player(), // or Location...
	facing: Facing.feet // optional
	children: List<Widget> [
		Command('/say I get executed')
	]
)
⇒ execute facing entity @p feet run say I get executed

Implementation

Execute.facing(
  dynamic target, {
  required this.children,
  this.encapsulate = true,
  this.targetFilePath = 'objd',
  this.targetFileName,
  Facing facing = Facing.eyes,
}) {
  _args = this.facing(target, facing: facing).args;
}