Protocol changes for 1.9.0

This commit is contained in:
Dylan K. Taylor
2019-02-07 21:56:42 +00:00
parent 37c2d78731
commit b8703d5dff
19 changed files with 390 additions and 96 deletions

View File

@ -34,6 +34,8 @@ class SpawnParticleEffectPacket extends DataPacket{
/** @var int */
public $dimensionId = DimensionIds::OVERWORLD; //wtf mojang
/** @var int */
public $entityUniqueId = -1; //default none
/** @var Vector3 */
public $position;
/** @var string */
@ -41,12 +43,14 @@ class SpawnParticleEffectPacket extends DataPacket{
protected function decodePayload(){
$this->dimensionId = $this->getByte();
$this->entityUniqueId = $this->getEntityUniqueId();
$this->position = $this->getVector3();
$this->particleName = $this->getString();
}
protected function encodePayload(){
$this->putByte($this->dimensionId);
$this->putEntityUniqueId($this->entityUniqueId);
$this->putVector3($this->position);
$this->putString($this->particleName);
}