Merge branch 'yefengeeeeeeeeeee:master' into master

This commit is contained in:
Sunch 2025-04-12 20:54:48 +08:00 • committed by GitHub
commit 23de63394b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 11 deletions

View file

@ -111,7 +111,7 @@ abstract class ProtocolInfo12{
const MOVE_ENTITY_PACKET_POSROT = 0x93; const MOVE_ENTITY_PACKET_POSROT = 0x93;
const ROTATE_HEAD_PACKET = 0xff; const ROTATE_HEAD_PACKET = 0xff;
const MOVE_PLAYER_PACKET = 0x94; const MOVE_PLAYER_PACKET = 0x94;
const PLACE_BLOCK_PACKET = 0x96; const PLACE_BLOCK_PACKET = 0x95;
const REMOVE_BLOCK_PACKET = 0x96; const REMOVE_BLOCK_PACKET = 0x96;
const UPDATE_BLOCK_PACKET = 0x97; const UPDATE_BLOCK_PACKET = 0x97;
const ADD_PAINTING_PACKET = 0x98; const ADD_PAINTING_PACKET = 0x98;
@ -206,12 +206,12 @@ abstract class ProtocolInfo9{
const RESPAWN_PACKET = 0xab; const RESPAWN_PACKET = 0xab;
const SEND_INVENTORY_PACKET = 0xac; const SEND_INVENTORY_PACKET = 0xac;
const DROP_ITEM_PACKET = 0xad; const DROP_ITEM_PACKET = 0xad;
const CONTAINER_OPEN_PACKET = 0xab; const CONTAINER_OPEN_PACKET = 0xae;
const CONTAINER_CLOSE_PACKET = 0xac; const CONTAINER_CLOSE_PACKET = 0xaf;
const CONTAINER_SET_SLOT_PACKET = 0xad; const CONTAINER_SET_SLOT_PACKET = 0xb0;
const CONTAINER_SET_DATA_PACKET = 0xae; const CONTAINER_SET_DATA_PACKET = 0xb1;
const CONTAINER_SET_CONTENT_PACKET = 0xaf; const CONTAINER_SET_CONTENT_PACKET = 0xb2;
const CONTAINER_ACK_PACKET = 0xb; const CONTAINER_ACK_PACKET = 0xb3;
const CHAT_PACKET = 0xb4;//12 change const CHAT_PACKET = 0xb4;//12 change
const ADVENTURE_SETTINGS_PACKET = 0xb6; const ADVENTURE_SETTINGS_PACKET = 0xb6;
const ENTITY_DATA_PACKET = 0xb7; const ENTITY_DATA_PACKET = 0xb7;
@ -263,7 +263,7 @@ abstract class ProtocolInfo7{ // MCPE 0.3 - 0.5 seem using same packet id
const REQUEST_CHUNK_PACKET = 0x9d; const REQUEST_CHUNK_PACKET = 0x9d;
const CHUNK_DATA_PACKET = 0x9e; const CHUNK_DATA_PACKET = 0x9e;
const PLAYER_EQUIPMENT_PACKET = 0x9f; const PLAYER_EQUIPMENT_PACKET = 0x9f;
const PLAYER_ARMOR_EQUIPMENT_PACKET = 0xa0; // const PLAYER_ARMOR_EQUIPMENT_PACKET = 0xa0;
const INTERACT_PACKET = 0xa0;//Change const INTERACT_PACKET = 0xa0;//Change
const USE_ITEM_PACKET = 0xa1; const USE_ITEM_PACKET = 0xa1;
const PLAYER_ACTION_PACKET = 0xa2; const PLAYER_ACTION_PACKET = 0xa2;

View file

@ -37,6 +37,12 @@ abstract class RakNetDataPacket extends stdClass{
$this->setBuffer(chr($this->pid())); $this->setBuffer(chr($this->pid()));
} }
public function isPacketExist(int $protocol) : int{
$exist = true;
return $exist;
}
abstract public function pid(); abstract public function pid();
public function getInternalPid() : int{ public function getInternalPid() : int{

View file

@ -6,6 +6,7 @@ class RakNetParser{
private $buffer; private $buffer;
private $source; private $source;
private $offset; private $offset;
private $isparse = false;
public function __construct(&$buffer, $source){ public function __construct(&$buffer, $source){
$this->source =& $source; $this->source =& $source;
@ -965,9 +966,6 @@ class RakNetParser{
case ProtocolInfo7::PLAYER_EQUIPMENT_PACKET: case ProtocolInfo7::PLAYER_EQUIPMENT_PACKET:
$data = new PlayerEquipmentPacket; $data = new PlayerEquipmentPacket;
break; break;
case ProtocolInfo7::PLAYER_ARMOR_EQUIPMENT_PACKET:
$data = new PlayerArmorEquipmentPacket;
break;
case ProtocolInfo7::INTERACT_PACKET: case ProtocolInfo7::INTERACT_PACKET:
$data = new InteractPacket; $data = new InteractPacket;
break; break;