mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Furnaces and Burning items
This commit is contained in:
parent
221da1685e
commit
f224c26084
10 changed files with 253 additions and 16 deletions
|
|
@ -105,6 +105,30 @@ class Item{
|
|||
return $this->maxStackSize;
|
||||
}
|
||||
|
||||
final public function getFuelTime(){
|
||||
if(!isset(FuelData::$duration[$this->id])){
|
||||
return false;
|
||||
}
|
||||
return FuelData::$duration[$this->id];
|
||||
}
|
||||
|
||||
final public function getSmeltItem(){
|
||||
if(!isset(SmeltingData::$product[$this->id])){
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isset(SmeltingData::$product[$this->id][0]) and !is_array(SmeltingData::$product[$this->id][0])){
|
||||
return BlockAPI::getItem(SmeltingData::$product[$this->id][0], SmeltingData::$product[$this->id][1]);
|
||||
}
|
||||
|
||||
if(!isset(SmeltingData::$product[$this->id][$this->meta])){
|
||||
return false;
|
||||
}
|
||||
|
||||
return BlockAPI::getItem(SmeltingData::$product[$this->id][$this->meta][0], SmeltingData::$product[$this->id][$this->meta][1]);
|
||||
|
||||
}
|
||||
|
||||
final public function isPickaxe(){ //Returns false or level of the pickaxe
|
||||
switch($this->id){
|
||||
case IRON_PICKAXE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue