AroundLocation constructor

AroundLocation(
  1. double rel, {
  2. required Widget build(
    1. Location
    ),
  3. bool top = true,
  4. bool bottom = true,
  5. bool left = true,
  6. bool right = true,
  7. bool front = true,
  8. bool back = true,
})

Often times you need to check blocks or entities around one Location. AroundLocation utilizes this by using just one build method for all sides: Example:

AroundLocation(
	1,
	build: (Location loc){
		return Setblock(Blocks.stone,location:loc)
	}
)
⇒ setblock ~1 ~ ~ stone
⇒ setblock ~-1 ~ ~ stone
⇒ setblock ~ ~1 ~ stone
⇒ setblock ~ ~-1 ~ stone
⇒ setblock ~ ~ ~1 stone
⇒ setblock ~ ~ ~-1 stone

Implementation

AroundLocation(
  this.rel, {
  required this.build,
  this.top = true,
  this.bottom = true,
  this.left = true,
  this.right = true,
  this.front = true,
  this.back = true,
});