__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
ファイル: ThrownPotion.php プロジェクト: xpyctum/Genisys
 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
ファイル: FishingHook.php プロジェクト: xpyctum/Genisys
 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
ファイル: Arrow.php プロジェクト: worlds1/NIGHTMARE
 public function __construct(FullChunk $chunk, Compound $nbt, Entity $shootingEntity = \null, $critical = \false)
 {
     $this->isCritical = (bool) $critical;
     parent::__construct($chunk, $nbt, $shootingEntity);
 }
コード例 #6
0
ファイル: Arrow.php プロジェクト: boybook/PocketMine-MP
 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;
 }