diff --git a/src/world/BlockTransaction.php b/src/world/BlockTransaction.php index f30d761f3..80bf8445f 100644 --- a/src/world/BlockTransaction.php +++ b/src/world/BlockTransaction.php @@ -95,10 +95,15 @@ class BlockTransaction{ } } } + $changedBlocks = 0; foreach($this->getBlocks() as [$x, $y, $z, $block]){ - $this->world->setBlockAt($x, $y, $z, $block); + $oldBlock = $this->world->getBlockAt($x, $y, $z); + if(!$oldBlock->isSameState($block)){ + $this->world->setBlockAt($x, $y, $z, $block); + $changedBlocks++; + } } - return true; + return $changedBlocks !== 0; } /**