mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 21:45:35 +00:00
parent
082f0f2d57
commit
334bf1277d
@ -95,10 +95,15 @@ class BlockTransaction{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$changedBlocks = 0;
|
||||||
foreach($this->getBlocks() as [$x, $y, $z, $block]){
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user