pocketmine\entity\Creeper::initEntity PHP Method

initEntity() public method

public initEntity ( )
    public function initEntity()
    {
        parent::initEntity();
        if (!isset($this->namedtag->powered)) {
            $this->setPowered(false);
        }
        $this->setDataProperty(self::DATA_POWERED, self::DATA_TYPE_BYTE, $this->isPowered() ? 1 : 0);
    }

Usage Example

Ejemplo n.º 1
0
 public function initEntity()
 {
     $this->setMaxHealth(20);
     parent::initEntity();
 }