From 20a4a80f849866a69e48f6120702bf0e56e37df7 Mon Sep 17 00:00:00 2001 From: ArkQuark <74979909+ArkQuark@users.noreply.github.com> Date: Thu, 23 Dec 2021 23:16:30 +0300 Subject: [PATCH] Update TallGrass.php --- src/material/block/plant/TallGrass.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/material/block/plant/TallGrass.php b/src/material/block/plant/TallGrass.php index c5576e51..cb3857b6 100644 --- a/src/material/block/plant/TallGrass.php +++ b/src/material/block/plant/TallGrass.php @@ -61,15 +61,23 @@ class TallGrassBlock extends FlowableBlock{ 0, 0, 0, - 0, - 0, ); if ($item->isShears()){ - $drops[] = array(TALL_GRASS, 0, 1); - }elseif(($item = $possibleDrops[mt_rand(0, count($possibleDrops) - 1)]) !== 0){ + $drops[] = array($this->id, $this->meta & 0x03, 1); + } + elseif(($item = $possibleDrops[mt_rand(0, count($possibleDrops) - 1)]) !== 0){ $drops[] = $item; } return $drops; } + + public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ + $down = $this->getSide(0); + if($down->getID() == 2 or $down->getID() == 3){ + $this->level->setBlock($block, $this, true, false, true); + return true; + } + return false; + } } \ No newline at end of file