mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Cleaned up some bad code in DataPacket, added encode/decodeHeader and made encode/decodePayload protected
This commit is contained in:
@ -42,7 +42,7 @@ class MobEffectPacket extends DataPacket{
|
||||
public $particles = true;
|
||||
public $duration = 0;
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->entityRuntimeId = $this->getEntityRuntimeId();
|
||||
$this->eventId = $this->getByte();
|
||||
$this->effectId = $this->getVarInt();
|
||||
@ -51,7 +51,7 @@ class MobEffectPacket extends DataPacket{
|
||||
$this->duration = $this->getVarInt();
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putEntityRuntimeId($this->entityRuntimeId);
|
||||
$this->putByte($this->eventId);
|
||||
$this->putVarInt($this->effectId);
|
||||
|
Reference in New Issue
Block a user