Skip to content

Commit

Permalink
fix command arg type
Browse files Browse the repository at this point in the history
  • Loading branch information
AkmalFairuz committed Mar 14, 2024
1 parent 26de0fb commit a7fd823
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/AvailableCommandsPacket.php
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,20 @@ public static function convertArg(int $protocolId, int $type) : int{
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,
Expand Down

0 comments on commit a7fd823

Please sign in to comment.