mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Entity: fix chunk tracking consistency issues, fixed attempted chunk loading in origin world when teleporting to a different position in a different world
This commit is contained in:
@ -648,9 +648,9 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
}
|
||||
}
|
||||
|
||||
protected function switchWorld(World $targetWorld) : bool{
|
||||
protected function setPosition(Vector3 $pos) : bool{
|
||||
$oldWorld = $this->location->isValid() ? $this->location->getWorld() : null;
|
||||
if(parent::switchWorld($targetWorld)){
|
||||
if(parent::setPosition($pos)){
|
||||
if($oldWorld !== null){
|
||||
foreach($this->usedChunks as $index => $status){
|
||||
World::getXZ($index, $X, $Z);
|
||||
|
Reference in New Issue
Block a user