Update BrownMushroomBlock.php
This commit is contained in:
parent
c6277a9c0e
commit
11358d3235
1 changed files with 7 additions and 8 deletions
|
|
@ -8,12 +8,11 @@ use pocketmine\item\Tool;
|
|||
use pocketmine\item\enchantment\enchantment;
|
||||
use pocketmine\Player;
|
||||
|
||||
class RedMushroomBlock extends Solid{
|
||||
class BrownMushroomBlock extends Solid{
|
||||
|
||||
const BROWN = 14;
|
||||
|
||||
const RED = 14;
|
||||
const STEM = 10;
|
||||
|
||||
protected $id = self::RED_MUSHROOM_BLOCK;
|
||||
protected $id = self::BROWN_MUSHROOM_BLOCK;
|
||||
|
||||
public function __construct($meta = 15){
|
||||
$this->meta = $meta;
|
||||
|
|
@ -32,17 +31,17 @@ class RedMushroomBlock extends Solid{
|
|||
}
|
||||
|
||||
public function getName() : string{
|
||||
return "Red Mushroom Block";
|
||||
return "Brown Mushroom Block";
|
||||
}
|
||||
|
||||
public function getDrops(Item $item) : array {
|
||||
if($item->getEnchantmentLevel(Enchantment::TYPE_MINING_SILK_TOUCH) > 0){
|
||||
return [
|
||||
[Item::RED_MUSHROOM_BLOCK, SELF::RED, 1],
|
||||
[Item::BROWN_MUSHROOM_BLOCK, SELF::BROWN, 1],
|
||||
];
|
||||
}else{
|
||||
return [
|
||||
[Item::RED_MUSHROOM, 0, mt_rand(0, 2)],
|
||||
[Item::BROWN_MUSHROOM, 0, mt_rand(0, 2)],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue