Basic implementation of Fire

This commit is contained in:
Shoghi Cervantes
2013-06-09 14:59:02 +02:00
parent 2f6ddb6aa4
commit 2976db25c3
14 changed files with 73 additions and 5 deletions

View File

@@ -55,6 +55,7 @@ class Item{
WOODEN_SHOVEL => "WoodenShovelItem",
WOODEN_PICKAXE => "WoodenPickaxeItem",
WOODEN_AXE => "WoodenAxeItem",
FLINT_STEEL => "FlintSteelItem",
);
protected $block;
protected $id;
@@ -74,6 +75,9 @@ class Item{
$this->block = BlockAPI::get($this->id, $this->meta);
$this->name = $this->block->getName();
}
if($this->isTool() !== false){
$this->maxStackSize = 1;
}
}
final public function getName(){
@@ -138,7 +142,7 @@ class Item{
}
final public function isTool(){
return ($this->isPickaxe() !== false or $this->isAxe() !== false or $this->isShovel() !== false or $this->isSword() !== false or $this->isHoe() !== false);
return ($this->id === FLINT_STEEL or $this->id === SHEARS or $this->isPickaxe() !== false or $this->isAxe() !== false or $this->isShovel() !== false or $this->isSword() !== false or $this->isHoe() !== false);
}
final public function isPickaxe(){ //Returns false or level of the pickaxe