87 foreach($this->getBlocks() as [$x, $y, $z, $_]){
88 foreach($this->validators as $validator){
89 if(!$validator($this->world, $x, $y, $z)){
95 foreach($this->getBlocks() as [$x, $y, $z, $block]){
96 $oldBlock = $this->world->getBlockAt($x, $y, $z);
97 if(!$oldBlock->isSameState($block)){
98 $this->world->setBlockAt($x, $y, $z, $block);
102 return $changedBlocks !== 0;
110 foreach($this->blocks as $x => $yLine){
111 foreach($yLine as $y => $zLine){
112 foreach($zLine as $z => $block){
113 yield [$x, $y, $z, $block];