AroundLocation constructor
AroundLocation(})
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,
});