Moved network ids to constants, improved some entity methods, more performance

This commit is contained in:
Shoghi Cervantes
2015-05-30 23:59:24 +02:00
parent 32680843fa
commit 9e14435dbb
58 changed files with 197 additions and 436 deletions

View File

@ -25,17 +25,12 @@ namespace pocketmine\network\protocol;
class DropItemPacket extends DataPacket{
public static $pool = [];
public static $next = 0;
const NETWORK_ID = Info::DROP_ITEM_PACKET;
public $eid;
public $unknown;
public $item;
public function pid(){
return Info::DROP_ITEM_PACKET;
}
public function decode(){
$this->eid = $this->getLong();
$this->unknown = $this->getByte();