Skip to content

Commit

Permalink
Added Support for 0.14.2. Close iTXTech#867. Close iTXTech#869
Browse files Browse the repository at this point in the history
  • Loading branch information
PeratX committed Apr 28, 2016
1 parent 6d8779e commit eded931
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/pocketmine/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,8 @@ public function sendSettings(){

$pk = new AdventureSettingsPacket();
$pk->flags = $flags;
$pk->userPermission = 2;
$pk->globalPermission = 2;
$this->dataPacket($pk);
}

Expand Down
4 changes: 2 additions & 2 deletions src/pocketmine/PocketMine.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ function dummy(){
const VERSION = "1.1dev";
const API_VERSION = "2.0.0";
const CODENAME = "Ikaros";
const MINECRAFT_VERSION = "v0.14.x alpha";
const MINECRAFT_VERSION_NETWORK = "0.14.1";
const MINECRAFT_VERSION = "v0.14.2 alpha";
const MINECRAFT_VERSION_NETWORK = "0.14.2";
const GENISYS_API_VERSION = '1.7.2';

/*
Expand Down
4 changes: 4 additions & 0 deletions src/pocketmine/network/protocol/AdventureSettingsPacket.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class AdventureSettingsPacket extends DataPacket{
const NETWORK_ID = Info::ADVENTURE_SETTINGS_PACKET;

public $flags;
public $userPermission;
public $globalPermission;

public function decode(){

Expand All @@ -36,6 +38,8 @@ public function decode(){
public function encode(){
$this->reset();
$this->putInt($this->flags);
$this->putInt($this->userPermission);
$this->putInt($this->globalPermission);
}

}
4 changes: 2 additions & 2 deletions src/pocketmine/network/protocol/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ interface Info{
/**
* Actual Minecraft: PE protocol version
*/
const CURRENT_PROTOCOL = 46;
const ACCEPTED_PROTOCOLS = [45, 46];
const CURRENT_PROTOCOL = 60;
const ACCEPTED_PROTOCOLS = [45, 46, 60];

const LOGIN_PACKET = 0x8f;
const PLAY_STATUS_PACKET = 0x90;
Expand Down
4 changes: 4 additions & 0 deletions src/pocketmine/network/protocol/StartGamePacket.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class StartGamePacket extends DataPacket{
public $x;
public $y;
public $z;
public $unknown;

public function decode(){

Expand All @@ -56,7 +57,10 @@ public function encode(){
$this->putFloat($this->x);
$this->putFloat($this->y);
$this->putFloat($this->z);
$this->putByte(1);
$this->putByte(1);
$this->putByte(0);
$this->putString($this->unknown);
}

}

0 comments on commit eded931

Please sign in to comment.