mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Added TallGrassTrait, remove weirdly specific logic from FortuneDropHelper
this needs to be dealt with before release otherwise we'll be stuck with FortuneDropHelper::grass() this is the obvious solution and should have been done some time ago - stuff like flammability was already a problem for double tall grass anyway
This commit is contained in:
@ -23,10 +23,13 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\block\utils\FortuneDropHelper;
|
||||
use pocketmine\block\utils\TallGrassTrait;
|
||||
use pocketmine\item\Item;
|
||||
|
||||
class DoubleTallGrass extends DoublePlant{
|
||||
use TallGrassTrait {
|
||||
getDropsForIncompatibleTool as traitGetDropsForIncompatibleTool;
|
||||
}
|
||||
|
||||
public function canBeReplaced() : bool{
|
||||
return true;
|
||||
@ -34,7 +37,7 @@ class DoubleTallGrass extends DoublePlant{
|
||||
|
||||
public function getDropsForIncompatibleTool(Item $item) : array{
|
||||
if($this->top){
|
||||
return FortuneDropHelper::grass($item);
|
||||
return $this->traitGetDropsForIncompatibleTool($item);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
Reference in New Issue
Block a user