mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Improved network packets allocation
This commit is contained in:
@ -23,6 +23,9 @@ namespace pocketmine\network\protocol;
|
||||
|
||||
|
||||
class RotateHeadPacket extends DataPacket{
|
||||
public static $pool = [];
|
||||
public static $next = 0;
|
||||
|
||||
|
||||
// eid, yaw
|
||||
/** @var array[] */
|
||||
@ -32,6 +35,11 @@ class RotateHeadPacket extends DataPacket{
|
||||
return Info::ROTATE_HEAD_PACKET;
|
||||
}
|
||||
|
||||
public function clean(){
|
||||
$this->entities = [];
|
||||
return parent::clean();
|
||||
}
|
||||
|
||||
public function decode(){
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user