mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
fixing chunk sending
This commit is contained in:
@ -101,6 +101,7 @@ use pocketmine\nbt\tag\StringTag;
|
||||
use pocketmine\network\protocol\AdventureSettingsPacket;
|
||||
use pocketmine\network\protocol\AnimatePacket;
|
||||
use pocketmine\network\protocol\BatchPacket;
|
||||
use pocketmine\network\protocol\ChunkRadiusUpdatePacket;
|
||||
use pocketmine\network\protocol\ContainerClosePacket;
|
||||
use pocketmine\network\protocol\ContainerSetContentPacket;
|
||||
use pocketmine\network\protocol\DataPacket;
|
||||
@ -2874,6 +2875,14 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ProtocolInfo::REQUEST_CHUNK_RADIUS_PACKET:
|
||||
if($this->spawned){
|
||||
$this->viewDistance = $packet->radius ** 2;
|
||||
}
|
||||
$pk = new ChunkRadiusUpdatePacket();
|
||||
$pk->radius = $packet->radius;
|
||||
$this->dataPacket($pk);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user