mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Merge branch 'master' into api3/network
This commit is contained in:
@ -183,6 +183,7 @@ use pocketmine\network\mcpe\protocol\TransferPacket;
|
||||
use pocketmine\network\mcpe\protocol\UnknownPacket;
|
||||
use pocketmine\network\mcpe\protocol\UpdateAttributesPacket;
|
||||
use pocketmine\network\mcpe\protocol\UpdateBlockPacket;
|
||||
use pocketmine\network\mcpe\protocol\UpdateTradePacket;
|
||||
use pocketmine\network\mcpe\protocol\UseItemPacket;
|
||||
use pocketmine\network\SourceInterface;
|
||||
use pocketmine\permission\PermissibleBase;
|
||||
@ -771,21 +772,12 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
$level = $level === null ? $this->level : $level;
|
||||
$index = Level::chunkHash($x, $z);
|
||||
if(isset($this->usedChunks[$index])){
|
||||
$chunk = $level->getChunk($x, $z);
|
||||
foreach($chunk->getEntities() as $entity){
|
||||
foreach($level->getChunkEntities($x, $z) as $entity){
|
||||
if($entity !== $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]);
|
||||
}
|
||||
$level->unregisterChunkLoader($this, $x, $z);
|
||||
@ -3287,6 +3279,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
return true;
|
||||
}
|
||||
|
||||
public function handleUpdateTrade(UpdateTradePacket $packet) : bool{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function handleResourcePackDataInfo(ResourcePackDataInfoPacket $packet) : bool{
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user