mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Added Squids with basic AI
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user