diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index 3c4a6f48b..45f517112 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -855,9 +855,12 @@ class Level implements ChunkManager, Metadatable{ unset($this->updateTiles[$blockHash]); } if(!$tile->isClosed() and $tile instanceof Spawnable and $tile->isDirty()){ - $this->clearChunkCache($tile->getFloorX() >> 4, $tile->getFloorZ() >> 4); - //TODO: merge this with block-updating (it'll send useless data if a full-chunk resend happens) - $this->broadcastPacketToViewers($tile, $tile->createSpawnPacket()); + $chunkHash = Level::chunkHash($tile->getFloorX() >> 4, $tile->getFloorZ() >> 4); + if(!isset($this->changedBlocks[$chunkHash])){ + $this->changedBlocks[$chunkHash] = [$blockHash => $tile]; + }else{ + $this->changedBlocks[$chunkHash][$blockHash] = $tile; + } $tile->setDirty(false); } }