__construct() public method

public __construct ( pocketmine\level\format\FullChunk $chunk, CompoundTag $nbt, Entity $shootingEntity = null )
$chunk pocketmine\level\format\FullChunk
$nbt pocketmine\nbt\tag\CompoundTag
$shootingEntity Entity
示例#1
0
 public function __construct(FullChunk $chunk, CompoundTag $nbt, Entity $shootingEntity = null)
 {
     if (!isset($nbt->PotionId)) {
         $nbt->PotionId = new ShortTag("PotionId", Potion::AWKWARD);
     }
     parent::__construct($chunk, $nbt, $shootingEntity);
     $this->setDataProperty(self::DATA_POTION_ID, self::DATA_TYPE_SHORT, Potion::getEffectId($this->getPotionId()));
 }
示例#2
0
文件: Arrow.php 项目: iTXTech/Genisys
 public function __construct(FullChunk $chunk, CompoundTag $nbt, Entity $shootingEntity = null, $critical = false)
 {
     $this->isCritical = (bool) $critical;
     if (!isset($nbt->Potion)) {
         $nbt->Potion = new ShortTag("Potion", 0);
     }
     parent::__construct($chunk, $nbt, $shootingEntity);
     $this->potionId = $this->namedtag["Potion"];
 }
示例#3
0
 public function __construct(FullChunk $chunk, CompoundTag $nbt, Player $owner = null)
 {
     if ($owner == null) {
         $this->close();
         return;
     }
     parent::__construct($chunk, $nbt);
     $this->owner = $owner;
     $this->setDataProperty(self::DATA_NO_AI, self::DATA_TYPE_BYTE, 1);
     $this->setDataProperty(self::DATA_SOURCE_UUID, self::DATA_TYPE_LONG, $this->owner->getId());
     $this->setDataProperty(self::DATA_TARGET_UUID, self::DATA_TYPE_LONG, $this->getId());
 }
示例#4
0
 public function __construct(FullChunk $chunk, Compound $nbt, Entity $shootingEntity = null)
 {
     parent::__construct($chunk, $nbt, $shootingEntity);
 }
示例#5
0
 public function __construct(FullChunk $chunk, Compound $nbt, Entity $shootingEntity = \null, $critical = \false)
 {
     $this->isCritical = (bool) $critical;
     parent::__construct($chunk, $nbt, $shootingEntity);
 }
示例#6
0
 public function __construct(FullChunk $chunk, Compound $nbt, Entity $shootingEntity = null)
 {
     $this->shootingEntity = $shootingEntity;
     parent::__construct($chunk, $nbt);
 }
示例#7
0
 public function __construct(FullChunk $chunk, CompoundTag $nbt, Entity $shootingEntity = null, bool $critical = false)
 {
     parent::__construct($chunk, $nbt, $shootingEntity);
     $this->isCritical = $critical;
 }