mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 16:49:53 +00:00
World: remove premature optimisation of setBlockAt() introduced by ece28e5d7b0d4c8d12a9477cdd1d3337277e892d
closes #4531 it turns out that letting the light updates themselves handle this is faster than trying to get in the way.
This commit is contained in:
parent
9d30bc8b95
commit
616eb0050d
@ -1596,8 +1596,6 @@ class World implements ChunkManager{
|
|||||||
|
|
||||||
$this->unlockChunk($chunkX, $chunkZ, null);
|
$this->unlockChunk($chunkX, $chunkZ, null);
|
||||||
|
|
||||||
$oldBlock = $this->getBlockAt($x, $y, $z, true, false);
|
|
||||||
|
|
||||||
$block = clone $block;
|
$block = clone $block;
|
||||||
|
|
||||||
$block->position($this, $x, $y, $z);
|
$block->position($this, $x, $y, $z);
|
||||||
@ -1619,9 +1617,7 @@ class World implements ChunkManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($update){
|
if($update){
|
||||||
if($oldBlock->getLightFilter() !== $block->getLightFilter() or $oldBlock->getLightLevel() !== $block->getLightLevel()){
|
|
||||||
$this->updateAllLight($x, $y, $z);
|
$this->updateAllLight($x, $y, $z);
|
||||||
}
|
|
||||||
$this->tryAddToNeighbourUpdateQueue($pos);
|
$this->tryAddToNeighbourUpdateQueue($pos);
|
||||||
foreach($pos->sides() as $side){
|
foreach($pos->sides() as $side){
|
||||||
$this->tryAddToNeighbourUpdateQueue($side);
|
$this->tryAddToNeighbourUpdateQueue($side);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user