Пример #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(self::DATA_POTION_COLOR, self::DATA_TYPE_INT, ($color[0] & 0xff) << 16 | ($color[1] & 0xff) << 8 | $color[2] & 0xff);
     $this->setDataProperty(self::DATA_POTION_AMBIENT, Entity::DATA_TYPE_BYTE, 0);
 }