22declare(strict_types=1);
39 protected array $blockDrops = [];
48 protected bool $instaBreak =
false,
50 protected int $xpDrops = 0
52 parent::__construct($block);
67 return clone $this->item;
75 return $this->instaBreak;
78 public function setInstaBreak(
bool $instaBreak) : void{
79 $this->instaBreak = $instaBreak;
86 return $this->blockDrops;
93 $this->setDropsVariadic(...$drops);
100 $this->blockDrops = $drops;
107 return $this->xpDrops;
115 throw new \InvalidArgumentException(
"Amount must be at least zero");
117 $this->xpDrops = $amount;
setXpDropAmount(int $amount)
__construct(protected Player $player, Block $block, protected Item $item, protected bool $instaBreak=false, array $drops=[], protected int $xpDrops=0)
setDropsVariadic(Item ... $drops)