Changed eduMode to eduEditionOffer and added an unsignedVarInt in availablecommandspacket

This commit is contained in:
Stephen 2019-11-21 14:55:29 -05:00
parent 74c09dc202
commit f682c16740
2 changed files with 6 additions and 4 deletions

View File

@ -405,6 +405,8 @@ class AvailableCommandsPacket extends DataPacket{
foreach($this->softEnums as $enum){
$this->putSoftEnum($enum);
}
$this->putUnsignedVarInt(0); //TODO
}
public function handle(NetworkSession $session) : bool{

View File

@ -83,8 +83,8 @@ class StartGamePacket extends DataPacket{
public $hasAchievementsDisabled = true;
/** @var int */
public $time = -1;
/** @var bool */
public $eduMode = false;
/** @var int */
public $eduEditionOffer = 0;
/** @var bool */
public $hasEduFeaturesEnabled = false;
/** @var float */
@ -177,7 +177,7 @@ class StartGamePacket extends DataPacket{
$this->getBlockPosition($this->spawnX, $this->spawnY, $this->spawnZ);
$this->hasAchievementsDisabled = $this->getBool();
$this->time = $this->getVarInt();
$this->eduMode = $this->getBool();
$this->eduEditionOffer = $this->getVarInt();
$this->hasEduFeaturesEnabled = $this->getBool();
$this->rainLevel = $this->getLFloat();
$this->lightningLevel = $this->getLFloat();
@ -249,7 +249,7 @@ class StartGamePacket extends DataPacket{
$this->putBlockPosition($this->spawnX, $this->spawnY, $this->spawnZ);
$this->putBool($this->hasAchievementsDisabled);
$this->putVarInt($this->time);
$this->putBool($this->eduMode);
$this->putVarInt($this->eduEditionOffer);
$this->putBool($this->hasEduFeaturesEnabled);
$this->putLFloat($this->rainLevel);
$this->putLFloat($this->lightningLevel);