Added entity id names

This commit is contained in:
Shoghi Cervantes
2014-08-27 17:42:38 +02:00
parent f4b92bcdfc
commit 90fa40de34
24 changed files with 99 additions and 47 deletions

View File

@ -23,6 +23,7 @@ namespace pocketmine\entity;
use pocketmine\nbt\tag\Int;
use pocketmine\nbt\tag\String;
use pocketmine\network\protocol\AddMobPacket;
use pocketmine\network\protocol\SetEntityMotionPacket;
use pocketmine\Player;
@ -47,6 +48,7 @@ class Villager extends Creature implements NPC, Ageable{
protected function initEntity(){
parent::initEntity();
$this->namedtag->id = new String("id", "Villager");
if(!isset($this->namedtag->Profession)){
$this->setProfession(self::PROFESSION_GENERIC);
}