Cleaned up fuel duration handling, fixed some fuel items not working in furnaces

This commit is contained in:
Dylan K. Taylor
2017-08-17 10:22:47 +01:00
parent dc3f13cd30
commit 6efa4343b1
30 changed files with 123 additions and 71 deletions

View File

@ -28,7 +28,6 @@ namespace pocketmine\item;
use pocketmine\block\Block;
use pocketmine\entity\Entity;
use pocketmine\inventory\Fuel;
use pocketmine\item\enchantment\Enchantment;
use pocketmine\level\Level;
use pocketmine\nbt\NBT;
@ -917,15 +916,12 @@ class Item implements ItemIds, \JsonSerializable{
return 64;
}
final public function getFuelTime(){
if(!isset(Fuel::$duration[$this->id])){
return null;
}
if($this->id !== self::BUCKET or $this->meta === 10){
return Fuel::$duration[$this->id];
}
return null;
/**
* Returns the time in ticks which the item will fuel a furnace for.
* @return int
*/
public function getFuelTime() : int{
return 0;
}
/**