mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 18:29:46 +00:00
Updated protocol changes from MCPE-6865
This commit is contained in:
parent
c180534f21
commit
fb46faa320
@ -581,7 +581,7 @@ class Level{
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @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(($ret = $this->level->setBlock($pos->x, $pos->y, $pos->z, $block->getID(), $block->getDamage())) === true and $send !== false){
|
||||||
if($direct === true){
|
if($direct === true){
|
||||||
$pk = new UpdateBlockPacket;
|
$pk = new UpdateBlockPacket;
|
||||||
|
@ -42,7 +42,7 @@ class ContainerOpenPacket extends DataPacket{
|
|||||||
$this->reset();
|
$this->reset();
|
||||||
$this->putByte($this->windowid);
|
$this->putByte($this->windowid);
|
||||||
$this->putByte($this->type);
|
$this->putByte($this->type);
|
||||||
$this->putByte($this->slots);
|
$this->putShort($this->slots);
|
||||||
$this->putInt($this->x);
|
$this->putInt($this->x);
|
||||||
$this->putInt($this->y);
|
$this->putInt($this->y);
|
||||||
$this->putInt($this->z);
|
$this->putInt($this->z);
|
||||||
|
@ -33,17 +33,17 @@ class EntityDataPacket extends DataPacket{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function decode(){
|
public function decode(){
|
||||||
$this->x = $this->getShort();
|
$this->x = $this->getInt();
|
||||||
$this->y = $this->getByte();
|
$this->y = $this->getByte();
|
||||||
$this->z = $this->getShort();
|
$this->z = $this->getInt();
|
||||||
$this->namedtag = $this->get(true);
|
$this->namedtag = $this->get(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function encode(){
|
public function encode(){
|
||||||
$this->reset();
|
$this->reset();
|
||||||
$this->putShort($this->x);
|
$this->putInt($this->x);
|
||||||
$this->putByte($this->y);
|
$this->putByte($this->y);
|
||||||
$this->putShort($this->z);
|
$this->putInt($this->z);
|
||||||
$this->put($this->namedtag);
|
$this->put($this->namedtag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ class LevelEventPacket extends DataPacket{
|
|||||||
public function encode(){
|
public function encode(){
|
||||||
$this->reset();
|
$this->reset();
|
||||||
$this->putShort($this->evid);
|
$this->putShort($this->evid);
|
||||||
$this->putShort($this->x);
|
$this->putInt($this->x);
|
||||||
$this->putShort($this->y);
|
$this->putInt($this->y);
|
||||||
$this->putShort($this->z);
|
$this->putInt($this->z);
|
||||||
$this->putInt($this->data);
|
$this->putInt($this->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class UseItemPacket extends DataPacket{
|
|||||||
$this->z = $this->getInt();
|
$this->z = $this->getInt();
|
||||||
$this->face = $this->getInt();
|
$this->face = $this->getInt();
|
||||||
$this->item = $this->getShort();
|
$this->item = $this->getShort();
|
||||||
$this->meta = $this->getByte(); //Mojang: fix this
|
$this->meta = $this->getShort();
|
||||||
$this->eid = $this->getInt();
|
$this->eid = $this->getInt();
|
||||||
$this->fx = $this->getFloat();
|
$this->fx = $this->getFloat();
|
||||||
$this->fy = $this->getFloat();
|
$this->fy = $this->getFloat();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user