mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Added RakNetDataPacket::reset() to all the packets
This commit is contained in:
@ -31,6 +31,7 @@ class AdventureSettingsPacket extends RakNetDataPacket{
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putInt($this->flags);
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@ class ChatPacket extends RakNetDataPacket{
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putString($this->message);
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,7 @@ class ContainerSetContentPacket extends RakNetDataPacket{
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putByte($this->windowid);
|
||||
$this->putShort(count($this->slots));
|
||||
foreach($this->slots as $slot){
|
||||
|
@ -33,6 +33,7 @@ class ContainerSetDataPacket extends RakNetDataPacket{
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putByte($this->windowid);
|
||||
$this->putShort($this->property);
|
||||
$this->putShort($this->value);
|
||||
|
@ -35,6 +35,7 @@ class ContainerSetSlotPacket extends RakNetDataPacket{
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putByte($this->windowid);
|
||||
$this->putShort($this->slot);
|
||||
$this->putSlot($this->item);
|
||||
|
@ -29,7 +29,7 @@ class DisconnectPacket extends RakNetDataPacket{
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
|
||||
$this->reset();
|
||||
}
|
||||
|
||||
}
|
@ -37,6 +37,7 @@ class EntityDataPacket extends RakNetDataPacket{
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putShort($this->x);
|
||||
$this->putByte($this->y);
|
||||
$this->putShort($this->z);
|
||||
|
@ -30,7 +30,7 @@ class MoveEntityPacket extends RakNetDataPacket{
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
|
||||
$this->reset();
|
||||
}
|
||||
|
||||
}
|
@ -33,6 +33,7 @@ class SetSpawnPositionPacket extends RakNetDataPacket{
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putInt($this->x);
|
||||
$this->putInt($this->z);
|
||||
$this->putByte($this->y);
|
||||
|
@ -35,6 +35,7 @@ class UpdateBlockPacket extends RakNetDataPacket{
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
$this->reset();
|
||||
$this->putInt($this->x);
|
||||
$this->putInt($this->z);
|
||||
$this->putByte($this->y);
|
||||
|
Reference in New Issue
Block a user