public function encode() { $this->reset(); $this->putEntityId($this->eid); $this->putByte($this->eventId); $this->putVarInt($this->effectId); $this->putVarInt($this->amplifier); $this->putBool($this->particles); $this->putVarInt($this->duration); }