mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Cleaned up some bad code in DataPacket, added encode/decodeHeader and made encode/decodePayload protected
This commit is contained in:
@ -42,13 +42,13 @@ class ChangeDimensionPacket extends DataPacket{
|
||||
/** @var bool */
|
||||
public $respawn = false;
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->dimension = $this->getVarInt();
|
||||
$this->getVector3f($this->x, $this->y, $this->z);
|
||||
$this->respawn = $this->getBool();
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putVarInt($this->dimension);
|
||||
$this->putVector3f($this->x, $this->y, $this->z);
|
||||
$this->putBool($this->respawn);
|
||||
|
Reference in New Issue
Block a user