Improved fall damage while on jump boost, new protocol update, build 7, allow for live inventory resizing

This commit is contained in:
Shoghi Cervantes
2015-04-24 16:43:29 +02:00
parent ba635b8858
commit 7b699d9afd
8 changed files with 61 additions and 47 deletions

View File

@ -30,7 +30,7 @@ interface Info{
/**
* Actual Minecraft: PE protocol version
*/
const CURRENT_PROTOCOL = 23;
const CURRENT_PROTOCOL = 24;
const LOGIN_PACKET = 0x82;
const PLAY_STATUS_PACKET = 0x83;

View File

@ -36,6 +36,7 @@ class MovePlayerPacket extends DataPacket{
public $bodyYaw;
public $pitch;
public $mode = 0;
public $onGround;
public function pid(){
return Info::MOVE_PLAYER_PACKET;
@ -55,6 +56,7 @@ class MovePlayerPacket extends DataPacket{
$this->bodyYaw = $this->getFloat();
$this->pitch = $this->getFloat();
$this->mode = $this->getByte();
$this->onGround = $this->getByte() > 0;
}
public function encode(){
@ -67,6 +69,7 @@ class MovePlayerPacket extends DataPacket{
$this->putFloat($this->bodyYaw); //TODO
$this->putFloat($this->pitch);
$this->putByte($this->mode);
$this->putByte($this->onGround > 0);
}
}