initEntity() protected method

protected initEntity ( )
示例#1
0
 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());
 }
示例#2
0
 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);
 }
示例#3
0
 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);
 }
示例#4
0
 public function initEntity()
 {
     parent::initEntity();
     $this->setMaxHealth(1);
     $this->setHealth(1);
 }