Execute.positioned constructor

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

Positioned sets the execution point of the command to a new Location or Entity.

Execute.positioned(
	Entity.player(), // Location...
	children: List<Widget> [
		Command('/say I get executed')
	]
),

⇒ execute positioned as @p run say I get executed

When given a Heightmap, sets the y-coordinate to the current positions heightmap(world_suface, motion_blocking, motion_blocking_no_leaves, ocean_floor) by generating the over subcommand:

Execute.positioned(
	Heighmap.motion_blocking, // Location...
	children: List<Widget> [
		Command("/say I get executed")
	]
),
⇒ execute positioned over motion_blocking run say I get executed

Implementation

Execute.positioned(
  dynamic loc, {
  required this.children,
  this.encapsulate = true,
  this.targetFilePath = 'objd',
  this.targetFileName,
}) {
  _args = positioned(loc).args;
}