Added Squids with basic AI

This commit is contained in:
Shoghi Cervantes
2015-04-09 00:12:50 +02:00
parent 02ba9ffc16
commit 69f841a00c
10 changed files with 273 additions and 11 deletions

View File

@ -54,7 +54,7 @@ class Villager extends Creature implements NPC, Ageable{
public function spawnTo(Player $player){
$pk = new AddEntityPacket();
$pk->eid = $this->getId();
$pk->type = Villager::NETWORK_ID;
$pk->type = Villager::NETWORK_ID | $this->MASK;
$pk->x = $this->x;
$pk->y = $this->y;
$pk->z = $this->z;
@ -81,4 +81,8 @@ class Villager extends Creature implements NPC, Ageable{
public function getProfession(){
return $this->namedtag["Profession"];
}
public function isBaby(){
return $this->getDataFlag(self::DATA_AGEABLE_FLAGS, self::DATA_FLAG_BABY);
}
}