From 7b23baa020c48e4c5690d3209d6031525b98d92c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 28 Feb 2019 17:49:48 +0000 Subject: [PATCH] FlowerPot: yield contained plant when block-picking --- src/pocketmine/block/FlowerPot.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pocketmine/block/FlowerPot.php b/src/pocketmine/block/FlowerPot.php index 33de6c9ad..d7505029a 100644 --- a/src/pocketmine/block/FlowerPot.php +++ b/src/pocketmine/block/FlowerPot.php @@ -147,6 +147,10 @@ class FlowerPot extends Flowable{ return $items; } + public function getPickedItem() : Item{ + return $this->plant !== null ? $this->plant->asItem() : parent::getPickedItem(); + } + public function isAffectedBySilkTouch() : bool{ return false; }