Added Coal Blocks, crafting, fuel information

This commit is contained in:
Shoghi Cervantes 2013-11-23 18:18:02 +01:00
parent 78f7964d57
commit 5803a4e649
5 changed files with 64 additions and 0 deletions

View File

@ -171,6 +171,8 @@ define("QUARTZ_STAIRS", 156);
define("HAY_BALE", 170);
define("COAL_BLOCK", 170);
define("STONECUTTER", 245);
define("GLOWING_OBSIDIAN", 246);
define("NETHER_REACTOR", 247);

View File

@ -133,6 +133,8 @@ abstract class Block extends Position{
HAY_BALE => "HayBaleBlock",
COAL_BLOCK => "CoalBlock",
STONECUTTER => "StonecutterBlock",
GLOWING_OBSIDIAN => "GlowingObsidianBlock",
NETHER_REACTOR => "NetherReactorBlock",

View File

@ -0,0 +1,57 @@
<?php
/**
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
class CoalBlock extends SolidBlock{
public function __construct(){
parent::__construct(COAL_BLOCK, 0, "Coal Block");
$this->hardness = 30;
}
public function getBreakTime(Item $item, Player $player){
if(($player->gamemode & 0x01) === 0x01){
return 0.20;
}
switch($item->isPickaxe()){
case 5:
return 0.95;
case 4:
return 1.25;
case 3:
return 1.9;
case 2:
return 0.65;
case 1:
return 3.75;
default:
return 25;
}
}
public function getDrops(Item $item, Player $player){
if($item->isPickaxe() >= 1){
return array(
array(COAL_BLOCK, 0, 1),
);
}else{
return array();
}
}
}

View File

@ -176,6 +176,8 @@ class CraftingRecipes{
"SUGARCANE:?x3=>PAPER:0x1",
"WOODEN_PLANKS:?x6,STICK:?x1=>SIGN:0x1",
"IRON_INGOT:?x6=>IRON_BARS:0x16",
"COAL:0x9=>COAL_BLOCK:0x1",
"COAL_BLOCK:?x1=>COAL:0x9",
);
private static $stone = array(

View File

@ -23,6 +23,7 @@
class FuelData{
public static $duration = array(
COAL => 80,
COAL_BLOCK => 800,
TRUNK => 15,
WOODEN_PLANKS => 15,
SAPLING => 5,