mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
Protocol update for 1.0.0.1
Added PlayerFallPacket
This commit is contained in:
parent
adabd7ef65
commit
cc9736314e
@ -76,8 +76,8 @@ namespace pocketmine {
|
||||
const VERSION = "1.6.2dev";
|
||||
const API_VERSION = "2.2.0";
|
||||
const CODENAME = "Unleashed";
|
||||
const MINECRAFT_VERSION = "v1.0.0.0";
|
||||
const MINECRAFT_VERSION_NETWORK = "1.0.0.0";
|
||||
const MINECRAFT_VERSION = "v1.0.0.1";
|
||||
const MINECRAFT_VERSION_NETWORK = "1.0.0.1";
|
||||
|
||||
/*
|
||||
* Startup code. Do not look at it, it may harm you.
|
||||
|
@ -66,6 +66,7 @@ use pocketmine\network\protocol\MobEquipmentPacket;
|
||||
use pocketmine\network\protocol\MoveEntityPacket;
|
||||
use pocketmine\network\protocol\MovePlayerPacket;
|
||||
use pocketmine\network\protocol\PlayerActionPacket;
|
||||
use pocketmine\network\protocol\PlayerFallPacket;
|
||||
use pocketmine\network\protocol\PlayerInputPacket;
|
||||
use pocketmine\network\protocol\PlayerListPacket;
|
||||
use pocketmine\network\protocol\PlayStatusPacket;
|
||||
@ -341,6 +342,7 @@ class Network{
|
||||
$this->registerPacket(ProtocolInfo::MOVE_ENTITY_PACKET, MoveEntityPacket::class);
|
||||
$this->registerPacket(ProtocolInfo::MOVE_PLAYER_PACKET, MovePlayerPacket::class);
|
||||
$this->registerPacket(ProtocolInfo::PLAYER_ACTION_PACKET, PlayerActionPacket::class);
|
||||
$this->registerPacket(ProtocolInfo::PLAYER_FALL_PACKET, PlayerFallPacket::class);
|
||||
$this->registerPacket(ProtocolInfo::PLAYER_INPUT_PACKET, PlayerInputPacket::class);
|
||||
$this->registerPacket(ProtocolInfo::PLAYER_LIST_PACKET, PlayerListPacket::class);
|
||||
$this->registerPacket(ProtocolInfo::PLAY_STATUS_PACKET, PlayStatusPacket::class);
|
||||
|
@ -68,49 +68,50 @@ interface Info{
|
||||
const INTERACT_PACKET = 0x22;
|
||||
const USE_ITEM_PACKET = 0x23;
|
||||
const PLAYER_ACTION_PACKET = 0x24;
|
||||
const HURT_ARMOR_PACKET = 0x25;
|
||||
const SET_ENTITY_DATA_PACKET = 0x26;
|
||||
const SET_ENTITY_MOTION_PACKET = 0x27;
|
||||
const SET_ENTITY_LINK_PACKET = 0x28;
|
||||
const SET_HEALTH_PACKET = 0x29;
|
||||
const SET_SPAWN_POSITION_PACKET = 0x2a;
|
||||
const ANIMATE_PACKET = 0x2b;
|
||||
const RESPAWN_PACKET = 0x2c;
|
||||
const DROP_ITEM_PACKET = 0x2d;
|
||||
const INVENTORY_ACTION_PACKET = 0x2e;
|
||||
const CONTAINER_OPEN_PACKET = 0x2f;
|
||||
const CONTAINER_CLOSE_PACKET = 0x30;
|
||||
const CONTAINER_SET_SLOT_PACKET = 0x31;
|
||||
const CONTAINER_SET_DATA_PACKET = 0x32;
|
||||
const CONTAINER_SET_CONTENT_PACKET = 0x33;
|
||||
const CRAFTING_DATA_PACKET = 0x34;
|
||||
const CRAFTING_EVENT_PACKET = 0x35;
|
||||
const ADVENTURE_SETTINGS_PACKET = 0x36;
|
||||
const BLOCK_ENTITY_DATA_PACKET = 0x37;
|
||||
const PLAYER_INPUT_PACKET = 0x38;
|
||||
const FULL_CHUNK_DATA_PACKET = 0x39;
|
||||
const SET_COMMANDS_ENABLED_PACKET = 0x3a;
|
||||
const SET_DIFFICULTY_PACKET = 0x3b;
|
||||
const CHANGE_DIMENSION_PACKET = 0x3c;
|
||||
const SET_PLAYER_GAME_TYPE_PACKET = 0x3d;
|
||||
const PLAYER_LIST_PACKET = 0x3e;
|
||||
const EVENT_PACKET = 0x3f; //TelemetryEventPacket
|
||||
const SPAWN_EXPERIENCE_ORB_PACKET = 0x40;
|
||||
const CLIENTBOUND_MAP_ITEM_DATA_PACKET = 0x41; //MapItemDataPacket
|
||||
const MAP_INFO_REQUEST_PACKET = 0x42;
|
||||
const REQUEST_CHUNK_RADIUS_PACKET = 0x43;
|
||||
const CHUNK_RADIUS_UPDATED_PACKET = 0x44;
|
||||
const ITEM_FRAME_DROP_ITEM_PACKET = 0x45;
|
||||
const REPLACE_ITEM_IN_SLOT_PACKET = 0x46; //ReplaceSelectedItemPacket
|
||||
const GAME_RULES_CHANGED_PACKET = 0x47;
|
||||
const CAMERA_PACKET = 0x48;
|
||||
const ADD_ITEM_PACKET = 0x49;
|
||||
const BOSS_EVENT_PACKET = 0x4a;
|
||||
const SHOW_CREDITS_PACKET = 0x4b;
|
||||
const AVAILABLE_COMMANDS_PACKET = 0x4c;
|
||||
const COMMAND_STEP_PACKET = 0x4d;
|
||||
const RESOURCE_PACK_DATA_INFO_PACKET = 0x4e;
|
||||
const RESOURCE_PACK_CHUNK_DATA_PACKET = 0x4f;
|
||||
const RESOURCE_PACK_CHUNK_REQUEST_PACKET = 0x50;
|
||||
const PLAYER_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 DROP_ITEM_PACKET = 0x2e;
|
||||
const INVENTORY_ACTION_PACKET = 0x2f;
|
||||
const CONTAINER_OPEN_PACKET = 0x30;
|
||||
const CONTAINER_CLOSE_PACKET = 0x31;
|
||||
const CONTAINER_SET_SLOT_PACKET = 0x32;
|
||||
const CONTAINER_SET_DATA_PACKET = 0x33;
|
||||
const CONTAINER_SET_CONTENT_PACKET = 0x34;
|
||||
const CRAFTING_DATA_PACKET = 0x35;
|
||||
const CRAFTING_EVENT_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 EVENT_PACKET = 0x40; //TelemetryEventPacket
|
||||
const SPAWN_EXPERIENCE_ORB_PACKET = 0x41;
|
||||
const CLIENTBOUND_MAP_ITEM_DATA_PACKET = 0x42; //MapItemDataPacket
|
||||
const MAP_INFO_REQUEST_PACKET = 0x43;
|
||||
const REQUEST_CHUNK_RADIUS_PACKET = 0x44;
|
||||
const CHUNK_RADIUS_UPDATED_PACKET = 0x45;
|
||||
const ITEM_FRAME_DROP_ITEM_PACKET = 0x46;
|
||||
const REPLACE_ITEM_IN_SLOT_PACKET = 0x47; //ReplaceSelectedItemPacket
|
||||
const GAME_RULES_CHANGED_PACKET = 0x48;
|
||||
const CAMERA_PACKET = 0x49;
|
||||
const ADD_ITEM_PACKET = 0x4a;
|
||||
const BOSS_EVENT_PACKET = 0x4b;
|
||||
const SHOW_CREDITS_PACKET = 0x4c;
|
||||
const AVAILABLE_COMMANDS_PACKET = 0x4d;
|
||||
const COMMAND_STEP_PACKET = 0x4e;
|
||||
const RESOURCE_PACK_DATA_INFO_PACKET = 0x4f;
|
||||
const RESOURCE_PACK_CHUNK_DATA_PACKET = 0x50;
|
||||
const RESOURCE_PACK_CHUNK_REQUEST_PACKET = 0x51;
|
||||
|
||||
}
|
39
src/pocketmine/network/protocol/PlayerFallPacket.php
Normal file
39
src/pocketmine/network/protocol/PlayerFallPacket.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace pocketmine\network\protocol;
|
||||
|
||||
#include <rules/DataPacket.h>
|
||||
|
||||
|
||||
class PlayerFallPacket extends DataPacket{
|
||||
const NETWORK_ID = Info::PLAYER_FALL_PACKET;
|
||||
|
||||
public $unknown; //betting this is fall distance, but let's make sure first
|
||||
|
||||
public function decode(){
|
||||
$this->unknown = $this->getLFloat();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user