__construct() public method

public __construct ( pocketmine\level\format\FullChunk $chunk, CompoundTag $nbt, Entity $shootingEntity = null, $critical = false )
$chunk pocketmine\level\format\FullChunk
$nbt pocketmine\nbt\tag\CompoundTag
$shootingEntity Entity
示例#1
0
 public function __construct(FullChunk $chunk, Compound $nbt, $r = 255, $g = 255, $b = 255, Entity $shootingEntity = null, $critical = false)
 {
     parent::__construct($chunk, $nbt, $shootingEntity, $critical);
     if (!isset($this->namedtag["r"])) {
         $this->namedtag["r"] = new Int("r", $r);
     }
     if (!isset($this->namedtag["g"])) {
         $this->namedtag["g"] = new Int("g", $g);
     }
     if (!isset($this->namedtag["b"])) {
         $this->namedtag["b"] = new Int("b", $b);
     }
 }