mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Cleaned up some bad code in DataPacket, added encode/decodeHeader and made encode/decodePayload protected
This commit is contained in:
@ -40,13 +40,13 @@ class SetSpawnPositionPacket extends DataPacket{
|
||||
public $z;
|
||||
public $spawnForced;
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->spawnType = $this->getVarInt();
|
||||
$this->getBlockPosition($this->x, $this->y, $this->z);
|
||||
$this->spawnForced = $this->getBool();
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putVarInt($this->spawnType);
|
||||
$this->putBlockPosition($this->x, $this->y, $this->z);
|
||||
$this->putBool($this->spawnForced);
|
||||
|
Reference in New Issue
Block a user