mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Changed Block->getDrops() to return Item[]
This commit is contained in:
@ -34,6 +34,8 @@ class Sugarcane extends Flowable{
|
||||
|
||||
protected $id = self::SUGARCANE_BLOCK;
|
||||
|
||||
protected $itemId = Item::SUGARCANE;
|
||||
|
||||
public function __construct(int $meta = 0){
|
||||
$this->meta = $meta;
|
||||
}
|
||||
@ -42,13 +44,6 @@ class Sugarcane extends Flowable{
|
||||
return "Sugarcane";
|
||||
}
|
||||
|
||||
|
||||
public function getDrops(Item $item){
|
||||
return [
|
||||
[Item::SUGARCANE, 0, 1],
|
||||
];
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, Player $player = null) : bool{
|
||||
if($item->getId() === Item::DYE and $item->getDamage() === 0x0F){ //Bonemeal
|
||||
if($this->getSide(Vector3::SIDE_DOWN)->getId() !== self::SUGARCANE_BLOCK){
|
||||
|
Reference in New Issue
Block a user