diff --git a/src/AvailableCommandsPacket.php b/src/AvailableCommandsPacket.php index ac6ed8d2..3165c34d 100644 --- a/src/AvailableCommandsPacket.php +++ b/src/AvailableCommandsPacket.php @@ -622,10 +622,24 @@ public function handle(PacketHandlerInterface $handler) : bool{ } public static function convertArg(int $protocolId, int $type) : int{ - if($protocolId >= ProtocolInfo::PROTOCOL_568){ + if($protocolId >= ProtocolInfo::PROTOCOL_568 && $protocolId < ProtocolInfo::PROTOCOL_662){ return $type; } + if($protocolId >= ProtocolInfo::PROTOCOL_662){ + return match ($type) { + self::ARG_TYPE_EQUIPMENT_SLOT => 47, + self::ARG_TYPE_STRING => 48, + self::ARG_TYPE_INT_POSITION => 64, + self::ARG_TYPE_POSITION => 65, + self::ARG_TYPE_MESSAGE => 67, + self::ARG_TYPE_RAWTEXT => 70, + self::ARG_TYPE_JSON => 74, + self::ARG_TYPE_BLOCK_STATES => 84, + self::ARG_TYPE_COMMAND => 87, + }; + } + if($protocolId >= ProtocolInfo::PROTOCOL_527){ return match ($type) { self::ARG_TYPE_INT_POSITION => 0x2f,