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:
@@ -27,7 +27,7 @@ use pocketmine\entity\effect\EffectInstance;
|
||||
use pocketmine\entity\effect\VanillaEffects;
|
||||
use pocketmine\entity\Living;
|
||||
|
||||
class Potion extends Item implements Consumable{
|
||||
class Potion extends Item implements ConsumableItem{
|
||||
|
||||
public const WATER = 0;
|
||||
public const MUNDANE = 1;
|
||||
@@ -274,7 +274,7 @@ class Potion extends Item implements Consumable{
|
||||
return self::getPotionEffectsById($this->potionId);
|
||||
}
|
||||
|
||||
public function getResidue(){
|
||||
public function getResidue() : Item{
|
||||
return VanillaItems::GLASS_BOTTLE();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user