Updated protocol changes from MCPE-6865

This commit is contained in:
Shoghi Cervantes 2014-06-09 15:19:24 +02:00
parent c180534f21
commit fb46faa320
5 changed files with 10 additions and 10 deletions

View File

@ -581,7 +581,7 @@ class Level{
*
* @return bool
*/
public function setBlockRaw(Vector3 $pos, Block $block, $direct = true, $send = true){
public function setBlockRaw(Vector3 $pos, Block $block, $direct = false, $send = true){
if(($ret = $this->level->setBlock($pos->x, $pos->y, $pos->z, $block->getID(), $block->getDamage())) === true and $send !== false){
if($direct === true){
$pk = new UpdateBlockPacket;

View File

@ -42,7 +42,7 @@ class ContainerOpenPacket extends DataPacket{
$this->reset();
$this->putByte($this->windowid);
$this->putByte($this->type);
$this->putByte($this->slots);
$this->putShort($this->slots);
$this->putInt($this->x);
$this->putInt($this->y);
$this->putInt($this->z);

View File

@ -33,17 +33,17 @@ class EntityDataPacket extends DataPacket{
}
public function decode(){
$this->x = $this->getShort();
$this->x = $this->getInt();
$this->y = $this->getByte();
$this->z = $this->getShort();
$this->z = $this->getInt();
$this->namedtag = $this->get(true);
}
public function encode(){
$this->reset();
$this->putShort($this->x);
$this->putInt($this->x);
$this->putByte($this->y);
$this->putShort($this->z);
$this->putInt($this->z);
$this->put($this->namedtag);
}

View File

@ -40,9 +40,9 @@ class LevelEventPacket extends DataPacket{
public function encode(){
$this->reset();
$this->putShort($this->evid);
$this->putShort($this->x);
$this->putShort($this->y);
$this->putShort($this->z);
$this->putInt($this->x);
$this->putInt($this->y);
$this->putInt($this->z);
$this->putInt($this->data);
}

View File

@ -47,7 +47,7 @@ class UseItemPacket extends DataPacket{
$this->z = $this->getInt();
$this->face = $this->getInt();
$this->item = $this->getShort();
$this->meta = $this->getByte(); //Mojang: fix this
$this->meta = $this->getShort();
$this->eid = $this->getInt();
$this->fx = $this->getFloat();
$this->fy = $this->getFloat();