mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Separate consumable item interfaces from general consumable interfaces (#3595)
I wonder if there's a way to generalise item consuming beyond just eating/drinking. Stuff like lava bucket in a furnace needs the same kind of "leftover" logic.
This commit is contained in:
@@ -23,17 +23,15 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
use pocketmine\entity\FoodSource;
|
||||
use pocketmine\entity\Living;
|
||||
|
||||
abstract class Food extends Item implements FoodSource{
|
||||
abstract class Food extends Item implements FoodSourceItem{
|
||||
public function requiresHunger() : bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Item
|
||||
*/
|
||||
public function getResidue(){
|
||||
public function getResidue() : Item{
|
||||
return ItemFactory::air();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user