mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 03:35:33 +00:00
Revert multi-world hack (client issue fixed in 1.0.4.0), close #260
This reverts commit 162b993e65f2e15b25d1997af3b0e77db2bc2de7.
This commit is contained in:
parent
e31333edd4
commit
7e1bdd474a
@ -696,21 +696,12 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
$level = $level === null ? $this->level : $level;
|
$level = $level === null ? $this->level : $level;
|
||||||
$index = Level::chunkHash($x, $z);
|
$index = Level::chunkHash($x, $z);
|
||||||
if(isset($this->usedChunks[$index])){
|
if(isset($this->usedChunks[$index])){
|
||||||
$chunk = $level->getChunk($x, $z);
|
foreach($level->getChunkEntities($x, $z) as $entity){
|
||||||
foreach($chunk->getEntities() as $entity){
|
|
||||||
if($entity !== $this){
|
if($entity !== $this){
|
||||||
$entity->despawnFrom($this);
|
$entity->despawnFrom($this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($level !== $this->level){
|
|
||||||
$pk = new FullChunkDataPacket();
|
|
||||||
$pk->chunkX = $x;
|
|
||||||
$pk->chunkZ = $z;
|
|
||||||
$pk->data = chr($chunk->getSubChunkSendCount());
|
|
||||||
$this->dataPacket($pk);
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($this->usedChunks[$index]);
|
unset($this->usedChunks[$index]);
|
||||||
}
|
}
|
||||||
$level->unregisterChunkLoader($this, $x, $z);
|
$level->unregisterChunkLoader($this, $x, $z);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user