mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Basiclly Support 0.3.0
This commit is contained in:
parent
e7e7c81e07
commit
20c4f16a52
45 changed files with 245 additions and 127 deletions
|
|
@ -12,8 +12,10 @@ class AddEntityPacket extends RakNetDataPacket{
|
|||
public $speedZ;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::ADD_ENTITY_PACKET;
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::ADD_ENTITY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::ADD_ENTITY_PACKET;
|
||||
}
|
||||
return ProtocolInfo::ADD_ENTITY_PACKET;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,10 @@ class AddItemEntityPacket extends RakNetDataPacket{
|
|||
public $speedZ;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::ADD_ITEM_ENTITY_PACKET;
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::ADD_ITEM_ENTITY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::ADD_ITEM_ENTITY_PACKET;
|
||||
}
|
||||
return ProtocolInfo::ADD_ITEM_ENTITY_PACKET;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ class AddMobPacket extends RakNetDataPacket{
|
|||
public $metadata;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::ADD_MOB_PACKET;
|
||||
}
|
||||
return ProtocolInfo::ADD_MOB_PACKET;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ class AddPlayerPacket extends RakNetDataPacket{
|
|||
public $metadata;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::ADD_PLAYER_PACKET;
|
||||
}
|
||||
return ProtocolInfo::ADD_PLAYER_PACKET;
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +47,9 @@ class AddPlayerPacket extends RakNetDataPacket{
|
|||
$this->putByte($this->pitch);
|
||||
$this->putShort($this->itemID);
|
||||
$this->putShort($this->itemAuxValue); //Example: bow shooting power
|
||||
if($this->PROTOCOL >= ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
$this->put(Utils::writeMetadata($this->metadata));
|
||||
}
|
||||
}
|
||||
|
||||
public function eidsToLocal(Player $p){
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ class AdventureSettingsPacket extends RakNetDataPacket{
|
|||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo8::ADVENTURE_SETTINGS_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::ADVENTURE_SETTINGS_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::ADVENTURE_SETTINGS_PACKET;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,12 @@ class AnimatePacket extends RakNetDataPacket{
|
|||
public $eid;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::ANIMATE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4) {
|
||||
return ProtocolInfo3::ANIMATE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::ANIMATE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::ANIMATE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::ANIMATE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -7,9 +7,11 @@ class ChunkDataPacket extends RakNetDataPacket{
|
|||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::CHUNK_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo3::CHUNK_DATA_PACKET;//Same as 18
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CHUNK_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::CHUNK_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::CHUNK_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
|
|
|
|||
|
|
@ -8,8 +8,10 @@ class ContainerAckPacket extends RakNetDataPacket{
|
|||
public $write0;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CONTAINER_ACK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::CONTAINER_ACK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::CONTAINER_ACK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ class ContainerClosePacket extends RakNetDataPacket{
|
|||
public $windowid;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::CONTAINER_CLOSE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CONTAINER_CLOSE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::CONTAINER_CLOSE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::CONTAINER_CLOSE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@ class ContainerOpenPacket extends RakNetDataPacket{
|
|||
public $unknownstring;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::CONTAINER_OPEN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CONTAINER_OPEN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::CONTAINER_OPEN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::CONTAINER_OPEN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo8::CONTAINER_OPEN_PACKET;
|
||||
return ProtocolInfo8::CONTAINER_OPN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::CONTAINER_OPEN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ class ContainerSetContentPacket extends RakNetDataPacket{
|
|||
public $hotbar = array();
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::CONTAINER_SET_CONTENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CONTAINER_SET_CONTENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::CONTAINER_SET_CONTENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::CONTAINER_SET_CONTENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ class ContainerSetDataPacket extends RakNetDataPacket{
|
|||
public $value;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::CONTAINER_SET_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CONTAINER_SET_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::CONTAINER_SET_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::CONTAINER_SET_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ class ContainerSetSlotPacket extends RakNetDataPacket{
|
|||
public $item;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::CONTAINER_SET_SLOT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CONTAINER_SET_SLOT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::CONTAINER_SET_SLOT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::CONTAINER_SET_SLOT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ class DropItemPacket extends RakNetDataPacket{
|
|||
public $item;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::DROP_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::DROP_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::DROP_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::DROP_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -20,8 +20,10 @@ class EntityEventPacket extends RakNetDataPacket{
|
|||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::ENTITY_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::ENTITY_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::ENTITY_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::ENTITY_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ class ExplodePacket extends RakNetDataPacket{
|
|||
public $records;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::EXPLODE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::EXPLODE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::EXPLODE_PACKET;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,10 @@ class InteractPacket extends RakNetDataPacket{
|
|||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::INTERACT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::INTERACT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::INTERACT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::INTERACT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ class LevelEventPacket extends RakNetDataPacket{
|
|||
public $data;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::LEVEL_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::LEVEL_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::LEVEL_EVENT_PACKET;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ class LoginStatusPacket extends RakNetDataPacket{
|
|||
public $status;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::LOGIN_STATUS_PACKET;
|
||||
}
|
||||
return ProtocolInfo::LOGIN_STATUS_PACKET;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ class MessagePacket extends RakNetDataPacket{
|
|||
public $message;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::MESSAGE_PACKET;
|
||||
}
|
||||
return ProtocolInfo::MESSAGE_PACKET;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@
|
|||
class MoveEntityPacket extends RakNetDataPacket{
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::MOVE_ENTITY_PACKET;
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::MOVE_ENTITY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::MOVE_ENTITY_PACKET;
|
||||
}
|
||||
return ProtocolInfo::MOVE_ENTITY_PACKET;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,10 @@ class MoveEntityPacket_PosRot extends RakNetDataPacket{
|
|||
public $pitch;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::MOVE_ENTITY_PACKET_POSROT;
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::MOVE_ENTITY_PACKET_POSROT;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::MOVE_ENTITY_PACKET_POSROT;
|
||||
}
|
||||
return ProtocolInfo::MOVE_ENTITY_PACKET_POSROT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,10 @@ class MovePlayerPacket extends RakNetDataPacket{
|
|||
public $bodyYaw;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::MOVE_PLAYER_PACKET;
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::MOVE_PLAYER_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::MOVE_PLAYER_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::MOVE_PLAYER_PACKET;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,10 @@ class PlaceBlockPacket extends RakNetDataPacket{
|
|||
public $face;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::PLACE_BLOCK_PACKET;
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::PLACE_BLOCK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::PLACE_BLOCK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL) {
|
||||
return ProtocolInfo12::PLACE_BLOCK_PACKET;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,10 @@ class PlayerEquipmentPacket extends RakNetDataPacket{
|
|||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::PLAYER_EQUIPMENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::PLAYER_EQUIPMENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::PLAYER_EQUIPMENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::PLAYER_EQUIPMENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ class ReadyPacket extends RakNetDataPacket{
|
|||
public $status;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::READY_PACKET;
|
||||
}
|
||||
return ProtocolInfo::READY_PACKET;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@ class RemoveBlockPacket extends RakNetDataPacket{
|
|||
public $z;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::REMOVE_BLOCK_PACKET;
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::REMOVE_BLOCK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::REMOVE_BLOCK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::REMOVE_BLOCK_PACKET;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ class RemoveEntityPacket extends RakNetDataPacket{
|
|||
public $eid;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::REMOVE_ENTITY_PACKET;
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::REMOVE_ENTITY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::REMOVE_ENTITY_PACKET;
|
||||
}
|
||||
return ProtocolInfo::REMOVE_ENTITY_PACKET;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ class RemovePlayerPacket extends RakNetDataPacket{
|
|||
public $clientID;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::REMOVE_PLAYER_PACKET;
|
||||
}
|
||||
return ProtocolInfo::REMOVE_PLAYER_PACKET;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@ class RequestChunkPacket extends RakNetDataPacket{
|
|||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::REQUEST_CHUNK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::REQUEST_CHUNK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::REQUEST_CHUNK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::REQUEST_CHUNK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
|
|
|
|||
|
|
@ -9,8 +9,10 @@ class RespawnPacket extends RakNetDataPacket{
|
|||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::RESPAWN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
}if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::RESPAWN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::RESPAWN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::RESPAWN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ class SendInventoryPacket extends RakNetDataPacket{
|
|||
public $armor = [];
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::SEND_INVENTORY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::SEND_INVENTORY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::SEND_INVENTORY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::SEND_INVENTORY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@ class SetEntityDataPacket extends RakNetDataPacket{
|
|||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::SET_ENTITY_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::SET_ENTITY_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::SET_ENTITY_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::SET_ENTITY_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class SetEntityMotionPacket extends RakNetDataPacket{
|
|||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::SET_ENTITY_MOTION_PACKET;
|
||||
return ProtocolInfo5::SET_ENTITY_MOTION_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::SET_ENTITY_MOTION_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -6,8 +6,10 @@ class SetHealthPacket extends RakNetDataPacket{
|
|||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::SET_HEALTH_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::SET_HEALTH_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::SET_HEALTH_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::SET_HEALTH_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ class SetTimePacket extends RakNetDataPacket{
|
|||
public $started = true;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::SET_TIME_PACKET;
|
||||
}
|
||||
return ProtocolInfo::SET_TIME_PACKET;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ class StartGamePacket extends RakNetDataPacket{
|
|||
public $z;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::START_GAME_PACKET;
|
||||
}
|
||||
return ProtocolInfo::START_GAME_PACKET;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,10 @@ class TakeItemEntityPacket extends RakNetDataPacket{
|
|||
public $eid;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::TAKE_ITEM_ENTITY_PACKET;
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::TAKE_ITEM_ENTITY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::TAKE_ITEM_ENTITY_PACKET;
|
||||
}
|
||||
return ProtocolInfo::TAKE_ITEM_ENTITY_PACKET;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class TileEventPacket extends RakNetDataPacket{
|
|||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::TILE_EVENT_PACKET;
|
||||
return ProtocolInfo5::TILE_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::TILE_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
|
|
|
|||
|
|
@ -8,8 +8,10 @@ class UpdateBlockPacket extends RakNetDataPacket{
|
|||
public $meta;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo4::UPDATE_BLOCK_PACKET;
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::UPDATE_BLOCK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::UPDATE_BLOCK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::UPDATE_BLOCK_PACKET;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,10 @@ class UseItemPacket extends RakNetDataPacket{
|
|||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::USE_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::USE_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
|
||||
return ProtocolInfo5::USE_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
|
||||
return ProtocolInfo6::USE_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue