DataPacket: remove dead function clean()

This commit is contained in:
Dylan K. Taylor 2019-01-01 15:43:05 +00:00
parent c6a32ccf2a
commit 4a629e1a26
5 changed files with 0 additions and 29 deletions

View File

@ -52,12 +52,6 @@ class CraftingDataPacket extends DataPacket{
public $decodedEntries = [];
public function clean(){
$this->entries = [];
$this->decodedEntries = [];
return parent::clean();
}
protected function decodePayload() : void{
$this->decodedEntries = [];
$recipeCount = $this->getUnsignedVarInt();

View File

@ -43,12 +43,6 @@ class CraftingEventPacket extends DataPacket{
/** @var Item[] */
public $output = [];
public function clean(){
$this->input = [];
$this->output = [];
return parent::clean();
}
protected function decodePayload() : void{
$this->windowId = $this->getByte();
$this->type = $this->getVarInt();

View File

@ -115,13 +115,6 @@ abstract class DataPacket extends NetworkBinaryStream{
*/
abstract public function handle(SessionHandler $handler) : bool;
public function clean(){
$this->buffer = null;
$this->isEncoded = false;
$this->offset = 0;
return $this;
}
public function __debugInfo(){
$data = [];
foreach($this as $k => $v){

View File

@ -39,11 +39,6 @@ class ExplodePacket extends DataPacket{
/** @var Vector3[] */
public $records = [];
public function clean(){
$this->records = [];
return parent::clean();
}
protected function decodePayload() : void{
$this->position = $this->getVector3();
$this->radius = (float) ($this->getVarInt() / 32);

View File

@ -41,11 +41,6 @@ class PlayerListPacket extends DataPacket{
/** @var int */
public $type;
public function clean(){
$this->entries = [];
return parent::clean();
}
protected function decodePayload() : void{
$this->type = $this->getByte();
$count = $this->getUnsignedVarInt();