mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Bulk addition of constant visibilities
thanks PhpStorm inspections plugin for annoying the shit out of me until I did this.
This commit is contained in:
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class AddBehaviorTreePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::ADD_BEHAVIOR_TREE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::ADD_BEHAVIOR_TREE_PACKET;
|
||||
|
||||
/** @var string */
|
||||
public $unknownString1;
|
||||
|
@ -31,7 +31,7 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\network\mcpe\protocol\types\EntityLink;
|
||||
|
||||
class AddEntityPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::ADD_ENTITY_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::ADD_ENTITY_PACKET;
|
||||
|
||||
/** @var int|null */
|
||||
public $entityUniqueId = null; //TODO
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class AddHangingEntityPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::ADD_HANGING_ENTITY_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::ADD_HANGING_ENTITY_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityUniqueId;
|
||||
|
@ -30,7 +30,7 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class AddItemEntityPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::ADD_ITEM_ENTITY_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::ADD_ITEM_ENTITY_PACKET;
|
||||
|
||||
/** @var int|null */
|
||||
public $entityUniqueId = null; //TODO
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class AddPaintingPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::ADD_PAINTING_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::ADD_PAINTING_PACKET;
|
||||
|
||||
/** @var int|null */
|
||||
public $entityUniqueId = null; //TODO
|
||||
|
@ -32,7 +32,7 @@ use pocketmine\network\mcpe\protocol\types\EntityLink;
|
||||
use pocketmine\utils\UUID;
|
||||
|
||||
class AddPlayerPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::ADD_PLAYER_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::ADD_PLAYER_PACKET;
|
||||
|
||||
/** @var UUID */
|
||||
public $uuid;
|
||||
|
@ -30,38 +30,38 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\network\mcpe\protocol\types\PlayerPermissions;
|
||||
|
||||
class AdventureSettingsPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::ADVENTURE_SETTINGS_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::ADVENTURE_SETTINGS_PACKET;
|
||||
|
||||
const PERMISSION_NORMAL = 0;
|
||||
const PERMISSION_OPERATOR = 1;
|
||||
const PERMISSION_HOST = 2;
|
||||
const PERMISSION_AUTOMATION = 3;
|
||||
const PERMISSION_ADMIN = 4;
|
||||
public const PERMISSION_NORMAL = 0;
|
||||
public const PERMISSION_OPERATOR = 1;
|
||||
public const PERMISSION_HOST = 2;
|
||||
public const PERMISSION_AUTOMATION = 3;
|
||||
public const PERMISSION_ADMIN = 4;
|
||||
|
||||
/**
|
||||
* This constant is used to identify flags that should be set on the second field. In a sensible world, these
|
||||
* flags would all be set on the same packet field, but as of MCPE 1.2, the new abilities flags have for some
|
||||
* reason been assigned a separate field.
|
||||
*/
|
||||
const BITFLAG_SECOND_SET = 1 << 16;
|
||||
public const BITFLAG_SECOND_SET = 1 << 16;
|
||||
|
||||
const WORLD_IMMUTABLE = 0x01;
|
||||
const NO_PVP = 0x02;
|
||||
public const WORLD_IMMUTABLE = 0x01;
|
||||
public const NO_PVP = 0x02;
|
||||
|
||||
const AUTO_JUMP = 0x20;
|
||||
const ALLOW_FLIGHT = 0x40;
|
||||
const NO_CLIP = 0x80;
|
||||
const WORLD_BUILDER = 0x100;
|
||||
const FLYING = 0x200;
|
||||
const MUTED = 0x400;
|
||||
public const AUTO_JUMP = 0x20;
|
||||
public const ALLOW_FLIGHT = 0x40;
|
||||
public const NO_CLIP = 0x80;
|
||||
public const WORLD_BUILDER = 0x100;
|
||||
public const FLYING = 0x200;
|
||||
public const MUTED = 0x400;
|
||||
|
||||
const BUILD_AND_MINE = 0x01 | self::BITFLAG_SECOND_SET;
|
||||
const DOORS_AND_SWITCHES = 0x02 | self::BITFLAG_SECOND_SET;
|
||||
const OPEN_CONTAINERS = 0x04 | self::BITFLAG_SECOND_SET;
|
||||
const ATTACK_PLAYERS = 0x08 | self::BITFLAG_SECOND_SET;
|
||||
const ATTACK_MOBS = 0x10 | self::BITFLAG_SECOND_SET;
|
||||
const OPERATOR = 0x20 | self::BITFLAG_SECOND_SET;
|
||||
const TELEPORT = 0x80 | self::BITFLAG_SECOND_SET;
|
||||
public const BUILD_AND_MINE = 0x01 | self::BITFLAG_SECOND_SET;
|
||||
public const DOORS_AND_SWITCHES = 0x02 | self::BITFLAG_SECOND_SET;
|
||||
public const OPEN_CONTAINERS = 0x04 | self::BITFLAG_SECOND_SET;
|
||||
public const ATTACK_PLAYERS = 0x08 | self::BITFLAG_SECOND_SET;
|
||||
public const ATTACK_MOBS = 0x10 | self::BITFLAG_SECOND_SET;
|
||||
public const OPERATOR = 0x20 | self::BITFLAG_SECOND_SET;
|
||||
public const TELEPORT = 0x80 | self::BITFLAG_SECOND_SET;
|
||||
|
||||
/** @var int */
|
||||
public $flags = 0;
|
||||
|
@ -29,12 +29,12 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class AnimatePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::ANIMATE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::ANIMATE_PACKET;
|
||||
|
||||
const ACTION_SWING_ARM = 1;
|
||||
public const ACTION_SWING_ARM = 1;
|
||||
|
||||
const ACTION_STOP_SLEEP = 3;
|
||||
const ACTION_CRITICAL_HIT = 4;
|
||||
public const ACTION_STOP_SLEEP = 3;
|
||||
public const ACTION_CRITICAL_HIT = 4;
|
||||
|
||||
/** @var int */
|
||||
public $action;
|
||||
|
@ -28,45 +28,45 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class AvailableCommandsPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::AVAILABLE_COMMANDS_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::AVAILABLE_COMMANDS_PACKET;
|
||||
|
||||
|
||||
/**
|
||||
* This flag is set on all types EXCEPT the TEMPLATE type. Not completely sure what this is for, but it is required
|
||||
* for the argtype to work correctly. VALID seems as good a name as any.
|
||||
*/
|
||||
const ARG_FLAG_VALID = 0x100000;
|
||||
public const ARG_FLAG_VALID = 0x100000;
|
||||
|
||||
/**
|
||||
* Basic parameter types. These must be combined with the ARG_FLAG_VALID constant.
|
||||
* ARG_FLAG_VALID | (type const)
|
||||
*/
|
||||
const ARG_TYPE_INT = 0x01;
|
||||
const ARG_TYPE_FLOAT = 0x02;
|
||||
const ARG_TYPE_VALUE = 0x03;
|
||||
const ARG_TYPE_TARGET = 0x04;
|
||||
public const ARG_TYPE_INT = 0x01;
|
||||
public const ARG_TYPE_FLOAT = 0x02;
|
||||
public const ARG_TYPE_VALUE = 0x03;
|
||||
public const ARG_TYPE_TARGET = 0x04;
|
||||
|
||||
const ARG_TYPE_STRING = 0x0d;
|
||||
const ARG_TYPE_POSITION = 0x0e;
|
||||
public const ARG_TYPE_STRING = 0x0d;
|
||||
public const ARG_TYPE_POSITION = 0x0e;
|
||||
|
||||
const ARG_TYPE_RAWTEXT = 0x11;
|
||||
public const ARG_TYPE_RAWTEXT = 0x11;
|
||||
|
||||
const ARG_TYPE_TEXT = 0x13;
|
||||
public const ARG_TYPE_TEXT = 0x13;
|
||||
|
||||
const ARG_TYPE_JSON = 0x16;
|
||||
public const ARG_TYPE_JSON = 0x16;
|
||||
|
||||
const ARG_TYPE_COMMAND = 0x1d;
|
||||
public const ARG_TYPE_COMMAND = 0x1d;
|
||||
|
||||
/**
|
||||
* Enums are a little different: they are composed as follows:
|
||||
* ARG_FLAG_ENUM | ARG_FLAG_VALID | (enum index)
|
||||
*/
|
||||
const ARG_FLAG_ENUM = 0x200000;
|
||||
public const ARG_FLAG_ENUM = 0x200000;
|
||||
|
||||
/**
|
||||
* This is used for for /xp <level: int>L.
|
||||
*/
|
||||
const ARG_FLAG_POSTFIX = 0x1000000;
|
||||
public const ARG_FLAG_POSTFIX = 0x1000000;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
|
@ -33,7 +33,7 @@ use pocketmine\utils\Binary;
|
||||
use pocketmine\utils\BinaryStream;
|
||||
|
||||
class BatchPacket extends DataPacket{
|
||||
const NETWORK_ID = 0xfe;
|
||||
public const NETWORK_ID = 0xfe;
|
||||
|
||||
/** @var string */
|
||||
public $payload = "";
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class BlockEntityDataPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::BLOCK_ENTITY_DATA_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::BLOCK_ENTITY_DATA_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $x;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class BlockEventPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::BLOCK_EVENT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::BLOCK_EVENT_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $x;
|
||||
|
@ -30,7 +30,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class BlockPickRequestPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::BLOCK_PICK_REQUEST_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::BLOCK_PICK_REQUEST_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $blockX;
|
||||
|
@ -28,13 +28,13 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class BookEditPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::BOOK_EDIT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::BOOK_EDIT_PACKET;
|
||||
|
||||
const TYPE_REPLACE_PAGE = 0;
|
||||
const TYPE_ADD_PAGE = 1;
|
||||
const TYPE_DELETE_PAGE = 2;
|
||||
const TYPE_SWAP_PAGES = 3;
|
||||
const TYPE_SIGN_BOOK = 4;
|
||||
public const TYPE_REPLACE_PAGE = 0;
|
||||
public const TYPE_ADD_PAGE = 1;
|
||||
public const TYPE_DELETE_PAGE = 2;
|
||||
public const TYPE_SWAP_PAGES = 3;
|
||||
public const TYPE_SIGN_BOOK = 4;
|
||||
|
||||
/** @var int */
|
||||
public $type;
|
||||
|
@ -29,24 +29,24 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class BossEventPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::BOSS_EVENT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::BOSS_EVENT_PACKET;
|
||||
|
||||
/* S2C: Shows the boss-bar to the player. */
|
||||
const TYPE_SHOW = 0;
|
||||
public const TYPE_SHOW = 0;
|
||||
/* C2S: Registers a player to a boss fight. */
|
||||
const TYPE_REGISTER_PLAYER = 1;
|
||||
public const TYPE_REGISTER_PLAYER = 1;
|
||||
/* S2C: Removes the boss-bar from the client. */
|
||||
const TYPE_HIDE = 2;
|
||||
public const TYPE_HIDE = 2;
|
||||
/* C2S: Unregisters a player from a boss fight. */
|
||||
const TYPE_UNREGISTER_PLAYER = 3;
|
||||
public const TYPE_UNREGISTER_PLAYER = 3;
|
||||
/* S2C: Appears not to be implemented. Currently bar percentage only appears to change in response to the target entity's health. */
|
||||
const TYPE_HEALTH_PERCENT = 4;
|
||||
public const TYPE_HEALTH_PERCENT = 4;
|
||||
/* S2C: Also appears to not be implemented. Title client-side sticks as the target entity's nametag, or their entity type name if not set. */
|
||||
const TYPE_TITLE = 5;
|
||||
public const TYPE_TITLE = 5;
|
||||
/* S2C: Not sure on this. Includes color and overlay fields, plus an unknown short. TODO: check this */
|
||||
const TYPE_UNKNOWN_6 = 6;
|
||||
public const TYPE_UNKNOWN_6 = 6;
|
||||
/* S2C: Not implemented :( Intended to alter bar appearance, but these currently produce no effect on client-side whatsoever. */
|
||||
const TYPE_TEXTURE = 7;
|
||||
public const TYPE_TEXTURE = 7;
|
||||
|
||||
/** @var int */
|
||||
public $bossEid;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class CameraPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::CAMERA_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::CAMERA_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $cameraUniqueId;
|
||||
|
@ -30,7 +30,7 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ChangeDimensionPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::CHANGE_DIMENSION_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::CHANGE_DIMENSION_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $dimension;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ChunkRadiusUpdatedPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::CHUNK_RADIUS_UPDATED_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::CHUNK_RADIUS_UPDATED_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $radius;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ClientToServerHandshakePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::CLIENT_TO_SERVER_HANDSHAKE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::CLIENT_TO_SERVER_HANDSHAKE_PACKET;
|
||||
|
||||
public function canBeSentBeforeLogin() : bool{
|
||||
return true;
|
||||
|
@ -32,10 +32,10 @@ use pocketmine\network\mcpe\protocol\types\DimensionIds;
|
||||
use pocketmine\utils\Color;
|
||||
|
||||
class ClientboundMapItemDataPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::CLIENTBOUND_MAP_ITEM_DATA_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::CLIENTBOUND_MAP_ITEM_DATA_PACKET;
|
||||
|
||||
const BITFLAG_TEXTURE_UPDATE = 0x02;
|
||||
const BITFLAG_DECORATION_UPDATE = 0x04;
|
||||
public const BITFLAG_TEXTURE_UPDATE = 0x02;
|
||||
public const BITFLAG_DECORATION_UPDATE = 0x04;
|
||||
|
||||
/** @var int */
|
||||
public $mapId;
|
||||
|
@ -30,7 +30,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class CommandBlockUpdatePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::COMMAND_BLOCK_UPDATE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::COMMAND_BLOCK_UPDATE_PACKET;
|
||||
|
||||
/** @var bool */
|
||||
public $isBlock;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class CommandOutputPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::COMMAND_OUTPUT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::COMMAND_OUTPUT_PACKET;
|
||||
|
||||
protected function decodePayload(){
|
||||
//TODO
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class CommandRequestPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::COMMAND_REQUEST_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::COMMAND_REQUEST_PACKET;
|
||||
|
||||
/** @var string */
|
||||
public $command;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ContainerClosePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::CONTAINER_CLOSE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::CONTAINER_CLOSE_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $windowId;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ContainerOpenPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::CONTAINER_OPEN_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::CONTAINER_OPEN_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $windowId;
|
||||
|
@ -29,17 +29,17 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ContainerSetDataPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::CONTAINER_SET_DATA_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::CONTAINER_SET_DATA_PACKET;
|
||||
|
||||
const PROPERTY_FURNACE_TICK_COUNT = 0;
|
||||
const PROPERTY_FURNACE_LIT_TIME = 1;
|
||||
const PROPERTY_FURNACE_LIT_DURATION = 2;
|
||||
public const PROPERTY_FURNACE_TICK_COUNT = 0;
|
||||
public const PROPERTY_FURNACE_LIT_TIME = 1;
|
||||
public const PROPERTY_FURNACE_LIT_DURATION = 2;
|
||||
//TODO: check property 3
|
||||
const PROPERTY_FURNACE_FUEL_AUX = 4;
|
||||
public const PROPERTY_FURNACE_FUEL_AUX = 4;
|
||||
|
||||
const PROPERTY_BREWING_STAND_BREW_TIME = 0;
|
||||
const PROPERTY_BREWING_STAND_FUEL_AMOUNT = 1;
|
||||
const PROPERTY_BREWING_STAND_FUEL_TOTAL = 2;
|
||||
public const PROPERTY_BREWING_STAND_BREW_TIME = 0;
|
||||
public const PROPERTY_BREWING_STAND_FUEL_AMOUNT = 1;
|
||||
public const PROPERTY_BREWING_STAND_FUEL_TOTAL = 2;
|
||||
|
||||
/** @var int */
|
||||
public $windowId;
|
||||
|
@ -34,14 +34,14 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\utils\BinaryStream;
|
||||
|
||||
class CraftingDataPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::CRAFTING_DATA_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::CRAFTING_DATA_PACKET;
|
||||
|
||||
const ENTRY_SHAPELESS = 0;
|
||||
const ENTRY_SHAPED = 1;
|
||||
const ENTRY_FURNACE = 2;
|
||||
const ENTRY_FURNACE_DATA = 3;
|
||||
const ENTRY_MULTI = 4; //TODO
|
||||
const ENTRY_SHULKER_BOX = 5; //TODO
|
||||
public const ENTRY_SHAPELESS = 0;
|
||||
public const ENTRY_SHAPED = 1;
|
||||
public const ENTRY_FURNACE = 2;
|
||||
public const ENTRY_FURNACE_DATA = 3;
|
||||
public const ENTRY_MULTI = 4; //TODO
|
||||
public const ENTRY_SHULKER_BOX = 5; //TODO
|
||||
|
||||
/** @var object[] */
|
||||
public $entries = [];
|
||||
|
@ -30,7 +30,7 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\utils\UUID;
|
||||
|
||||
class CraftingEventPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::CRAFTING_EVENT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::CRAFTING_EVENT_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $windowId;
|
||||
|
@ -37,7 +37,7 @@ use pocketmine\utils\Utils;
|
||||
|
||||
abstract class DataPacket extends BinaryStream{
|
||||
|
||||
const NETWORK_ID = 0;
|
||||
public const NETWORK_ID = 0;
|
||||
|
||||
/** @var bool */
|
||||
public $isEncoded = false;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class DisconnectPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::DISCONNECT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::DISCONNECT_PACKET;
|
||||
|
||||
/** @var bool */
|
||||
public $hideDisconnectionScreen = false;
|
||||
|
@ -29,56 +29,56 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class EntityEventPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::ENTITY_EVENT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::ENTITY_EVENT_PACKET;
|
||||
|
||||
const HURT_ANIMATION = 2;
|
||||
const DEATH_ANIMATION = 3;
|
||||
const ARM_SWING = 4;
|
||||
public const HURT_ANIMATION = 2;
|
||||
public const DEATH_ANIMATION = 3;
|
||||
public const ARM_SWING = 4;
|
||||
|
||||
const TAME_FAIL = 6;
|
||||
const TAME_SUCCESS = 7;
|
||||
const SHAKE_WET = 8;
|
||||
const USE_ITEM = 9;
|
||||
const EAT_GRASS_ANIMATION = 10;
|
||||
const FISH_HOOK_BUBBLE = 11;
|
||||
const FISH_HOOK_POSITION = 12;
|
||||
const FISH_HOOK_HOOK = 13;
|
||||
const FISH_HOOK_TEASE = 14;
|
||||
const SQUID_INK_CLOUD = 15;
|
||||
const ZOMBIE_VILLAGER_CURE = 16;
|
||||
public const TAME_FAIL = 6;
|
||||
public const TAME_SUCCESS = 7;
|
||||
public const SHAKE_WET = 8;
|
||||
public const USE_ITEM = 9;
|
||||
public const EAT_GRASS_ANIMATION = 10;
|
||||
public const FISH_HOOK_BUBBLE = 11;
|
||||
public const FISH_HOOK_POSITION = 12;
|
||||
public const FISH_HOOK_HOOK = 13;
|
||||
public const FISH_HOOK_TEASE = 14;
|
||||
public const SQUID_INK_CLOUD = 15;
|
||||
public const ZOMBIE_VILLAGER_CURE = 16;
|
||||
|
||||
const RESPAWN = 18;
|
||||
const IRON_GOLEM_OFFER_FLOWER = 19;
|
||||
const IRON_GOLEM_WITHDRAW_FLOWER = 20;
|
||||
const LOVE_PARTICLES = 21; //breeding
|
||||
public const RESPAWN = 18;
|
||||
public const IRON_GOLEM_OFFER_FLOWER = 19;
|
||||
public const IRON_GOLEM_WITHDRAW_FLOWER = 20;
|
||||
public const LOVE_PARTICLES = 21; //breeding
|
||||
|
||||
const WITCH_SPELL_PARTICLES = 24;
|
||||
const FIREWORK_PARTICLES = 25;
|
||||
public const WITCH_SPELL_PARTICLES = 24;
|
||||
public const FIREWORK_PARTICLES = 25;
|
||||
|
||||
const SILVERFISH_SPAWN_ANIMATION = 27;
|
||||
public const SILVERFISH_SPAWN_ANIMATION = 27;
|
||||
|
||||
const WITCH_DRINK_POTION = 29;
|
||||
const WITCH_THROW_POTION = 30;
|
||||
const MINECART_TNT_PRIME_FUSE = 31;
|
||||
public const WITCH_DRINK_POTION = 29;
|
||||
public const WITCH_THROW_POTION = 30;
|
||||
public const MINECART_TNT_PRIME_FUSE = 31;
|
||||
|
||||
const PLAYER_ADD_XP_LEVELS = 34;
|
||||
const ELDER_GUARDIAN_CURSE = 35;
|
||||
const AGENT_ARM_SWING = 36;
|
||||
const ENDER_DRAGON_DEATH = 37;
|
||||
const DUST_PARTICLES = 38; //not sure what this is
|
||||
public const PLAYER_ADD_XP_LEVELS = 34;
|
||||
public const ELDER_GUARDIAN_CURSE = 35;
|
||||
public const AGENT_ARM_SWING = 36;
|
||||
public const ENDER_DRAGON_DEATH = 37;
|
||||
public const DUST_PARTICLES = 38; //not sure what this is
|
||||
|
||||
const EATING_ITEM = 57;
|
||||
public const EATING_ITEM = 57;
|
||||
|
||||
const BABY_ANIMAL_FEED = 60; //green particles, like bonemeal on crops
|
||||
const DEATH_SMOKE_CLOUD = 61;
|
||||
const COMPLETE_TRADE = 62;
|
||||
const REMOVE_LEASH = 63; //data 1 = cut leash
|
||||
public const BABY_ANIMAL_FEED = 60; //green particles, like bonemeal on crops
|
||||
public const DEATH_SMOKE_CLOUD = 61;
|
||||
public const COMPLETE_TRADE = 62;
|
||||
public const REMOVE_LEASH = 63; //data 1 = cut leash
|
||||
|
||||
const CONSUME_TOTEM = 65;
|
||||
const PLAYER_CHECK_TREASURE_HUNTER_ACHIEVEMENT = 66; //mojang...
|
||||
const ENTITY_SPAWN = 67; //used for MinecraftEventing stuff, not needed
|
||||
const DRAGON_PUKE = 68; //they call this puke particles
|
||||
const ITEM_ENTITY_MERGE = 69;
|
||||
public const CONSUME_TOTEM = 65;
|
||||
public const PLAYER_CHECK_TREASURE_HUNTER_ACHIEVEMENT = 66; //mojang...
|
||||
public const ENTITY_SPAWN = 67; //used for MinecraftEventing stuff, not needed
|
||||
public const DRAGON_PUKE = 68; //they call this puke particles
|
||||
public const ITEM_ENTITY_MERGE = 69;
|
||||
|
||||
//TODO: add more events
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class EntityFallPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::ENTITY_FALL_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::ENTITY_FALL_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityRuntimeId;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class EntityPickRequestPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::ENTITY_PICK_REQUEST_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::ENTITY_PICK_REQUEST_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityUniqueId;
|
||||
|
@ -28,18 +28,18 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class EventPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::EVENT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::EVENT_PACKET;
|
||||
|
||||
const TYPE_ACHIEVEMENT_AWARDED = 0;
|
||||
const TYPE_ENTITY_INTERACT = 1;
|
||||
const TYPE_PORTAL_BUILT = 2;
|
||||
const TYPE_PORTAL_USED = 3;
|
||||
const TYPE_MOB_KILLED = 4;
|
||||
const TYPE_CAULDRON_USED = 5;
|
||||
const TYPE_PLAYER_DEATH = 6;
|
||||
const TYPE_BOSS_KILLED = 7;
|
||||
const TYPE_AGENT_COMMAND = 8;
|
||||
const TYPE_AGENT_CREATED = 9;
|
||||
public const TYPE_ACHIEVEMENT_AWARDED = 0;
|
||||
public const TYPE_ENTITY_INTERACT = 1;
|
||||
public const TYPE_PORTAL_BUILT = 2;
|
||||
public const TYPE_PORTAL_USED = 3;
|
||||
public const TYPE_MOB_KILLED = 4;
|
||||
public const TYPE_CAULDRON_USED = 5;
|
||||
public const TYPE_PLAYER_DEATH = 6;
|
||||
public const TYPE_BOSS_KILLED = 7;
|
||||
public const TYPE_AGENT_COMMAND = 8;
|
||||
public const TYPE_AGENT_CREATED = 9;
|
||||
|
||||
/** @var int */
|
||||
public $playerRuntimeId;
|
||||
|
@ -30,7 +30,7 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ExplodePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::EXPLODE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::EXPLODE_PACKET;
|
||||
|
||||
/** @var Vector3 */
|
||||
public $position;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class FullChunkDataPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::FULL_CHUNK_DATA_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::FULL_CHUNK_DATA_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $chunkX;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class GameRulesChangedPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::GAME_RULES_CHANGED_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::GAME_RULES_CHANGED_PACKET;
|
||||
|
||||
/** @var array */
|
||||
public $gameRules = [];
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class GuiDataPickItemPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::GUI_DATA_PICK_ITEM_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::GUI_DATA_PICK_ITEM_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $hotbarSlot;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class HurtArmorPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::HURT_ARMOR_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::HURT_ARMOR_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $health;
|
||||
|
@ -29,12 +29,12 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class InteractPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::INTERACT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::INTERACT_PACKET;
|
||||
|
||||
const ACTION_LEAVE_VEHICLE = 3;
|
||||
const ACTION_MOUSEOVER = 4;
|
||||
public const ACTION_LEAVE_VEHICLE = 3;
|
||||
public const ACTION_MOUSEOVER = 4;
|
||||
|
||||
const ACTION_OPEN_INVENTORY = 6;
|
||||
public const ACTION_OPEN_INVENTORY = 6;
|
||||
|
||||
/** @var int */
|
||||
public $action;
|
||||
|
@ -29,7 +29,7 @@ use pocketmine\item\Item;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class InventoryContentPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::INVENTORY_CONTENT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::INVENTORY_CONTENT_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $windowId;
|
||||
|
@ -29,7 +29,7 @@ use pocketmine\item\Item;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class InventorySlotPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::INVENTORY_SLOT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::INVENTORY_SLOT_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $windowId;
|
||||
|
@ -29,23 +29,23 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\network\mcpe\protocol\types\NetworkInventoryAction;
|
||||
|
||||
class InventoryTransactionPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::INVENTORY_TRANSACTION_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::INVENTORY_TRANSACTION_PACKET;
|
||||
|
||||
const TYPE_NORMAL = 0;
|
||||
const TYPE_MISMATCH = 1;
|
||||
const TYPE_USE_ITEM = 2;
|
||||
const TYPE_USE_ITEM_ON_ENTITY = 3;
|
||||
const TYPE_RELEASE_ITEM = 4;
|
||||
public const TYPE_NORMAL = 0;
|
||||
public const TYPE_MISMATCH = 1;
|
||||
public const TYPE_USE_ITEM = 2;
|
||||
public const TYPE_USE_ITEM_ON_ENTITY = 3;
|
||||
public const TYPE_RELEASE_ITEM = 4;
|
||||
|
||||
const USE_ITEM_ACTION_CLICK_BLOCK = 0;
|
||||
const USE_ITEM_ACTION_CLICK_AIR = 1;
|
||||
const USE_ITEM_ACTION_BREAK_BLOCK = 2;
|
||||
public const USE_ITEM_ACTION_CLICK_BLOCK = 0;
|
||||
public const USE_ITEM_ACTION_CLICK_AIR = 1;
|
||||
public const USE_ITEM_ACTION_BREAK_BLOCK = 2;
|
||||
|
||||
const RELEASE_ITEM_ACTION_RELEASE = 0; //bow shoot
|
||||
const RELEASE_ITEM_ACTION_CONSUME = 1; //eat food, drink potion
|
||||
public const RELEASE_ITEM_ACTION_RELEASE = 0; //bow shoot
|
||||
public const RELEASE_ITEM_ACTION_CONSUME = 1; //eat food, drink potion
|
||||
|
||||
const USE_ITEM_ON_ENTITY_ACTION_INTERACT = 0;
|
||||
const USE_ITEM_ON_ENTITY_ACTION_ATTACK = 1;
|
||||
public const USE_ITEM_ON_ENTITY_ACTION_INTERACT = 0;
|
||||
public const USE_ITEM_ON_ENTITY_ACTION_ATTACK = 1;
|
||||
|
||||
/** @var int */
|
||||
public $transactionType;
|
||||
|
@ -29,7 +29,7 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ItemFrameDropItemPacket extends DataPacket{
|
||||
|
||||
const NETWORK_ID = ProtocolInfo::ITEM_FRAME_DROP_ITEM_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::ITEM_FRAME_DROP_ITEM_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $x;
|
||||
|
@ -29,85 +29,85 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class LevelEventPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::LEVEL_EVENT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::LEVEL_EVENT_PACKET;
|
||||
|
||||
const EVENT_SOUND_CLICK = 1000;
|
||||
const EVENT_SOUND_CLICK_FAIL = 1001;
|
||||
const EVENT_SOUND_SHOOT = 1002;
|
||||
const EVENT_SOUND_DOOR = 1003;
|
||||
const EVENT_SOUND_FIZZ = 1004;
|
||||
const EVENT_SOUND_IGNITE = 1005;
|
||||
public const EVENT_SOUND_CLICK = 1000;
|
||||
public const EVENT_SOUND_CLICK_FAIL = 1001;
|
||||
public const EVENT_SOUND_SHOOT = 1002;
|
||||
public const EVENT_SOUND_DOOR = 1003;
|
||||
public const EVENT_SOUND_FIZZ = 1004;
|
||||
public const EVENT_SOUND_IGNITE = 1005;
|
||||
|
||||
const EVENT_SOUND_GHAST = 1007;
|
||||
const EVENT_SOUND_GHAST_SHOOT = 1008;
|
||||
const EVENT_SOUND_BLAZE_SHOOT = 1009;
|
||||
const EVENT_SOUND_DOOR_BUMP = 1010;
|
||||
public const EVENT_SOUND_GHAST = 1007;
|
||||
public const EVENT_SOUND_GHAST_SHOOT = 1008;
|
||||
public const EVENT_SOUND_BLAZE_SHOOT = 1009;
|
||||
public const EVENT_SOUND_DOOR_BUMP = 1010;
|
||||
|
||||
const EVENT_SOUND_DOOR_CRASH = 1012;
|
||||
public const EVENT_SOUND_DOOR_CRASH = 1012;
|
||||
|
||||
const EVENT_SOUND_ENDERMAN_TELEPORT = 1018;
|
||||
public const EVENT_SOUND_ENDERMAN_TELEPORT = 1018;
|
||||
|
||||
const EVENT_SOUND_ANVIL_BREAK = 1020;
|
||||
const EVENT_SOUND_ANVIL_USE = 1021;
|
||||
const EVENT_SOUND_ANVIL_FALL = 1022;
|
||||
public const EVENT_SOUND_ANVIL_BREAK = 1020;
|
||||
public const EVENT_SOUND_ANVIL_USE = 1021;
|
||||
public const EVENT_SOUND_ANVIL_FALL = 1022;
|
||||
|
||||
const EVENT_SOUND_POP = 1030;
|
||||
public const EVENT_SOUND_POP = 1030;
|
||||
|
||||
const EVENT_SOUND_PORTAL = 1032;
|
||||
public const EVENT_SOUND_PORTAL = 1032;
|
||||
|
||||
const EVENT_SOUND_ITEMFRAME_ADD_ITEM = 1040;
|
||||
const EVENT_SOUND_ITEMFRAME_REMOVE = 1041;
|
||||
const EVENT_SOUND_ITEMFRAME_PLACE = 1042;
|
||||
const EVENT_SOUND_ITEMFRAME_REMOVE_ITEM = 1043;
|
||||
const EVENT_SOUND_ITEMFRAME_ROTATE_ITEM = 1044;
|
||||
public const EVENT_SOUND_ITEMFRAME_ADD_ITEM = 1040;
|
||||
public const EVENT_SOUND_ITEMFRAME_REMOVE = 1041;
|
||||
public const EVENT_SOUND_ITEMFRAME_PLACE = 1042;
|
||||
public const EVENT_SOUND_ITEMFRAME_REMOVE_ITEM = 1043;
|
||||
public const EVENT_SOUND_ITEMFRAME_ROTATE_ITEM = 1044;
|
||||
|
||||
const EVENT_SOUND_CAMERA = 1050;
|
||||
const EVENT_SOUND_ORB = 1051;
|
||||
const EVENT_SOUND_TOTEM = 1052;
|
||||
public const EVENT_SOUND_CAMERA = 1050;
|
||||
public const EVENT_SOUND_ORB = 1051;
|
||||
public const EVENT_SOUND_TOTEM = 1052;
|
||||
|
||||
const EVENT_SOUND_ARMOR_STAND_BREAK = 1060;
|
||||
const EVENT_SOUND_ARMOR_STAND_HIT = 1061;
|
||||
const EVENT_SOUND_ARMOR_STAND_FALL = 1062;
|
||||
const EVENT_SOUND_ARMOR_STAND_PLACE = 1063;
|
||||
public const EVENT_SOUND_ARMOR_STAND_BREAK = 1060;
|
||||
public const EVENT_SOUND_ARMOR_STAND_HIT = 1061;
|
||||
public const EVENT_SOUND_ARMOR_STAND_FALL = 1062;
|
||||
public const EVENT_SOUND_ARMOR_STAND_PLACE = 1063;
|
||||
|
||||
//TODO: check 2000-2017
|
||||
const EVENT_PARTICLE_SHOOT = 2000;
|
||||
const EVENT_PARTICLE_DESTROY = 2001;
|
||||
const EVENT_PARTICLE_SPLASH = 2002;
|
||||
const EVENT_PARTICLE_EYE_DESPAWN = 2003;
|
||||
const EVENT_PARTICLE_SPAWN = 2004;
|
||||
public const EVENT_PARTICLE_SHOOT = 2000;
|
||||
public const EVENT_PARTICLE_DESTROY = 2001;
|
||||
public const EVENT_PARTICLE_SPLASH = 2002;
|
||||
public const EVENT_PARTICLE_EYE_DESPAWN = 2003;
|
||||
public const EVENT_PARTICLE_SPAWN = 2004;
|
||||
|
||||
const EVENT_GUARDIAN_CURSE = 2006;
|
||||
public const EVENT_GUARDIAN_CURSE = 2006;
|
||||
|
||||
const EVENT_PARTICLE_BLOCK_FORCE_FIELD = 2008;
|
||||
public const EVENT_PARTICLE_BLOCK_FORCE_FIELD = 2008;
|
||||
|
||||
const EVENT_PARTICLE_PUNCH_BLOCK = 2014;
|
||||
public const EVENT_PARTICLE_PUNCH_BLOCK = 2014;
|
||||
|
||||
const EVENT_START_RAIN = 3001;
|
||||
const EVENT_START_THUNDER = 3002;
|
||||
const EVENT_STOP_RAIN = 3003;
|
||||
const EVENT_STOP_THUNDER = 3004;
|
||||
const EVENT_PAUSE_GAME = 3005; //data: 1 to pause, 0 to resume
|
||||
public const EVENT_START_RAIN = 3001;
|
||||
public const EVENT_START_THUNDER = 3002;
|
||||
public const EVENT_STOP_RAIN = 3003;
|
||||
public const EVENT_STOP_THUNDER = 3004;
|
||||
public const EVENT_PAUSE_GAME = 3005; //data: 1 to pause, 0 to resume
|
||||
|
||||
const EVENT_REDSTONE_TRIGGER = 3500;
|
||||
const EVENT_CAULDRON_EXPLODE = 3501;
|
||||
const EVENT_CAULDRON_DYE_ARMOR = 3502;
|
||||
const EVENT_CAULDRON_CLEAN_ARMOR = 3503;
|
||||
const EVENT_CAULDRON_FILL_POTION = 3504;
|
||||
const EVENT_CAULDRON_TAKE_POTION = 3505;
|
||||
const EVENT_CAULDRON_FILL_WATER = 3506;
|
||||
const EVENT_CAULDRON_TAKE_WATER = 3507;
|
||||
const EVENT_CAULDRON_ADD_DYE = 3508;
|
||||
const EVENT_CAULDRON_CLEAN_BANNER = 3509;
|
||||
public const EVENT_REDSTONE_TRIGGER = 3500;
|
||||
public const EVENT_CAULDRON_EXPLODE = 3501;
|
||||
public const EVENT_CAULDRON_DYE_ARMOR = 3502;
|
||||
public const EVENT_CAULDRON_CLEAN_ARMOR = 3503;
|
||||
public const EVENT_CAULDRON_FILL_POTION = 3504;
|
||||
public const EVENT_CAULDRON_TAKE_POTION = 3505;
|
||||
public const EVENT_CAULDRON_FILL_WATER = 3506;
|
||||
public const EVENT_CAULDRON_TAKE_WATER = 3507;
|
||||
public const EVENT_CAULDRON_ADD_DYE = 3508;
|
||||
public const EVENT_CAULDRON_CLEAN_BANNER = 3509;
|
||||
|
||||
const EVENT_BLOCK_START_BREAK = 3600;
|
||||
const EVENT_BLOCK_STOP_BREAK = 3601;
|
||||
public const EVENT_BLOCK_START_BREAK = 3600;
|
||||
public const EVENT_BLOCK_STOP_BREAK = 3601;
|
||||
|
||||
const EVENT_SET_DATA = 4000;
|
||||
public const EVENT_SET_DATA = 4000;
|
||||
|
||||
const EVENT_PLAYERS_SLEEPING = 9800;
|
||||
public const EVENT_PLAYERS_SLEEPING = 9800;
|
||||
|
||||
const EVENT_ADD_PARTICLE_MASK = 0x4000;
|
||||
public const EVENT_ADD_PARTICLE_MASK = 0x4000;
|
||||
|
||||
/** @var int */
|
||||
public $evid;
|
||||
|
@ -29,169 +29,169 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class LevelSoundEventPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::LEVEL_SOUND_EVENT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::LEVEL_SOUND_EVENT_PACKET;
|
||||
|
||||
const SOUND_ITEM_USE_ON = 0;
|
||||
const SOUND_HIT = 1;
|
||||
const SOUND_STEP = 2;
|
||||
const SOUND_FLY = 3;
|
||||
const SOUND_JUMP = 4;
|
||||
const SOUND_BREAK = 5;
|
||||
const SOUND_PLACE = 6;
|
||||
const SOUND_HEAVY_STEP = 7;
|
||||
const SOUND_GALLOP = 8;
|
||||
const SOUND_FALL = 9;
|
||||
const SOUND_AMBIENT = 10;
|
||||
const SOUND_AMBIENT_BABY = 11;
|
||||
const SOUND_AMBIENT_IN_WATER = 12;
|
||||
const SOUND_BREATHE = 13;
|
||||
const SOUND_DEATH = 14;
|
||||
const SOUND_DEATH_IN_WATER = 15;
|
||||
const SOUND_DEATH_TO_ZOMBIE = 16;
|
||||
const SOUND_HURT = 17;
|
||||
const SOUND_HURT_IN_WATER = 18;
|
||||
const SOUND_MAD = 19;
|
||||
const SOUND_BOOST = 20;
|
||||
const SOUND_BOW = 21;
|
||||
const SOUND_SQUISH_BIG = 22;
|
||||
const SOUND_SQUISH_SMALL = 23;
|
||||
const SOUND_FALL_BIG = 24;
|
||||
const SOUND_FALL_SMALL = 25;
|
||||
const SOUND_SPLASH = 26;
|
||||
const SOUND_FIZZ = 27;
|
||||
const SOUND_FLAP = 28;
|
||||
const SOUND_SWIM = 29;
|
||||
const SOUND_DRINK = 30;
|
||||
const SOUND_EAT = 31;
|
||||
const SOUND_TAKEOFF = 32;
|
||||
const SOUND_SHAKE = 33;
|
||||
const SOUND_PLOP = 34;
|
||||
const SOUND_LAND = 35;
|
||||
const SOUND_SADDLE = 36;
|
||||
const SOUND_ARMOR = 37;
|
||||
const SOUND_ADD_CHEST = 38;
|
||||
const SOUND_THROW = 39;
|
||||
const SOUND_ATTACK = 40;
|
||||
const SOUND_ATTACK_NODAMAGE = 41;
|
||||
const SOUND_WARN = 42;
|
||||
const SOUND_SHEAR = 43;
|
||||
const SOUND_MILK = 44;
|
||||
const SOUND_THUNDER = 45;
|
||||
const SOUND_EXPLODE = 46;
|
||||
const SOUND_FIRE = 47;
|
||||
const SOUND_IGNITE = 48;
|
||||
const SOUND_FUSE = 49;
|
||||
const SOUND_STARE = 50;
|
||||
const SOUND_SPAWN = 51;
|
||||
const SOUND_SHOOT = 52;
|
||||
const SOUND_BREAK_BLOCK = 53;
|
||||
const SOUND_LAUNCH = 54;
|
||||
const SOUND_BLAST = 55;
|
||||
const SOUND_LARGE_BLAST = 56;
|
||||
const SOUND_TWINKLE = 57;
|
||||
const SOUND_REMEDY = 58;
|
||||
const SOUND_UNFECT = 59;
|
||||
const SOUND_LEVELUP = 60;
|
||||
const SOUND_BOW_HIT = 61;
|
||||
const SOUND_BULLET_HIT = 62;
|
||||
const SOUND_EXTINGUISH_FIRE = 63;
|
||||
const SOUND_ITEM_FIZZ = 64;
|
||||
const SOUND_CHEST_OPEN = 65;
|
||||
const SOUND_CHEST_CLOSED = 66;
|
||||
const SOUND_SHULKERBOX_OPEN = 67;
|
||||
const SOUND_SHULKERBOX_CLOSED = 68;
|
||||
const SOUND_POWER_ON = 69;
|
||||
const SOUND_POWER_OFF = 70;
|
||||
const SOUND_ATTACH = 71;
|
||||
const SOUND_DETACH = 72;
|
||||
const SOUND_DENY = 73;
|
||||
const SOUND_TRIPOD = 74;
|
||||
const SOUND_POP = 75;
|
||||
const SOUND_DROP_SLOT = 76;
|
||||
const SOUND_NOTE = 77;
|
||||
const SOUND_THORNS = 78;
|
||||
const SOUND_PISTON_IN = 79;
|
||||
const SOUND_PISTON_OUT = 80;
|
||||
const SOUND_PORTAL = 81;
|
||||
const SOUND_WATER = 82;
|
||||
const SOUND_LAVA_POP = 83;
|
||||
const SOUND_LAVA = 84;
|
||||
const SOUND_BURP = 85;
|
||||
const SOUND_BUCKET_FILL_WATER = 86;
|
||||
const SOUND_BUCKET_FILL_LAVA = 87;
|
||||
const SOUND_BUCKET_EMPTY_WATER = 88;
|
||||
const SOUND_BUCKET_EMPTY_LAVA = 89;
|
||||
const SOUND_RECORD_13 = 90;
|
||||
const SOUND_RECORD_CAT = 91;
|
||||
const SOUND_RECORD_BLOCKS = 92;
|
||||
const SOUND_RECORD_CHIRP = 93;
|
||||
const SOUND_RECORD_FAR = 94;
|
||||
const SOUND_RECORD_MALL = 95;
|
||||
const SOUND_RECORD_MELLOHI = 96;
|
||||
const SOUND_RECORD_STAL = 97;
|
||||
const SOUND_RECORD_STRAD = 98;
|
||||
const SOUND_RECORD_WARD = 99;
|
||||
const SOUND_RECORD_11 = 100;
|
||||
const SOUND_RECORD_WAIT = 101;
|
||||
const SOUND_GUARDIAN_FLOP = 103;
|
||||
const SOUND_ELDERGUARDIAN_CURSE = 104;
|
||||
const SOUND_MOB_WARNING = 105;
|
||||
const SOUND_MOB_WARNING_BABY = 106;
|
||||
const SOUND_TELEPORT = 107;
|
||||
const SOUND_SHULKER_OPEN = 108;
|
||||
const SOUND_SHULKER_CLOSE = 109;
|
||||
const SOUND_HAGGLE = 110;
|
||||
const SOUND_HAGGLE_YES = 111;
|
||||
const SOUND_HAGGLE_NO = 112;
|
||||
const SOUND_HAGGLE_IDLE = 113;
|
||||
const SOUND_CHORUSGROW = 114;
|
||||
const SOUND_CHORUSDEATH = 115;
|
||||
const SOUND_GLASS = 116;
|
||||
const SOUND_CAST_SPELL = 117;
|
||||
const SOUND_PREPARE_ATTACK = 118;
|
||||
const SOUND_PREPARE_SUMMON = 119;
|
||||
const SOUND_PREPARE_WOLOLO = 120;
|
||||
const SOUND_FANG = 121;
|
||||
const SOUND_CHARGE = 122;
|
||||
const SOUND_CAMERA_TAKE_PICTURE = 123;
|
||||
const SOUND_LEASHKNOT_PLACE = 124;
|
||||
const SOUND_LEASHKNOT_BREAK = 125;
|
||||
const SOUND_GROWL = 126;
|
||||
const SOUND_WHINE = 127;
|
||||
const SOUND_PANT = 128;
|
||||
const SOUND_PURR = 129;
|
||||
const SOUND_PURREOW = 130;
|
||||
const SOUND_DEATH_MIN_VOLUME = 131;
|
||||
const SOUND_DEATH_MID_VOLUME = 132;
|
||||
const SOUND_IMITATE_BLAZE = 133;
|
||||
const SOUND_IMITATE_CAVE_SPIDER = 134;
|
||||
const SOUND_IMITATE_CREEPER = 135;
|
||||
const SOUND_IMITATE_ELDER_GUARDIAN = 136;
|
||||
const SOUND_IMITATE_ENDER_DRAGON = 137;
|
||||
const SOUND_IMITATE_ENDERMAN = 138;
|
||||
const SOUND_IMITATE_EVOCATION_ILLAGER = 140;
|
||||
const SOUND_IMITATE_GHAST = 141;
|
||||
const SOUND_IMITATE_HUSK = 142;
|
||||
const SOUND_IMITATE_ILLUSION_ILLAGER = 143;
|
||||
const SOUND_IMITATE_MAGMA_CUBE = 144;
|
||||
const SOUND_IMITATE_POLAR_BEAR = 145;
|
||||
const SOUND_IMITATE_SHULKER = 146;
|
||||
const SOUND_IMITATE_SILVERFISH = 147;
|
||||
const SOUND_IMITATE_SKELETON = 148;
|
||||
const SOUND_IMITATE_SLIME = 149;
|
||||
const SOUND_IMITATE_SPIDER = 150;
|
||||
const SOUND_IMITATE_STRAY = 151;
|
||||
const SOUND_IMITATE_VEX = 152;
|
||||
const SOUND_IMITATE_VINDICATION_ILLAGER = 153;
|
||||
const SOUND_IMITATE_WITCH = 154;
|
||||
const SOUND_IMITATE_WITHER = 155;
|
||||
const SOUND_IMITATE_WITHER_SKELETON = 156;
|
||||
const SOUND_IMITATE_WOLF = 157;
|
||||
const SOUND_IMITATE_ZOMBIE = 158;
|
||||
const SOUND_IMITATE_ZOMBIE_PIGMAN = 159;
|
||||
const SOUND_IMITATE_ZOMBIE_VILLAGER = 160;
|
||||
const SOUND_DEFAULT = 161;
|
||||
const SOUND_UNDEFINED = 162;
|
||||
public const SOUND_ITEM_USE_ON = 0;
|
||||
public const SOUND_HIT = 1;
|
||||
public const SOUND_STEP = 2;
|
||||
public const SOUND_FLY = 3;
|
||||
public const SOUND_JUMP = 4;
|
||||
public const SOUND_BREAK = 5;
|
||||
public const SOUND_PLACE = 6;
|
||||
public const SOUND_HEAVY_STEP = 7;
|
||||
public const SOUND_GALLOP = 8;
|
||||
public const SOUND_FALL = 9;
|
||||
public const SOUND_AMBIENT = 10;
|
||||
public const SOUND_AMBIENT_BABY = 11;
|
||||
public const SOUND_AMBIENT_IN_WATER = 12;
|
||||
public const SOUND_BREATHE = 13;
|
||||
public const SOUND_DEATH = 14;
|
||||
public const SOUND_DEATH_IN_WATER = 15;
|
||||
public const SOUND_DEATH_TO_ZOMBIE = 16;
|
||||
public const SOUND_HURT = 17;
|
||||
public const SOUND_HURT_IN_WATER = 18;
|
||||
public const SOUND_MAD = 19;
|
||||
public const SOUND_BOOST = 20;
|
||||
public const SOUND_BOW = 21;
|
||||
public const SOUND_SQUISH_BIG = 22;
|
||||
public const SOUND_SQUISH_SMALL = 23;
|
||||
public const SOUND_FALL_BIG = 24;
|
||||
public const SOUND_FALL_SMALL = 25;
|
||||
public const SOUND_SPLASH = 26;
|
||||
public const SOUND_FIZZ = 27;
|
||||
public const SOUND_FLAP = 28;
|
||||
public const SOUND_SWIM = 29;
|
||||
public const SOUND_DRINK = 30;
|
||||
public const SOUND_EAT = 31;
|
||||
public const SOUND_TAKEOFF = 32;
|
||||
public const SOUND_SHAKE = 33;
|
||||
public const SOUND_PLOP = 34;
|
||||
public const SOUND_LAND = 35;
|
||||
public const SOUND_SADDLE = 36;
|
||||
public const SOUND_ARMOR = 37;
|
||||
public const SOUND_ADD_CHEST = 38;
|
||||
public const SOUND_THROW = 39;
|
||||
public const SOUND_ATTACK = 40;
|
||||
public const SOUND_ATTACK_NODAMAGE = 41;
|
||||
public const SOUND_WARN = 42;
|
||||
public const SOUND_SHEAR = 43;
|
||||
public const SOUND_MILK = 44;
|
||||
public const SOUND_THUNDER = 45;
|
||||
public const SOUND_EXPLODE = 46;
|
||||
public const SOUND_FIRE = 47;
|
||||
public const SOUND_IGNITE = 48;
|
||||
public const SOUND_FUSE = 49;
|
||||
public const SOUND_STARE = 50;
|
||||
public const SOUND_SPAWN = 51;
|
||||
public const SOUND_SHOOT = 52;
|
||||
public const SOUND_BREAK_BLOCK = 53;
|
||||
public const SOUND_LAUNCH = 54;
|
||||
public const SOUND_BLAST = 55;
|
||||
public const SOUND_LARGE_BLAST = 56;
|
||||
public const SOUND_TWINKLE = 57;
|
||||
public const SOUND_REMEDY = 58;
|
||||
public const SOUND_UNFECT = 59;
|
||||
public const SOUND_LEVELUP = 60;
|
||||
public const SOUND_BOW_HIT = 61;
|
||||
public const SOUND_BULLET_HIT = 62;
|
||||
public const SOUND_EXTINGUISH_FIRE = 63;
|
||||
public const SOUND_ITEM_FIZZ = 64;
|
||||
public const SOUND_CHEST_OPEN = 65;
|
||||
public const SOUND_CHEST_CLOSED = 66;
|
||||
public const SOUND_SHULKERBOX_OPEN = 67;
|
||||
public const SOUND_SHULKERBOX_CLOSED = 68;
|
||||
public const SOUND_POWER_ON = 69;
|
||||
public const SOUND_POWER_OFF = 70;
|
||||
public const SOUND_ATTACH = 71;
|
||||
public const SOUND_DETACH = 72;
|
||||
public const SOUND_DENY = 73;
|
||||
public const SOUND_TRIPOD = 74;
|
||||
public const SOUND_POP = 75;
|
||||
public const SOUND_DROP_SLOT = 76;
|
||||
public const SOUND_NOTE = 77;
|
||||
public const SOUND_THORNS = 78;
|
||||
public const SOUND_PISTON_IN = 79;
|
||||
public const SOUND_PISTON_OUT = 80;
|
||||
public const SOUND_PORTAL = 81;
|
||||
public const SOUND_WATER = 82;
|
||||
public const SOUND_LAVA_POP = 83;
|
||||
public const SOUND_LAVA = 84;
|
||||
public const SOUND_BURP = 85;
|
||||
public const SOUND_BUCKET_FILL_WATER = 86;
|
||||
public const SOUND_BUCKET_FILL_LAVA = 87;
|
||||
public const SOUND_BUCKET_EMPTY_WATER = 88;
|
||||
public const SOUND_BUCKET_EMPTY_LAVA = 89;
|
||||
public const SOUND_RECORD_13 = 90;
|
||||
public const SOUND_RECORD_CAT = 91;
|
||||
public const SOUND_RECORD_BLOCKS = 92;
|
||||
public const SOUND_RECORD_CHIRP = 93;
|
||||
public const SOUND_RECORD_FAR = 94;
|
||||
public const SOUND_RECORD_MALL = 95;
|
||||
public const SOUND_RECORD_MELLOHI = 96;
|
||||
public const SOUND_RECORD_STAL = 97;
|
||||
public const SOUND_RECORD_STRAD = 98;
|
||||
public const SOUND_RECORD_WARD = 99;
|
||||
public const SOUND_RECORD_11 = 100;
|
||||
public const SOUND_RECORD_WAIT = 101;
|
||||
public const SOUND_GUARDIAN_FLOP = 103;
|
||||
public const SOUND_ELDERGUARDIAN_CURSE = 104;
|
||||
public const SOUND_MOB_WARNING = 105;
|
||||
public const SOUND_MOB_WARNING_BABY = 106;
|
||||
public const SOUND_TELEPORT = 107;
|
||||
public const SOUND_SHULKER_OPEN = 108;
|
||||
public const SOUND_SHULKER_CLOSE = 109;
|
||||
public const SOUND_HAGGLE = 110;
|
||||
public const SOUND_HAGGLE_YES = 111;
|
||||
public const SOUND_HAGGLE_NO = 112;
|
||||
public const SOUND_HAGGLE_IDLE = 113;
|
||||
public const SOUND_CHORUSGROW = 114;
|
||||
public const SOUND_CHORUSDEATH = 115;
|
||||
public const SOUND_GLASS = 116;
|
||||
public const SOUND_CAST_SPELL = 117;
|
||||
public const SOUND_PREPARE_ATTACK = 118;
|
||||
public const SOUND_PREPARE_SUMMON = 119;
|
||||
public const SOUND_PREPARE_WOLOLO = 120;
|
||||
public const SOUND_FANG = 121;
|
||||
public const SOUND_CHARGE = 122;
|
||||
public const SOUND_CAMERA_TAKE_PICTURE = 123;
|
||||
public const SOUND_LEASHKNOT_PLACE = 124;
|
||||
public const SOUND_LEASHKNOT_BREAK = 125;
|
||||
public const SOUND_GROWL = 126;
|
||||
public const SOUND_WHINE = 127;
|
||||
public const SOUND_PANT = 128;
|
||||
public const SOUND_PURR = 129;
|
||||
public const SOUND_PURREOW = 130;
|
||||
public const SOUND_DEATH_MIN_VOLUME = 131;
|
||||
public const SOUND_DEATH_MID_VOLUME = 132;
|
||||
public const SOUND_IMITATE_BLAZE = 133;
|
||||
public const SOUND_IMITATE_CAVE_SPIDER = 134;
|
||||
public const SOUND_IMITATE_CREEPER = 135;
|
||||
public const SOUND_IMITATE_ELDER_GUARDIAN = 136;
|
||||
public const SOUND_IMITATE_ENDER_DRAGON = 137;
|
||||
public const SOUND_IMITATE_ENDERMAN = 138;
|
||||
public const SOUND_IMITATE_EVOCATION_ILLAGER = 140;
|
||||
public const SOUND_IMITATE_GHAST = 141;
|
||||
public const SOUND_IMITATE_HUSK = 142;
|
||||
public const SOUND_IMITATE_ILLUSION_ILLAGER = 143;
|
||||
public const SOUND_IMITATE_MAGMA_CUBE = 144;
|
||||
public const SOUND_IMITATE_POLAR_BEAR = 145;
|
||||
public const SOUND_IMITATE_SHULKER = 146;
|
||||
public const SOUND_IMITATE_SILVERFISH = 147;
|
||||
public const SOUND_IMITATE_SKELETON = 148;
|
||||
public const SOUND_IMITATE_SLIME = 149;
|
||||
public const SOUND_IMITATE_SPIDER = 150;
|
||||
public const SOUND_IMITATE_STRAY = 151;
|
||||
public const SOUND_IMITATE_VEX = 152;
|
||||
public const SOUND_IMITATE_VINDICATION_ILLAGER = 153;
|
||||
public const SOUND_IMITATE_WITCH = 154;
|
||||
public const SOUND_IMITATE_WITHER = 155;
|
||||
public const SOUND_IMITATE_WITHER_SKELETON = 156;
|
||||
public const SOUND_IMITATE_WOLF = 157;
|
||||
public const SOUND_IMITATE_ZOMBIE = 158;
|
||||
public const SOUND_IMITATE_ZOMBIE_PIGMAN = 159;
|
||||
public const SOUND_IMITATE_ZOMBIE_VILLAGER = 160;
|
||||
public const SOUND_DEFAULT = 161;
|
||||
public const SOUND_UNDEFINED = 162;
|
||||
|
||||
/** @var int */
|
||||
public $sound;
|
||||
|
@ -32,9 +32,9 @@ use pocketmine\utils\MainLogger;
|
||||
use pocketmine\utils\Utils;
|
||||
|
||||
class LoginPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::LOGIN_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::LOGIN_PACKET;
|
||||
|
||||
const EDITION_POCKET = 0;
|
||||
public const EDITION_POCKET = 0;
|
||||
|
||||
/** @var string */
|
||||
public $username;
|
||||
|
@ -30,7 +30,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class MapInfoRequestPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::MAP_INFO_REQUEST_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::MAP_INFO_REQUEST_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $mapId;
|
||||
|
@ -30,7 +30,7 @@ use pocketmine\item\Item;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class MobArmorEquipmentPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::MOB_ARMOR_EQUIPMENT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::MOB_ARMOR_EQUIPMENT_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityRuntimeId;
|
||||
|
@ -29,11 +29,11 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class MobEffectPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::MOB_EFFECT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::MOB_EFFECT_PACKET;
|
||||
|
||||
const EVENT_ADD = 1;
|
||||
const EVENT_MODIFY = 2;
|
||||
const EVENT_REMOVE = 3;
|
||||
public const EVENT_ADD = 1;
|
||||
public const EVENT_MODIFY = 2;
|
||||
public const EVENT_REMOVE = 3;
|
||||
|
||||
/** @var int */
|
||||
public $entityRuntimeId;
|
||||
|
@ -30,7 +30,7 @@ use pocketmine\item\Item;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class MobEquipmentPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::MOB_EQUIPMENT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::MOB_EQUIPMENT_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityRuntimeId;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ModalFormRequestPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::MODAL_FORM_REQUEST_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::MODAL_FORM_REQUEST_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $formId;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ModalFormResponsePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::MODAL_FORM_RESPONSE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::MODAL_FORM_RESPONSE_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $formId;
|
||||
|
@ -30,7 +30,7 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class MoveEntityPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::MOVE_ENTITY_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::MOVE_ENTITY_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityRuntimeId;
|
||||
|
@ -30,12 +30,12 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class MovePlayerPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::MOVE_PLAYER_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::MOVE_PLAYER_PACKET;
|
||||
|
||||
const MODE_NORMAL = 0;
|
||||
const MODE_RESET = 1;
|
||||
const MODE_TELEPORT = 2;
|
||||
const MODE_PITCH = 3; //facepalm Mojang
|
||||
public const MODE_NORMAL = 0;
|
||||
public const MODE_RESET = 1;
|
||||
public const MODE_TELEPORT = 2;
|
||||
public const MODE_PITCH = 3; //facepalm Mojang
|
||||
|
||||
/** @var int */
|
||||
public $entityRuntimeId;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class NpcRequestPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::NPC_REQUEST_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::NPC_REQUEST_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityRuntimeId;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class PhotoTransferPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::PHOTO_TRANSFER_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::PHOTO_TRANSFER_PACKET;
|
||||
|
||||
/** @var string */
|
||||
public $photoName;
|
||||
|
@ -30,7 +30,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class PlaySoundPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::PLAY_SOUND_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::PLAY_SOUND_PACKET;
|
||||
|
||||
/** @var string */
|
||||
public $soundName;
|
||||
|
@ -29,15 +29,15 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class PlayStatusPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::PLAY_STATUS_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::PLAY_STATUS_PACKET;
|
||||
|
||||
const LOGIN_SUCCESS = 0;
|
||||
const LOGIN_FAILED_CLIENT = 1;
|
||||
const LOGIN_FAILED_SERVER = 2;
|
||||
const PLAYER_SPAWN = 3;
|
||||
const LOGIN_FAILED_INVALID_TENANT = 4;
|
||||
const LOGIN_FAILED_VANILLA_EDU = 5;
|
||||
const LOGIN_FAILED_EDU_VANILLA = 6;
|
||||
public const LOGIN_SUCCESS = 0;
|
||||
public const LOGIN_FAILED_CLIENT = 1;
|
||||
public const LOGIN_FAILED_SERVER = 2;
|
||||
public const PLAYER_SPAWN = 3;
|
||||
public const LOGIN_FAILED_INVALID_TENANT = 4;
|
||||
public const LOGIN_FAILED_VANILLA_EDU = 5;
|
||||
public const LOGIN_FAILED_EDU_VANILLA = 6;
|
||||
|
||||
/** @var int */
|
||||
public $status;
|
||||
|
@ -29,29 +29,29 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class PlayerActionPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::PLAYER_ACTION_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::PLAYER_ACTION_PACKET;
|
||||
|
||||
const ACTION_START_BREAK = 0;
|
||||
const ACTION_ABORT_BREAK = 1;
|
||||
const ACTION_STOP_BREAK = 2;
|
||||
const ACTION_GET_UPDATED_BLOCK = 3;
|
||||
const ACTION_DROP_ITEM = 4;
|
||||
const ACTION_START_SLEEPING = 5;
|
||||
const ACTION_STOP_SLEEPING = 6;
|
||||
const ACTION_RESPAWN = 7;
|
||||
const ACTION_JUMP = 8;
|
||||
const ACTION_START_SPRINT = 9;
|
||||
const ACTION_STOP_SPRINT = 10;
|
||||
const ACTION_START_SNEAK = 11;
|
||||
const ACTION_STOP_SNEAK = 12;
|
||||
const ACTION_DIMENSION_CHANGE_REQUEST = 13; //sent when dying in different dimension
|
||||
const ACTION_DIMENSION_CHANGE_ACK = 14; //sent when spawning in a different dimension to tell the server we spawned
|
||||
const ACTION_START_GLIDE = 15;
|
||||
const ACTION_STOP_GLIDE = 16;
|
||||
const ACTION_BUILD_DENIED = 17;
|
||||
const ACTION_CONTINUE_BREAK = 18;
|
||||
public const ACTION_START_BREAK = 0;
|
||||
public const ACTION_ABORT_BREAK = 1;
|
||||
public const ACTION_STOP_BREAK = 2;
|
||||
public const ACTION_GET_UPDATED_BLOCK = 3;
|
||||
public const ACTION_DROP_ITEM = 4;
|
||||
public const ACTION_START_SLEEPING = 5;
|
||||
public const ACTION_STOP_SLEEPING = 6;
|
||||
public const ACTION_RESPAWN = 7;
|
||||
public const ACTION_JUMP = 8;
|
||||
public const ACTION_START_SPRINT = 9;
|
||||
public const ACTION_STOP_SPRINT = 10;
|
||||
public const ACTION_START_SNEAK = 11;
|
||||
public const ACTION_STOP_SNEAK = 12;
|
||||
public const ACTION_DIMENSION_CHANGE_REQUEST = 13; //sent when dying in different dimension
|
||||
public const ACTION_DIMENSION_CHANGE_ACK = 14; //sent when spawning in a different dimension to tell the server we spawned
|
||||
public const ACTION_START_GLIDE = 15;
|
||||
public const ACTION_STOP_GLIDE = 16;
|
||||
public const ACTION_BUILD_DENIED = 17;
|
||||
public const ACTION_CONTINUE_BREAK = 18;
|
||||
|
||||
const ACTION_SET_ENCHANTMENT_SEED = 20;
|
||||
public const ACTION_SET_ENCHANTMENT_SEED = 20;
|
||||
|
||||
/** @var int */
|
||||
public $entityRuntimeId;
|
||||
|
@ -32,7 +32,7 @@ use pocketmine\utils\Binary;
|
||||
#endif
|
||||
|
||||
class PlayerHotbarPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::PLAYER_HOTBAR_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::PLAYER_HOTBAR_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $selectedHotbarSlot;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class PlayerInputPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::PLAYER_INPUT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::PLAYER_INPUT_PACKET;
|
||||
|
||||
/** @var float */
|
||||
public $motionX;
|
||||
|
@ -31,10 +31,10 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\network\mcpe\protocol\types\PlayerListEntry;
|
||||
|
||||
class PlayerListPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::PLAYER_LIST_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::PLAYER_LIST_PACKET;
|
||||
|
||||
const TYPE_ADD = 0;
|
||||
const TYPE_REMOVE = 1;
|
||||
public const TYPE_ADD = 0;
|
||||
public const TYPE_REMOVE = 1;
|
||||
|
||||
/** @var PlayerListEntry[] */
|
||||
public $entries = [];
|
||||
|
@ -30,7 +30,7 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\utils\UUID;
|
||||
|
||||
class PlayerSkinPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::PLAYER_SKIN_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::PLAYER_SKIN_PACKET;
|
||||
|
||||
/** @var UUID */
|
||||
public $uuid;
|
||||
|
@ -39,120 +39,120 @@ interface ProtocolInfo{
|
||||
/**
|
||||
* Actual Minecraft: PE protocol version
|
||||
*/
|
||||
const CURRENT_PROTOCOL = 137;
|
||||
public const CURRENT_PROTOCOL = 137;
|
||||
/**
|
||||
* Current Minecraft PE version reported by the server. This is usually the earliest currently supported version.
|
||||
*/
|
||||
const MINECRAFT_VERSION = 'v1.2.0.81';
|
||||
public const MINECRAFT_VERSION = 'v1.2.0.81';
|
||||
/**
|
||||
* Version number sent to clients in ping responses.
|
||||
*/
|
||||
const MINECRAFT_VERSION_NETWORK = '1.2.0.81';
|
||||
public const MINECRAFT_VERSION_NETWORK = '1.2.0.81';
|
||||
|
||||
const LOGIN_PACKET = 0x01;
|
||||
const PLAY_STATUS_PACKET = 0x02;
|
||||
const SERVER_TO_CLIENT_HANDSHAKE_PACKET = 0x03;
|
||||
const CLIENT_TO_SERVER_HANDSHAKE_PACKET = 0x04;
|
||||
const DISCONNECT_PACKET = 0x05;
|
||||
const RESOURCE_PACKS_INFO_PACKET = 0x06;
|
||||
const RESOURCE_PACK_STACK_PACKET = 0x07;
|
||||
const RESOURCE_PACK_CLIENT_RESPONSE_PACKET = 0x08;
|
||||
const TEXT_PACKET = 0x09;
|
||||
const SET_TIME_PACKET = 0x0a;
|
||||
const START_GAME_PACKET = 0x0b;
|
||||
const ADD_PLAYER_PACKET = 0x0c;
|
||||
const ADD_ENTITY_PACKET = 0x0d;
|
||||
const REMOVE_ENTITY_PACKET = 0x0e;
|
||||
const ADD_ITEM_ENTITY_PACKET = 0x0f;
|
||||
const ADD_HANGING_ENTITY_PACKET = 0x10;
|
||||
const TAKE_ITEM_ENTITY_PACKET = 0x11;
|
||||
const MOVE_ENTITY_PACKET = 0x12;
|
||||
const MOVE_PLAYER_PACKET = 0x13;
|
||||
const RIDER_JUMP_PACKET = 0x14;
|
||||
const UPDATE_BLOCK_PACKET = 0x15;
|
||||
const ADD_PAINTING_PACKET = 0x16;
|
||||
const EXPLODE_PACKET = 0x17;
|
||||
const LEVEL_SOUND_EVENT_PACKET = 0x18;
|
||||
const LEVEL_EVENT_PACKET = 0x19;
|
||||
const BLOCK_EVENT_PACKET = 0x1a;
|
||||
const ENTITY_EVENT_PACKET = 0x1b;
|
||||
const MOB_EFFECT_PACKET = 0x1c;
|
||||
const UPDATE_ATTRIBUTES_PACKET = 0x1d;
|
||||
const INVENTORY_TRANSACTION_PACKET = 0x1e;
|
||||
const MOB_EQUIPMENT_PACKET = 0x1f;
|
||||
const MOB_ARMOR_EQUIPMENT_PACKET = 0x20;
|
||||
const INTERACT_PACKET = 0x21;
|
||||
const BLOCK_PICK_REQUEST_PACKET = 0x22;
|
||||
const ENTITY_PICK_REQUEST_PACKET = 0x23;
|
||||
const PLAYER_ACTION_PACKET = 0x24;
|
||||
const ENTITY_FALL_PACKET = 0x25;
|
||||
const HURT_ARMOR_PACKET = 0x26;
|
||||
const SET_ENTITY_DATA_PACKET = 0x27;
|
||||
const SET_ENTITY_MOTION_PACKET = 0x28;
|
||||
const SET_ENTITY_LINK_PACKET = 0x29;
|
||||
const SET_HEALTH_PACKET = 0x2a;
|
||||
const SET_SPAWN_POSITION_PACKET = 0x2b;
|
||||
const ANIMATE_PACKET = 0x2c;
|
||||
const RESPAWN_PACKET = 0x2d;
|
||||
const CONTAINER_OPEN_PACKET = 0x2e;
|
||||
const CONTAINER_CLOSE_PACKET = 0x2f;
|
||||
const PLAYER_HOTBAR_PACKET = 0x30;
|
||||
const INVENTORY_CONTENT_PACKET = 0x31;
|
||||
const INVENTORY_SLOT_PACKET = 0x32;
|
||||
const CONTAINER_SET_DATA_PACKET = 0x33;
|
||||
const CRAFTING_DATA_PACKET = 0x34;
|
||||
const CRAFTING_EVENT_PACKET = 0x35;
|
||||
const GUI_DATA_PICK_ITEM_PACKET = 0x36;
|
||||
const ADVENTURE_SETTINGS_PACKET = 0x37;
|
||||
const BLOCK_ENTITY_DATA_PACKET = 0x38;
|
||||
const PLAYER_INPUT_PACKET = 0x39;
|
||||
const FULL_CHUNK_DATA_PACKET = 0x3a;
|
||||
const SET_COMMANDS_ENABLED_PACKET = 0x3b;
|
||||
const SET_DIFFICULTY_PACKET = 0x3c;
|
||||
const CHANGE_DIMENSION_PACKET = 0x3d;
|
||||
const SET_PLAYER_GAME_TYPE_PACKET = 0x3e;
|
||||
const PLAYER_LIST_PACKET = 0x3f;
|
||||
const SIMPLE_EVENT_PACKET = 0x40;
|
||||
const EVENT_PACKET = 0x41;
|
||||
const SPAWN_EXPERIENCE_ORB_PACKET = 0x42;
|
||||
const CLIENTBOUND_MAP_ITEM_DATA_PACKET = 0x43;
|
||||
const MAP_INFO_REQUEST_PACKET = 0x44;
|
||||
const REQUEST_CHUNK_RADIUS_PACKET = 0x45;
|
||||
const CHUNK_RADIUS_UPDATED_PACKET = 0x46;
|
||||
const ITEM_FRAME_DROP_ITEM_PACKET = 0x47;
|
||||
const GAME_RULES_CHANGED_PACKET = 0x48;
|
||||
const CAMERA_PACKET = 0x49;
|
||||
const BOSS_EVENT_PACKET = 0x4a;
|
||||
const SHOW_CREDITS_PACKET = 0x4b;
|
||||
const AVAILABLE_COMMANDS_PACKET = 0x4c;
|
||||
const COMMAND_REQUEST_PACKET = 0x4d;
|
||||
const COMMAND_BLOCK_UPDATE_PACKET = 0x4e;
|
||||
const COMMAND_OUTPUT_PACKET = 0x4f;
|
||||
const UPDATE_TRADE_PACKET = 0x50;
|
||||
const UPDATE_EQUIP_PACKET = 0x51;
|
||||
const RESOURCE_PACK_DATA_INFO_PACKET = 0x52;
|
||||
const RESOURCE_PACK_CHUNK_DATA_PACKET = 0x53;
|
||||
const RESOURCE_PACK_CHUNK_REQUEST_PACKET = 0x54;
|
||||
const TRANSFER_PACKET = 0x55;
|
||||
const PLAY_SOUND_PACKET = 0x56;
|
||||
const STOP_SOUND_PACKET = 0x57;
|
||||
const SET_TITLE_PACKET = 0x58;
|
||||
const ADD_BEHAVIOR_TREE_PACKET = 0x59;
|
||||
const STRUCTURE_BLOCK_UPDATE_PACKET = 0x5a;
|
||||
const SHOW_STORE_OFFER_PACKET = 0x5b;
|
||||
const PURCHASE_RECEIPT_PACKET = 0x5c;
|
||||
const PLAYER_SKIN_PACKET = 0x5d;
|
||||
const SUB_CLIENT_LOGIN_PACKET = 0x5e;
|
||||
const W_S_CONNECT_PACKET = 0x5f;
|
||||
const SET_LAST_HURT_BY_PACKET = 0x60;
|
||||
const BOOK_EDIT_PACKET = 0x61;
|
||||
const NPC_REQUEST_PACKET = 0x62;
|
||||
const PHOTO_TRANSFER_PACKET = 0x63;
|
||||
const MODAL_FORM_REQUEST_PACKET = 0x64;
|
||||
const MODAL_FORM_RESPONSE_PACKET = 0x65;
|
||||
const SERVER_SETTINGS_REQUEST_PACKET = 0x66;
|
||||
const SERVER_SETTINGS_RESPONSE_PACKET = 0x67;
|
||||
const SHOW_PROFILE_PACKET = 0x68;
|
||||
const SET_DEFAULT_GAME_TYPE_PACKET = 0x69;
|
||||
public const LOGIN_PACKET = 0x01;
|
||||
public const PLAY_STATUS_PACKET = 0x02;
|
||||
public const SERVER_TO_CLIENT_HANDSHAKE_PACKET = 0x03;
|
||||
public const CLIENT_TO_SERVER_HANDSHAKE_PACKET = 0x04;
|
||||
public const DISCONNECT_PACKET = 0x05;
|
||||
public const RESOURCE_PACKS_INFO_PACKET = 0x06;
|
||||
public const RESOURCE_PACK_STACK_PACKET = 0x07;
|
||||
public const RESOURCE_PACK_CLIENT_RESPONSE_PACKET = 0x08;
|
||||
public const TEXT_PACKET = 0x09;
|
||||
public const SET_TIME_PACKET = 0x0a;
|
||||
public const START_GAME_PACKET = 0x0b;
|
||||
public const ADD_PLAYER_PACKET = 0x0c;
|
||||
public const ADD_ENTITY_PACKET = 0x0d;
|
||||
public const REMOVE_ENTITY_PACKET = 0x0e;
|
||||
public const ADD_ITEM_ENTITY_PACKET = 0x0f;
|
||||
public const ADD_HANGING_ENTITY_PACKET = 0x10;
|
||||
public const TAKE_ITEM_ENTITY_PACKET = 0x11;
|
||||
public const MOVE_ENTITY_PACKET = 0x12;
|
||||
public const MOVE_PLAYER_PACKET = 0x13;
|
||||
public const RIDER_JUMP_PACKET = 0x14;
|
||||
public const UPDATE_BLOCK_PACKET = 0x15;
|
||||
public const ADD_PAINTING_PACKET = 0x16;
|
||||
public const EXPLODE_PACKET = 0x17;
|
||||
public const LEVEL_SOUND_EVENT_PACKET = 0x18;
|
||||
public const LEVEL_EVENT_PACKET = 0x19;
|
||||
public const BLOCK_EVENT_PACKET = 0x1a;
|
||||
public const ENTITY_EVENT_PACKET = 0x1b;
|
||||
public const MOB_EFFECT_PACKET = 0x1c;
|
||||
public const UPDATE_ATTRIBUTES_PACKET = 0x1d;
|
||||
public const INVENTORY_TRANSACTION_PACKET = 0x1e;
|
||||
public const MOB_EQUIPMENT_PACKET = 0x1f;
|
||||
public const MOB_ARMOR_EQUIPMENT_PACKET = 0x20;
|
||||
public const INTERACT_PACKET = 0x21;
|
||||
public const BLOCK_PICK_REQUEST_PACKET = 0x22;
|
||||
public const ENTITY_PICK_REQUEST_PACKET = 0x23;
|
||||
public const PLAYER_ACTION_PACKET = 0x24;
|
||||
public const ENTITY_FALL_PACKET = 0x25;
|
||||
public const HURT_ARMOR_PACKET = 0x26;
|
||||
public const SET_ENTITY_DATA_PACKET = 0x27;
|
||||
public const SET_ENTITY_MOTION_PACKET = 0x28;
|
||||
public const SET_ENTITY_LINK_PACKET = 0x29;
|
||||
public const SET_HEALTH_PACKET = 0x2a;
|
||||
public const SET_SPAWN_POSITION_PACKET = 0x2b;
|
||||
public const ANIMATE_PACKET = 0x2c;
|
||||
public const RESPAWN_PACKET = 0x2d;
|
||||
public const CONTAINER_OPEN_PACKET = 0x2e;
|
||||
public const CONTAINER_CLOSE_PACKET = 0x2f;
|
||||
public const PLAYER_HOTBAR_PACKET = 0x30;
|
||||
public const INVENTORY_CONTENT_PACKET = 0x31;
|
||||
public const INVENTORY_SLOT_PACKET = 0x32;
|
||||
public const CONTAINER_SET_DATA_PACKET = 0x33;
|
||||
public const CRAFTING_DATA_PACKET = 0x34;
|
||||
public const CRAFTING_EVENT_PACKET = 0x35;
|
||||
public const GUI_DATA_PICK_ITEM_PACKET = 0x36;
|
||||
public const ADVENTURE_SETTINGS_PACKET = 0x37;
|
||||
public const BLOCK_ENTITY_DATA_PACKET = 0x38;
|
||||
public const PLAYER_INPUT_PACKET = 0x39;
|
||||
public const FULL_CHUNK_DATA_PACKET = 0x3a;
|
||||
public const SET_COMMANDS_ENABLED_PACKET = 0x3b;
|
||||
public const SET_DIFFICULTY_PACKET = 0x3c;
|
||||
public const CHANGE_DIMENSION_PACKET = 0x3d;
|
||||
public const SET_PLAYER_GAME_TYPE_PACKET = 0x3e;
|
||||
public const PLAYER_LIST_PACKET = 0x3f;
|
||||
public const SIMPLE_EVENT_PACKET = 0x40;
|
||||
public const EVENT_PACKET = 0x41;
|
||||
public const SPAWN_EXPERIENCE_ORB_PACKET = 0x42;
|
||||
public const CLIENTBOUND_MAP_ITEM_DATA_PACKET = 0x43;
|
||||
public const MAP_INFO_REQUEST_PACKET = 0x44;
|
||||
public const REQUEST_CHUNK_RADIUS_PACKET = 0x45;
|
||||
public const CHUNK_RADIUS_UPDATED_PACKET = 0x46;
|
||||
public const ITEM_FRAME_DROP_ITEM_PACKET = 0x47;
|
||||
public const GAME_RULES_CHANGED_PACKET = 0x48;
|
||||
public const CAMERA_PACKET = 0x49;
|
||||
public const BOSS_EVENT_PACKET = 0x4a;
|
||||
public const SHOW_CREDITS_PACKET = 0x4b;
|
||||
public const AVAILABLE_COMMANDS_PACKET = 0x4c;
|
||||
public const COMMAND_REQUEST_PACKET = 0x4d;
|
||||
public const COMMAND_BLOCK_UPDATE_PACKET = 0x4e;
|
||||
public const COMMAND_OUTPUT_PACKET = 0x4f;
|
||||
public const UPDATE_TRADE_PACKET = 0x50;
|
||||
public const UPDATE_EQUIP_PACKET = 0x51;
|
||||
public const RESOURCE_PACK_DATA_INFO_PACKET = 0x52;
|
||||
public const RESOURCE_PACK_CHUNK_DATA_PACKET = 0x53;
|
||||
public const RESOURCE_PACK_CHUNK_REQUEST_PACKET = 0x54;
|
||||
public const TRANSFER_PACKET = 0x55;
|
||||
public const PLAY_SOUND_PACKET = 0x56;
|
||||
public const STOP_SOUND_PACKET = 0x57;
|
||||
public const SET_TITLE_PACKET = 0x58;
|
||||
public const ADD_BEHAVIOR_TREE_PACKET = 0x59;
|
||||
public const STRUCTURE_BLOCK_UPDATE_PACKET = 0x5a;
|
||||
public const SHOW_STORE_OFFER_PACKET = 0x5b;
|
||||
public const PURCHASE_RECEIPT_PACKET = 0x5c;
|
||||
public const PLAYER_SKIN_PACKET = 0x5d;
|
||||
public const SUB_CLIENT_LOGIN_PACKET = 0x5e;
|
||||
public const W_S_CONNECT_PACKET = 0x5f;
|
||||
public const SET_LAST_HURT_BY_PACKET = 0x60;
|
||||
public const BOOK_EDIT_PACKET = 0x61;
|
||||
public const NPC_REQUEST_PACKET = 0x62;
|
||||
public const PHOTO_TRANSFER_PACKET = 0x63;
|
||||
public const MODAL_FORM_REQUEST_PACKET = 0x64;
|
||||
public const MODAL_FORM_RESPONSE_PACKET = 0x65;
|
||||
public const SERVER_SETTINGS_REQUEST_PACKET = 0x66;
|
||||
public const SERVER_SETTINGS_RESPONSE_PACKET = 0x67;
|
||||
public const SHOW_PROFILE_PACKET = 0x68;
|
||||
public const SET_DEFAULT_GAME_TYPE_PACKET = 0x69;
|
||||
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class PurchaseReceiptPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::PURCHASE_RECEIPT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::PURCHASE_RECEIPT_PACKET;
|
||||
|
||||
/** @var string[] */
|
||||
public $entries = [];
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class RemoveEntityPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::REMOVE_ENTITY_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::REMOVE_ENTITY_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityUniqueId;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class RequestChunkRadiusPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::REQUEST_CHUNK_RADIUS_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::REQUEST_CHUNK_RADIUS_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $radius;
|
||||
|
@ -30,7 +30,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ResourcePackChunkDataPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_CHUNK_DATA_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_CHUNK_DATA_PACKET;
|
||||
|
||||
/** @var string */
|
||||
public $packId;
|
||||
|
@ -30,7 +30,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ResourcePackChunkRequestPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_CHUNK_REQUEST_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_CHUNK_REQUEST_PACKET;
|
||||
|
||||
/** @var string */
|
||||
public $packId;
|
||||
|
@ -29,12 +29,12 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ResourcePackClientResponsePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_CLIENT_RESPONSE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_CLIENT_RESPONSE_PACKET;
|
||||
|
||||
const STATUS_REFUSED = 1;
|
||||
const STATUS_SEND_PACKS = 2;
|
||||
const STATUS_HAVE_ALL_PACKS = 3;
|
||||
const STATUS_COMPLETED = 4;
|
||||
public const STATUS_REFUSED = 1;
|
||||
public const STATUS_SEND_PACKS = 2;
|
||||
public const STATUS_HAVE_ALL_PACKS = 3;
|
||||
public const STATUS_COMPLETED = 4;
|
||||
|
||||
/** @var int */
|
||||
public $status;
|
||||
|
@ -30,7 +30,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ResourcePackDataInfoPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_DATA_INFO_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_DATA_INFO_PACKET;
|
||||
|
||||
/** @var string */
|
||||
public $packId;
|
||||
|
@ -32,7 +32,7 @@ use pocketmine\resourcepacks\ResourcePack;
|
||||
use pocketmine\resourcepacks\ResourcePackInfoEntry;
|
||||
|
||||
class ResourcePackStackPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_STACK_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::RESOURCE_PACK_STACK_PACKET;
|
||||
|
||||
/** @var bool */
|
||||
public $mustAccept = false;
|
||||
|
@ -31,7 +31,7 @@ use pocketmine\resourcepacks\ResourcePack;
|
||||
use pocketmine\resourcepacks\ResourcePackInfoEntry;
|
||||
|
||||
class ResourcePacksInfoPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::RESOURCE_PACKS_INFO_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::RESOURCE_PACKS_INFO_PACKET;
|
||||
|
||||
/** @var bool */
|
||||
public $mustAccept = false; //if true, forces client to use selected resource packs
|
||||
|
@ -30,7 +30,7 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class RespawnPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::RESPAWN_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::RESPAWN_PACKET;
|
||||
|
||||
/** @var Vector3 */
|
||||
public $position;
|
||||
|
@ -30,7 +30,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class RiderJumpPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::RIDER_JUMP_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::RIDER_JUMP_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $unknown;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ServerSettingsRequestPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SERVER_SETTINGS_REQUEST_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SERVER_SETTINGS_REQUEST_PACKET;
|
||||
|
||||
protected function decodePayload(){
|
||||
//No payload
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ServerSettingsResponsePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SERVER_SETTINGS_RESPONSE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SERVER_SETTINGS_RESPONSE_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $formId;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ServerToClientHandshakePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SERVER_TO_CLIENT_HANDSHAKE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SERVER_TO_CLIENT_HANDSHAKE_PACKET;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SetCommandsEnabledPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_COMMANDS_ENABLED_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SET_COMMANDS_ENABLED_PACKET;
|
||||
|
||||
/** @var bool */
|
||||
public $enabled;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SetDefaultGameTypePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_DEFAULT_GAME_TYPE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SET_DEFAULT_GAME_TYPE_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $gamemode;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SetDifficultyPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_DIFFICULTY_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SET_DIFFICULTY_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $difficulty;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SetEntityDataPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_ENTITY_DATA_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SET_ENTITY_DATA_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityRuntimeId;
|
||||
|
@ -30,7 +30,7 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\network\mcpe\protocol\types\EntityLink;
|
||||
|
||||
class SetEntityLinkPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_ENTITY_LINK_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SET_ENTITY_LINK_PACKET;
|
||||
|
||||
/** @var EntityLink */
|
||||
public $link;
|
||||
|
@ -30,7 +30,7 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SetEntityMotionPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_ENTITY_MOTION_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SET_ENTITY_MOTION_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityRuntimeId;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SetHealthPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_HEALTH_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SET_HEALTH_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $health;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SetLastHurtByPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_LAST_HURT_BY_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SET_LAST_HURT_BY_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityTypeId;
|
||||
|
@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SetPlayerGameTypePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_PLAYER_GAME_TYPE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SET_PLAYER_GAME_TYPE_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $gamemode;
|
||||
|
@ -29,10 +29,10 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SetSpawnPositionPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_SPAWN_POSITION_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SET_SPAWN_POSITION_PACKET;
|
||||
|
||||
const TYPE_PLAYER_SPAWN = 0;
|
||||
const TYPE_WORLD_SPAWN = 1;
|
||||
public const TYPE_PLAYER_SPAWN = 0;
|
||||
public const TYPE_WORLD_SPAWN = 1;
|
||||
|
||||
/** @var int */
|
||||
public $spawnType;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SetTimePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_TIME_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SET_TIME_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $time;
|
||||
|
@ -30,14 +30,14 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SetTitlePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SET_TITLE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SET_TITLE_PACKET;
|
||||
|
||||
const TYPE_CLEAR_TITLE = 0;
|
||||
const TYPE_RESET_TITLE = 1;
|
||||
const TYPE_SET_TITLE = 2;
|
||||
const TYPE_SET_SUBTITLE = 3;
|
||||
const TYPE_SET_ACTIONBAR_MESSAGE = 4;
|
||||
const TYPE_SET_ANIMATION_TIMES = 5;
|
||||
public const TYPE_CLEAR_TITLE = 0;
|
||||
public const TYPE_RESET_TITLE = 1;
|
||||
public const TYPE_SET_TITLE = 2;
|
||||
public const TYPE_SET_SUBTITLE = 3;
|
||||
public const TYPE_SET_ACTIONBAR_MESSAGE = 4;
|
||||
public const TYPE_SET_ANIMATION_TIMES = 5;
|
||||
|
||||
/** @var int */
|
||||
public $type;
|
||||
|
@ -30,10 +30,10 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ShowCreditsPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SHOW_CREDITS_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SHOW_CREDITS_PACKET;
|
||||
|
||||
const STATUS_START_CREDITS = 0;
|
||||
const STATUS_END_CREDITS = 1;
|
||||
public const STATUS_START_CREDITS = 0;
|
||||
public const STATUS_END_CREDITS = 1;
|
||||
|
||||
/** @var int */
|
||||
public $playerEid;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ShowProfilePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SHOW_PROFILE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SHOW_PROFILE_PACKET;
|
||||
|
||||
/** @var string */
|
||||
public $xuid;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class ShowStoreOfferPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SHOW_STORE_OFFER_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SHOW_STORE_OFFER_PACKET;
|
||||
|
||||
/** @var string */
|
||||
public $offerId;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SimpleEventPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SIMPLE_EVENT_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SIMPLE_EVENT_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $unknownShort1;
|
||||
|
@ -30,7 +30,7 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SpawnExperienceOrbPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SPAWN_EXPERIENCE_ORB_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SPAWN_EXPERIENCE_ORB_PACKET;
|
||||
|
||||
/** @var Vector3 */
|
||||
public $position;
|
||||
|
@ -31,7 +31,7 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\network\mcpe\protocol\types\PlayerPermissions;
|
||||
|
||||
class StartGamePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::START_GAME_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::START_GAME_PACKET;
|
||||
|
||||
/** @var int */
|
||||
public $entityUniqueId;
|
||||
|
@ -30,7 +30,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class StopSoundPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::STOP_SOUND_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::STOP_SOUND_PACKET;
|
||||
|
||||
/** @var string */
|
||||
public $soundName;
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class StructureBlockUpdatePacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::STRUCTURE_BLOCK_UPDATE_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::STRUCTURE_BLOCK_UPDATE_PACKET;
|
||||
|
||||
protected function decodePayload(){
|
||||
//TODO
|
||||
|
@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SubClientLoginPacket extends DataPacket{
|
||||
const NETWORK_ID = ProtocolInfo::SUB_CLIENT_LOGIN_PACKET;
|
||||
public const NETWORK_ID = ProtocolInfo::SUB_CLIENT_LOGIN_PACKET;
|
||||
|
||||
/** @var string */
|
||||
public $connectionRequestData;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user