13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
25 public const NETWORK_ID = ProtocolInfo::FEATURE_REGISTRY_PACKET;
28 private array $entries;
34 public static function create(array $entries) : self{
36 $result->entries = $entries;
41 public function getEntries() : array{ return $this->entries; }
44 for($this->entries = [], $i = 0, $count = $in->getUnsignedVarInt(); $i < $count; $i++){
45 $this->entries[] = FeatureRegistryPacketEntry::read($in);
50 $out->putUnsignedVarInt(count($this->entries));
51 foreach($this->entries as $entry){
57 return $handler->handleFeatureRegistry($this);
handle(PacketHandlerInterface $handler)
decodePayload(PacketSerializer $in)
encodePayload(PacketSerializer $out)
static create(array $entries)