Merged in 1.0.6 changes, added autogenerated data for 1.1.0.3 (doesn't work yet) and deliberately made the same merge error as Mojang

This commit is contained in:
Dylan K. Taylor
2017-04-14 13:00:43 +01:00
parent cdf6d200ef
commit f3ab45e7d5
19 changed files with 251 additions and 93 deletions

View File

@ -32,8 +32,8 @@ interface ProtocolInfo{
* Actual Minecraft: PE protocol version
*/
const CURRENT_PROTOCOL = 110;
const MINECRAFT_VERSION = "v1.1.0.0 beta";
const MINECRAFT_VERSION_NETWORK = "1.1.0.0";
const MINECRAFT_VERSION = 'v1.1.0.3 beta';
const MINECRAFT_VERSION_NETWORK = '1.1.0.3';
const LOGIN_PACKET = 0x01;
const PLAY_STATUS_PACKET = 0x02;
@ -41,7 +41,7 @@ interface ProtocolInfo{
const CLIENT_TO_SERVER_HANDSHAKE_PACKET = 0x04;
const DISCONNECT_PACKET = 0x05;
const RESOURCE_PACKS_INFO_PACKET = 0x06;
const RESOURCE_PACK_STACK_PACKET = 0x07; //ResourcePacksStackPacket
const RESOURCE_PACK_STACK_PACKET = 0x07;
const RESOURCE_PACK_CLIENT_RESPONSE_PACKET = 0x08;
const TEXT_PACKET = 0x09;
const SET_TIME_PACKET = 0x0a;
@ -71,7 +71,7 @@ interface ProtocolInfo{
const BLOCK_PICK_REQUEST_PACKET = 0x22;
const USE_ITEM_PACKET = 0x23;
const PLAYER_ACTION_PACKET = 0x24;
const ENTITY_FALL_PACKET = 0x25; //PlayerFallPacket
const ENTITY_FALL_PACKET = 0x25;
const HURT_ARMOR_PACKET = 0x26;
const SET_ENTITY_DATA_PACKET = 0x27;
const SET_ENTITY_MOTION_PACKET = 0x28;
@ -99,14 +99,14 @@ interface ProtocolInfo{
const SET_PLAYER_GAME_TYPE_PACKET = 0x3e;
const PLAYER_LIST_PACKET = 0x3f;
const SIMPLE_EVENT_PACKET = 0x40;
const EVENT_PACKET = 0x41; //TelemetryEventPacket
const EVENT_PACKET = 0x41;
const SPAWN_EXPERIENCE_ORB_PACKET = 0x42;
const CLIENTBOUND_MAP_ITEM_DATA_PACKET = 0x43; //MapItemDataPacket
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 REPLACE_ITEM_IN_SLOT_PACKET = 0x48; //ReplaceSelectedItemPacket
const REPLACE_ITEM_IN_SLOT_PACKET = 0x48;
const GAME_RULES_CHANGED_PACKET = 0x49;
const CAMERA_PACKET = 0x4a;
const ADD_ITEM_PACKET = 0x4b;
@ -126,5 +126,7 @@ interface ProtocolInfo{
const SET_TITLE_PACKET = 0x59;
const ADD_BEHAVIOR_TREE_PACKET = 0x5a;
const STRUCTURE_BLOCK_UPDATE_PACKET = 0x5b;
const SHOW_STORE_OFFER_PACKET = 0x5c;
const PURCHASE_RECEIPT_PACKET = 0x5d;
}

View File

@ -39,20 +39,22 @@ class ResourcePacksInfoPacket extends DataPacket{
public function decode(){
/*$this->mustAccept = $this->getBool();
$behaviorPackCount = $this->getUnsignedVarInt();
$behaviorPackCount = $this->getLShort();
while($behaviorPackCount-- > 0){
$id = $this->getString();
$version = $this->getString();
$size = $this->getUnsignedVarLong();
$size = $this->getLLong();
$this->behaviorPackEntries[] = new ResourcePackInfoEntry($id, $version, $size);
$this->getString();
}
$resourcePackCount = $this->getUnsignedVarInt();
$resourcePackCount = $this->getLShort();
while($resourcePackCount-- > 0){
$id = $this->getString();
$version = $this->getString();
$size = $this->getUnsignedVarLong();
$size = $this->getLLong();
$this->resourcePackEntries[] = new ResourcePackInfoEntry($id, $version, $size);
$this->getString();
}*/
}
@ -60,17 +62,19 @@ class ResourcePacksInfoPacket extends DataPacket{
$this->reset();
$this->putBool($this->mustAccept);
$this->putUnsignedVarInt(count($this->behaviorPackEntries));
$this->putLShort(count($this->behaviorPackEntries));
foreach($this->behaviorPackEntries as $entry){
$this->putString($entry->getPackId());
$this->putString($entry->getPackVersion());
$this->putUnsignedVarLong($entry->getPackSize());
$this->putLLong($entry->getPackSize());
$this->putString(""); //TODO
}
$this->putUnsignedVarInt(count($this->resourcePackEntries));
$this->putLShort(count($this->resourcePackEntries));
foreach($this->resourcePackEntries as $entry){
$this->putString($entry->getPackId());
$this->putString($entry->getPackVersion());
$this->putUnsignedVarLong($entry->getPackSize());
$this->putLLong($entry->getPackSize());
$this->putString(""); //TODO
}
}