mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-08 12:48:32 +00:00
Found an unknown field in ChangeDimensionPacket
No idea what this is actually used for though. It's set when a client dies in a different dimension and respawns in the overworld.
This commit is contained in:
parent
6a2a74a457
commit
89ca2ac2d5
@ -38,19 +38,19 @@ class ChangeDimensionPacket extends DataPacket{
|
|||||||
public $x;
|
public $x;
|
||||||
public $y;
|
public $y;
|
||||||
public $z;
|
public $z;
|
||||||
public $unknown; //bool
|
public $respawn = false;
|
||||||
|
|
||||||
public function decode(){
|
public function decode(){
|
||||||
$this->dimension = $this->getVarInt();
|
$this->dimension = $this->getVarInt();
|
||||||
$this->getVector3f($this->x, $this->y, $this->z);
|
$this->getVector3f($this->x, $this->y, $this->z);
|
||||||
$this->unknown = $this->getBool();
|
$this->respawn = $this->getBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function encode(){
|
public function encode(){
|
||||||
$this->reset();
|
$this->reset();
|
||||||
$this->putVarInt($this->dimension);
|
$this->putVarInt($this->dimension);
|
||||||
$this->putVector3f($this->x, $this->y, $this->z);
|
$this->putVector3f($this->x, $this->y, $this->z);
|
||||||
$this->putBool($this->unknown);
|
$this->putBool($this->respawn);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handle(NetworkSession $session) : bool{
|
public function handle(NetworkSession $session) : bool{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user