mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Removed network channels, bumped protocol
This commit is contained in:
@ -84,14 +84,23 @@ class Network{
|
||||
|
||||
public static $BATCH_THRESHOLD = 512;
|
||||
|
||||
/** @deprecated */
|
||||
const CHANNEL_NONE = 0;
|
||||
/** @deprecated */
|
||||
const CHANNEL_PRIORITY = 1; //Priority channel, only to be used when it matters
|
||||
/** @deprecated */
|
||||
const CHANNEL_WORLD_CHUNKS = 2; //Chunk sending
|
||||
/** @deprecated */
|
||||
const CHANNEL_MOVEMENT = 3; //Movement sending
|
||||
/** @deprecated */
|
||||
const CHANNEL_BLOCKS = 4; //Block updates or explosions
|
||||
/** @deprecated */
|
||||
const CHANNEL_WORLD_EVENTS = 5; //Entity, level or tile entity events
|
||||
/** @deprecated */
|
||||
const CHANNEL_ENTITY_SPAWNING = 6; //Entity spawn/despawn channel
|
||||
/** @deprecated */
|
||||
const CHANNEL_TEXT = 7; //Chat and other text stuff
|
||||
/** @deprecated */
|
||||
const CHANNEL_END = 31;
|
||||
|
||||
/** @var \SplFixedArray */
|
||||
|
@ -52,6 +52,9 @@ abstract class DataPacket extends BinaryStream{
|
||||
$this->offset = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated This adds extra overhead on the network, so its usage is now discouraged. It was a test for the viability of this.
|
||||
*/
|
||||
public function setChannel($channel){
|
||||
$this->channel = (int) $channel;
|
||||
return $this;
|
||||
|
@ -30,62 +30,62 @@ interface Info{
|
||||
/**
|
||||
* Actual Minecraft: PE protocol version
|
||||
*/
|
||||
const CURRENT_PROTOCOL = 33;
|
||||
const CURRENT_PROTOCOL = 34;
|
||||
|
||||
const LOGIN_PACKET = 0x87;
|
||||
const PLAY_STATUS_PACKET = 0x88;
|
||||
const DISCONNECT_PACKET = 0x89;
|
||||
const BATCH_PACKET = 0x8a;
|
||||
const TEXT_PACKET = 0x8b;
|
||||
const SET_TIME_PACKET = 0x8c;
|
||||
const START_GAME_PACKET = 0x8d;
|
||||
const ADD_PLAYER_PACKET = 0x8e;
|
||||
const REMOVE_PLAYER_PACKET = 0x8f;
|
||||
const ADD_ENTITY_PACKET = 0x90;
|
||||
const REMOVE_ENTITY_PACKET = 0x91;
|
||||
const ADD_ITEM_ENTITY_PACKET = 0x92;
|
||||
const TAKE_ITEM_ENTITY_PACKET = 0x93;
|
||||
const MOVE_ENTITY_PACKET = 0x94;
|
||||
const MOVE_PLAYER_PACKET = 0x95;
|
||||
const REMOVE_BLOCK_PACKET = 0x96;
|
||||
const UPDATE_BLOCK_PACKET = 0x97;
|
||||
const ADD_PAINTING_PACKET = 0x98;
|
||||
const EXPLODE_PACKET = 0x99;
|
||||
const LEVEL_EVENT_PACKET = 0x9a;
|
||||
const TILE_EVENT_PACKET = 0x9b;
|
||||
const ENTITY_EVENT_PACKET = 0x9c;
|
||||
const MOB_EFFECT_PACKET = 0x9d;
|
||||
const UPDATE_ATTRIBUTES_PACKET = 0x9e;
|
||||
const MOB_EQUIPMENT_PACKET = 0x9f;
|
||||
const MOB_ARMOR_EQUIPMENT_PACKET = 0xa0;
|
||||
const INTERACT_PACKET = 0xa1;
|
||||
const USE_ITEM_PACKET = 0xa2;
|
||||
const PLAYER_ACTION_PACKET = 0xa3;
|
||||
const HURT_ARMOR_PACKET = 0xa4;
|
||||
const SET_ENTITY_DATA_PACKET = 0xa5;
|
||||
const SET_ENTITY_MOTION_PACKET = 0xa6;
|
||||
const SET_ENTITY_LINK_PACKET = 0xa7;
|
||||
const SET_HEALTH_PACKET = 0xa8;
|
||||
const SET_SPAWN_POSITION_PACKET = 0xa9;
|
||||
const ANIMATE_PACKET = 0xaa;
|
||||
const RESPAWN_PACKET = 0xab;
|
||||
const DROP_ITEM_PACKET = 0xac;
|
||||
const CONTAINER_OPEN_PACKET = 0xad;
|
||||
const CONTAINER_CLOSE_PACKET = 0xae;
|
||||
const CONTAINER_SET_SLOT_PACKET = 0xaf;
|
||||
const CONTAINER_SET_DATA_PACKET = 0xb0;
|
||||
const CONTAINER_SET_CONTENT_PACKET = 0xb1;
|
||||
const CRAFTING_DATA_PACKET = 0xb2;
|
||||
const CRAFTING_EVENT_PACKET = 0xb3;
|
||||
const ADVENTURE_SETTINGS_PACKET = 0xb4;
|
||||
const TILE_ENTITY_DATA_PACKET = 0xb5;
|
||||
//const PLAYER_INPUT_PACKET = 0xb6;
|
||||
const FULL_CHUNK_DATA_PACKET = 0xb7;
|
||||
const SET_DIFFICULTY_PACKET = 0xb8;
|
||||
//const CHANGE_DIMENSION_PACKET = 0xb9;
|
||||
//const SET_PLAYER_GAMETYPE_PACKET = 0xba;
|
||||
const PLAYER_LIST_PACKET = 0xbb;
|
||||
//const TELEMETRY_EVENT_PACKET = 0xbc;
|
||||
const LOGIN_PACKET = 0x8f;
|
||||
const PLAY_STATUS_PACKET = 0x90;
|
||||
const DISCONNECT_PACKET = 0x91;
|
||||
const BATCH_PACKET = 0x92;
|
||||
const TEXT_PACKET = 0x93;
|
||||
const SET_TIME_PACKET = 0x94;
|
||||
const START_GAME_PACKET = 0x95;
|
||||
const ADD_PLAYER_PACKET = 0x96;
|
||||
const REMOVE_PLAYER_PACKET = 0x97;
|
||||
const ADD_ENTITY_PACKET = 0x98;
|
||||
const REMOVE_ENTITY_PACKET = 0x99;
|
||||
const ADD_ITEM_ENTITY_PACKET = 0x9a;
|
||||
const TAKE_ITEM_ENTITY_PACKET = 0x9b;
|
||||
const MOVE_ENTITY_PACKET = 0x9c;
|
||||
const MOVE_PLAYER_PACKET = 0x9d;
|
||||
const REMOVE_BLOCK_PACKET = 0x9e;
|
||||
const UPDATE_BLOCK_PACKET = 0x9f;
|
||||
const ADD_PAINTING_PACKET = 0xa0;
|
||||
const EXPLODE_PACKET = 0xa1;
|
||||
const LEVEL_EVENT_PACKET = 0xa2;
|
||||
const TILE_EVENT_PACKET = 0xa3;
|
||||
const ENTITY_EVENT_PACKET = 0xa4;
|
||||
const MOB_EFFECT_PACKET = 0xa5;
|
||||
const UPDATE_ATTRIBUTES_PACKET = 0xa6;
|
||||
const MOB_EQUIPMENT_PACKET = 0xa7;
|
||||
const MOB_ARMOR_EQUIPMENT_PACKET = 0xa8;
|
||||
const INTERACT_PACKET = 0xa9;
|
||||
const USE_ITEM_PACKET = 0xaa;
|
||||
const PLAYER_ACTION_PACKET = 0xab;
|
||||
const HURT_ARMOR_PACKET = 0xac;
|
||||
const SET_ENTITY_DATA_PACKET = 0xad;
|
||||
const SET_ENTITY_MOTION_PACKET = 0xae;
|
||||
const SET_ENTITY_LINK_PACKET = 0xaf;
|
||||
const SET_HEALTH_PACKET = 0xb0;
|
||||
const SET_SPAWN_POSITION_PACKET = 0xb1;
|
||||
const ANIMATE_PACKET = 0xb2;
|
||||
const RESPAWN_PACKET = 0xb3;
|
||||
const DROP_ITEM_PACKET = 0xb4;
|
||||
const CONTAINER_OPEN_PACKET = 0xb5;
|
||||
const CONTAINER_CLOSE_PACKET = 0xb6;
|
||||
const CONTAINER_SET_SLOT_PACKET = 0xb7;
|
||||
const CONTAINER_SET_DATA_PACKET = 0xb8;
|
||||
const CONTAINER_SET_CONTENT_PACKET = 0xb9;
|
||||
const CRAFTING_DATA_PACKET = 0xba;
|
||||
const CRAFTING_EVENT_PACKET = 0xbb;
|
||||
const ADVENTURE_SETTINGS_PACKET = 0xbc;
|
||||
const TILE_ENTITY_DATA_PACKET = 0xbd;
|
||||
//const PLAYER_INPUT_PACKET = 0xbe;
|
||||
const FULL_CHUNK_DATA_PACKET = 0xbf;
|
||||
const SET_DIFFICULTY_PACKET = 0xc0;
|
||||
//const CHANGE_DIMENSION_PACKET = 0xc1;
|
||||
//const SET_PLAYER_GAMETYPE_PACKET = 0xc2;
|
||||
const PLAYER_LIST_PACKET = 0xc3;
|
||||
//const TELEMETRY_EVENT_PACKET = 0xc4;
|
||||
|
||||
}
|
||||
|
||||
@ -98,3 +98,4 @@ interface Info{
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user