From f4ce715efc745e79b75ea4b16f9358113a5a5324 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Tue, 5 Mar 2013 20:23:39 +0100 Subject: [PATCH] Furnace Simplification --- src/material/block/solid/BurningFurnace.php | 32 ++++++--------------- src/material/block/solid/Furnace.php | 2 ++ 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/src/material/block/solid/BurningFurnace.php b/src/material/block/solid/BurningFurnace.php index d84adbe52..d14ea676c 100644 --- a/src/material/block/solid/BurningFurnace.php +++ b/src/material/block/solid/BurningFurnace.php @@ -25,32 +25,16 @@ the Free Software Foundation, either version 3 of the License, or */ -class BurningFurnaceBlock extends SolidBlock{ +/***REM_START***/ +require_once("Furnace.php"); +/***REM_END***/ + +class BurningFurnaceBlock extends FurnaceBlock{ public function __construct($meta = 0){ - parent::__construct(BURNING_FURNACE, $meta, "Burning Furnace"); + parent::__construct($meta); + $this->id = BURNING_FURNACE; + $this->name = "Burning Furnace"; $this->isActivable = true; } - public function place(BlockAPI $level, Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ - if($block->inWorld === true){ - $faces = array( - 0 => 4, - 1 => 2, - 2 => 5, - 3 => 3, - ); - $level->setBlock($block, $this->id, $faces[$player->entity->getDirection()]); - return true; - } - return false; - } - public function getDrops(Item $item, Player $player){ - if($item->isPickaxe() >= 1){ - return array( - array(FURNACE, 0, 1), - ); - }else{ - return array(); - } - } } \ No newline at end of file diff --git a/src/material/block/solid/Furnace.php b/src/material/block/solid/Furnace.php index 93d7d701b..e82385025 100644 --- a/src/material/block/solid/Furnace.php +++ b/src/material/block/solid/Furnace.php @@ -25,11 +25,13 @@ the Free Software Foundation, either version 3 of the License, or */ + class FurnaceBlock extends SolidBlock{ public function __construct($meta = 0){ parent::__construct(FURNACE, $meta, "Furnace"); $this->isActivable = true; } + public function place(BlockAPI $level, Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ if($block->inWorld === true){ $faces = array(