90 foreach($this->getBlocks() as [$x, $y, $z, $_]){
91 foreach($this->validators as $validator){
92 if(!$validator($this->world, $x, $y, $z)){
98 foreach($this->getBlocks() as [$x, $y, $z, $block]){
99 $oldBlock = $this->world->getBlockAt($x, $y, $z);
100 if(!$oldBlock->isSameState($block)){
101 $this->world->setBlockAt($x, $y, $z, $block);
105 return $changedBlocks !== 0;
113 foreach($this->blocks as $x => $yLine){
114 foreach($yLine as $y => $zLine){
115 foreach($zLine as $z => $block){
116 yield [$x, $y, $z, $block];