Furnace Simplification

This commit is contained in:
Shoghi Cervantes Pueyo 2013-03-05 20:23:39 +01:00
parent 55cb79fdf6
commit f4ce715efc
2 changed files with 10 additions and 24 deletions

View File

@ -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();
}
}
}

View File

@ -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(