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:
Dylan T
2020-06-28 17:53:03 +01:00
committed by GitHub
parent 01d221b794
commit d585081c22
15 changed files with 83 additions and 36 deletions

View File

@@ -25,13 +25,13 @@ namespace pocketmine\item;
use pocketmine\entity\Living;
class MilkBucket extends Item implements Consumable{
class MilkBucket extends Item implements ConsumableItem{
public function getMaxStackSize() : int{
return 1;
}
public function getResidue(){
public function getResidue() : Item{
return VanillaItems::BUCKET();
}