public function getDrops(Item $item) { if ($item->isShears()) { return [$this->id, $this->meta, 1]; } elseif (mt_rand(0, 15) === 0) { return [Item::WHEAT_SEEDS, 0, 1]; } return []; }
public function getDrops(Item $item) { $drops = []; if ($item->isShears()) { $drops[] = [Item::LEAVES2, $this->meta & 0x3, 1]; } else { if (mt_rand(1, 20) === 1) { //Saplings $drops[] = [Item::SAPLING, $this->meta & 0x3, 1]; } } return $drops; }
public function getDrops(Item $item) { if ($item->isShears()) { return [[$this->id, 0, 1]]; } else { return []; } }
public function getDrops(Item $item) { $drops = []; if ($item->isShears()) { $drops[] = [Item::LEAVES, $this->meta & 0x3, 1]; } else { if (mt_rand(1, 20) === 1) { //Saplings $drops[] = [Item::SAPLING, $this->meta & 0x3, 1]; } if (($this->meta & 0x3) === self::OAK and mt_rand(1, 200) === 1) { //Apples $drops[] = [Item::APPLE, 0, 1]; } } return $drops; }