mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Thanks to @GameHeroBrine
This commit is contained in:
parent
fd23ba04ec
commit
c8fc4139f8
36 changed files with 387 additions and 40 deletions
|
|
@ -12,6 +12,9 @@ class AddEntityPacket extends RakNetDataPacket{
|
|||
public $speedZ;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::ADD_ENTITY_PACKET;
|
||||
}
|
||||
return ProtocolInfo::ADD_ENTITY_PACKET;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ class AddItemEntityPacket extends RakNetDataPacket{
|
|||
public $roll;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::ADD_ITEM_ENTITY_PACKET;
|
||||
}
|
||||
return ProtocolInfo::ADD_ITEM_ENTITY_PACKET;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,13 @@ class AnimatePacket extends RakNetDataPacket{
|
|||
public $eid;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
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 < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::ANIMATE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::ANIMATE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::ANIMATE_PACKET;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ class ChatPacket extends RakNetDataPacket{
|
|||
public $message;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::CHAT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::CHAT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::CHAT_PACKET;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,13 @@ class ChunkDataPacket extends RakNetDataPacket{
|
|||
public $data;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::CHUNK_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CHUNK_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::CHUNK_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::CHUNK_DATA_PACKET;
|
||||
}
|
||||
return ProtocolInfo::CHUNK_DATA_PACKET;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,13 @@ class ContainerClosePacket extends RakNetDataPacket{
|
|||
public $windowid;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::CONTAINER_CLOSE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CONTAINER_CLOSE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::CONTAINER_CLOSE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::CONTAINER_CLOSE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::CONTAINER_CLOSE_PACKET;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,13 @@ class ContainerOpenPacket extends RakNetDataPacket{
|
|||
public $z;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::CONTAINER_OPEN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CONTAINER_OPEN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::CONTAINER_OPEN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::CONTAINER_OPEN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::CONTAINER_OPEN_PACKET;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,13 @@ class ContainerSetContentPacket extends RakNetDataPacket{
|
|||
public $hotbar = array();
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::CONTAINER_SET_CONTENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CONTAINER_SET_CONTENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::CONTAINER_SET_CONTENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::CONTAINER_SET_CONTENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::CONTAINER_SET_CONTENT_PACKET;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,13 @@ class ContainerSetDataPacket extends RakNetDataPacket{
|
|||
public $value;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::CONTAINER_SET_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CONTAINER_SET_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::CONTAINER_SET_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::CONTAINER_SET_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::CONTAINER_SET_DATA_PACKET;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,13 @@ class ContainerSetSlotPacket extends RakNetDataPacket{
|
|||
public $item;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::CONTAINER_SET_SLOT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::CONTAINER_SET_SLOT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::CONTAINER_SET_SLOT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::CONTAINER_SET_SLOT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::CONTAINER_SET_SLOT_PACKET;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,13 @@ class DropItemPacket extends RakNetDataPacket{
|
|||
public $item;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::DROP_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::DROP_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::DROP_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::DROP_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::DROP_ITEM_PACKET;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,13 @@ class EntityEventPacket extends RakNetDataPacket{
|
|||
}
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::ENTITY_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::ENTITY_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::ENTITY_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::ENTITY_EVENT_PACKET;
|
||||
}
|
||||
return ProtocolInfo::ENTITY_EVENT_PACKET;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,11 @@ class ExplodePacket extends RakNetDataPacket{
|
|||
public $records;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::EXPLODE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::EXPLODE_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::EXPLODE_PACKET;
|
||||
}
|
||||
return ProtocolInfo::EXPLODE_PACKET;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,13 @@ class InteractPacket extends RakNetDataPacket{
|
|||
public $target;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::INTERACT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::INTERACT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::INTERACT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::INTERACT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::INTERACT_PACKET;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,11 @@ class LevelEventPacket extends RakNetDataPacket{
|
|||
public $data;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::LEVEL_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::LEVEL_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::LEVEL_EVENT_PACKET;
|
||||
}
|
||||
return ProtocolInfo::LEVEL_EVENT_PACKET;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
class MoveEntityPacket extends RakNetDataPacket{
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::MOVE_ENTITY_PACKET;
|
||||
}
|
||||
return ProtocolInfo::MOVE_ENTITY_PACKET;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ class MoveEntityPacket_PosRot extends RakNetDataPacket{
|
|||
public $pitch;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::MOVE_ENTITY_PACKET_POSROT;
|
||||
}
|
||||
return ProtocolInfo::MOVE_ENTITY_PACKET_POSROT;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ class MovePlayerPacket extends RakNetDataPacket{
|
|||
public $bodyYaw;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::MOVE_PLAYER_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::MOVE_PLAYER_PACKET;
|
||||
}
|
||||
return ProtocolInfo::MOVE_PLAYER_PACKET;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ class PlaceBlockPacket extends RakNetDataPacket{
|
|||
public $face;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL) {
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::PLACE_BLOCK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL) {
|
||||
return ProtocolInfo12::PLACE_BLOCK_PACKET;
|
||||
}
|
||||
return ProtocolInfo::PLACE_BLOCK_PACKET;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ class PlayerActionPacket extends RakNetDataPacket{
|
|||
public $eid;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::PLAYER_ACTION_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::PLAYER_ACTION_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::PLAYER_ACTION_PACKET;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@ class PlayerEquipmentPacket extends RakNetDataPacket{
|
|||
public $slot;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::PLAYER_EQUIPMENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::PLAYER_EQUIPMENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::PLAYER_EQUIPMENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::PLAYER_EQUIPMENT_PACKET;
|
||||
}
|
||||
return ProtocolInfo::PLAYER_EQUIPMENT_PACKET;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ class RemoveBlockPacket extends RakNetDataPacket{
|
|||
public $z;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::REMOVE_BLOCK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::REMOVE_BLOCK_PACKET;
|
||||
}
|
||||
return ProtocolInfo::REMOVE_BLOCK_PACKET;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ class RemoveEntityPacket extends RakNetDataPacket{
|
|||
public $eid;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::REMOVE_ENTITY_PACKET;
|
||||
}
|
||||
return ProtocolInfo::REMOVE_ENTITY_PACKET;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,13 @@ class RequestChunkPacket extends RakNetDataPacket{
|
|||
public $chunkZ;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::REQUEST_CHUNK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::REQUEST_CHUNK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::REQUEST_CHUNK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::REQUEST_CHUNK_PACKET;
|
||||
}
|
||||
return ProtocolInfo::REQUEST_CHUNK_PACKET;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@ class RespawnPacket extends RakNetDataPacket{
|
|||
public $z;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::RESPAWN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::RESPAWN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::RESPAWN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::RESPAWN_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::RESPAWN_PACKET;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@ class SendInventoryPacket extends RakNetDataPacket{
|
|||
public $armor = array();
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::SEND_INVENTORY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::SEND_INVENTORY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::SEND_INVENTORY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::SEND_INVENTORY_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::SEND_INVENTORY_PACKET;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,13 @@ class SetEntityDataPacket extends RakNetDataPacket{
|
|||
public $metadata;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::SET_ENTITY_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::SET_ENTITY_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::SET_ENTITY_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::SET_ENTITY_DATA_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::SET_ENTITY_DATA_PACKET;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@ class SetEntityMotionPacket extends RakNetDataPacket{
|
|||
public $speedZ;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::SET_ENTITY_MOTION_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::SET_ENTITY_MOTION_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::SET_ENTITY_MOTION_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::SET_ENTITY_MOTION_PACKET;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,13 @@ class SetHealthPacket extends RakNetDataPacket{
|
|||
public $health;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::SET_HEALTH_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::SET_HEALTH_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::SET_HEALTH_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::SET_HEALTH_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
|
||||
return ProtocolInfo9::SET_HEALTH_PACKET;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ class TakeItemEntityPacket extends RakNetDataPacket{
|
|||
public $eid;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::TAKE_ITEM_ENTITY_PACKET;
|
||||
}
|
||||
return ProtocolInfo::TAKE_ITEM_ENTITY_PACKET;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,11 @@ class TileEventPacket extends RakNetDataPacket{
|
|||
public $case2;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::TILE_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::TILE_EVENT_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::TILE_EVENT_PACKET;
|
||||
}
|
||||
return ProtocolInfo::TILE_EVENT_PACKET;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ class UpdateBlockPacket extends RakNetDataPacket{
|
|||
public $meta;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
if($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::UPDATE_BLOCK_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::UPDATE_BLOCK_PACKET;
|
||||
}
|
||||
return ProtocolInfo::UPDATE_BLOCK_PACKET;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,13 @@ class UseItemPacket extends RakNetDataPacket{
|
|||
public $posZ;
|
||||
|
||||
public function pid(){
|
||||
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
|
||||
return ProtocolInfo3::USE_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo5::CURRENT_PROTOCOL_5){
|
||||
return ProtocolInfo4::USE_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo7::CURRENT_PROTOCOL_7){
|
||||
return ProtocolInfo5::USE_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
|
||||
return ProtocolInfo7::USE_ITEM_PACKET;
|
||||
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
|
||||
return ProtocolInfo12::USE_ITEM_PACKET;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue