From aade3fe3908e329233628bc3c94e3203ccf1b960 Mon Sep 17 00:00:00 2001 From: PEMapModder Date: Mon, 28 Mar 2016 02:42:08 +0800 Subject: [PATCH] Closes #3432 --- src/pocketmine/block/GlowingRedstoneOre.php | 28 ++------------------- src/pocketmine/block/RedstoneOre.php | 6 ++--- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/src/pocketmine/block/GlowingRedstoneOre.php b/src/pocketmine/block/GlowingRedstoneOre.php index 095241607..9565ebc47 100644 --- a/src/pocketmine/block/GlowingRedstoneOre.php +++ b/src/pocketmine/block/GlowingRedstoneOre.php @@ -22,51 +22,27 @@ namespace pocketmine\block; use pocketmine\item\Item; -use pocketmine\item\Tool; use pocketmine\level\Level; -class GlowingRedstoneOre extends Solid{ +class GlowingRedstoneOre extends RedstoneOre{ protected $id = self::GLOWING_REDSTONE_ORE; - public function __construct(){ - - } - - public function getHardness(){ - return 15; - } - public function getName(){ return "Glowing Redstone Ore"; } - public function getToolType(){ - return Tool::TYPE_PICKAXE; - } - public function getLightLevel(){ return 9; } public function onUpdate($type){ if($type === Level::BLOCK_UPDATE_SCHEDULED or $type === Level::BLOCK_UPDATE_RANDOM){ - $this->getLevel()->setBlock($this, Block::get(Item::REDSTONE_ORE, $this->meta), false, false, true); + $this->getLevel()->setBlock($this, Block::get(Item::REDSTONE_ORE, $this->meta), false, false); return Level::BLOCK_UPDATE_WEAK; } return false; } - - public function getDrops(Item $item){ - if($item->isPickaxe() >= Tool::TIER_IRON){ - return [ - [Item::REDSTONE_DUST, 0, mt_rand(4, 5)], - ]; - }else{ - return []; - } - } - } \ No newline at end of file diff --git a/src/pocketmine/block/RedstoneOre.php b/src/pocketmine/block/RedstoneOre.php index 2fb6df907..91d60a9ea 100644 --- a/src/pocketmine/block/RedstoneOre.php +++ b/src/pocketmine/block/RedstoneOre.php @@ -43,7 +43,7 @@ class RedstoneOre extends Solid{ public function onUpdate($type){ if($type === Level::BLOCK_UPDATE_NORMAL or $type === Level::BLOCK_UPDATE_TOUCH){ - $this->getLevel()->setBlock($this, Block::get(Item::GLOWING_REDSTONE_ORE, $this->meta), false, true); + $this->getLevel()->setBlock($this, Block::get(Item::GLOWING_REDSTONE_ORE, $this->meta)); return Level::BLOCK_UPDATE_WEAK; } @@ -51,14 +51,12 @@ class RedstoneOre extends Solid{ return false; } - - public function getToolType(){ return Tool::TYPE_PICKAXE; } public function getDrops(Item $item){ - if($item->isPickaxe() >= Tool::TIER_GOLD){ + if($item->isPickaxe() >= Tool::TIER_IRON){ return [ [Item::REDSTONE_DUST, 0, mt_rand(4, 5)], ];