public function initEntity() { parent::initEntity(); if (isset($this->namedtag->Data)) { $this->data = $this->namedtag["Data"]; } // $this->setDataProperty(FallingSand::DATA_BLOCK_INFO, self::DATA_TYPE_INT, $this->getData()); }
public function initEntity() { parent::initEntity(); if (isset($this->namedtag->Data)) { $this->data = $this->namedtag["Data"]; } $color = Potion::getColor($this->getData()); $this->setDataProperty(FallingSand::DATA_BLOCK_INFO, self::DATA_TYPE_LONG, ($color[0] & 0xff) << 16 | ($color[1] & 0xff) << 8 | $color[2] & 0xff); }
public function initEntity() { parent::initEntity(); if (isset($this->namedtag->Data)) { $this->data = $this->namedtag["Data"]; } $color = Potion::getColor($this->getData()); $this->setDataProperty(Entity::DATA_POTION_COLOR, Entity::DATA_TYPE_INT, ($color[0] & 0xff) << 16 | ($color[1] & 0xff) << 8 | $color[2] & 0xff); }
public function initEntity() { parent::initEntity(); $this->setMaxHealth(1); $this->setHealth(1); }