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){ foreach($this->softEnums as $enum){
$this->putSoftEnum($enum); $this->putSoftEnum($enum);
} }
$this->putUnsignedVarInt(0); //TODO
} }
public function handle(NetworkSession $session) : bool{ public function handle(NetworkSession $session) : bool{

View File

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