Level: fix setChunk() deleting tiles when replacing a chunk with the same chunk

this can be desirable to trigger events related to chunks changing, such as chunk sending.
This commit is contained in:
Dylan K. Taylor 2018-12-21 17:24:08 +00:00
parent 34a899e28b
commit 69c343bb9b

View File

@ -2440,7 +2440,7 @@ class Level implements ChunkManager, Metadatable{
$chunkHash = Level::chunkHash($chunkX, $chunkZ);
$oldChunk = $this->getChunk($chunkX, $chunkZ, false);
if($oldChunk !== null){
if($oldChunk !== null and $oldChunk !== $chunk){
if($unload){
$this->unloadChunk($chunkX, $chunkZ, false, false);
}else{