diff --git a/src/material/block/plant/Beetroot.php b/src/material/block/plant/Beetroot.php index fecad0da..6b5372ab 100644 --- a/src/material/block/plant/Beetroot.php +++ b/src/material/block/plant/Beetroot.php @@ -38,7 +38,10 @@ class BeetrootBlock extends FlowableBlock{ public function onActivate(Item $item, Player $player){ if($item->getID() === DYE and $item->getMetadata() === 0x0F){ //Bonemeal - $this->meta = 0x07; + $this->meta += mt_rand(0, 3) + 2; + if ($this->meta > 7) { + $this->meta = 7; + } $this->level->setBlock($this, $this, true, false, true); if(($player->gamemode & 0x01) === 0){ $player->removeItem(DYE,0x0F,1); diff --git a/src/material/block/plant/Carrot.php b/src/material/block/plant/Carrot.php index a6e36da3..ff72b88a 100644 --- a/src/material/block/plant/Carrot.php +++ b/src/material/block/plant/Carrot.php @@ -38,7 +38,10 @@ class CarrotBlock extends FlowableBlock{ public function onActivate(Item $item, Player $player){ if($item->getID() === DYE and $item->getMetadata() === 0x0F){ //Bonemeal - $this->meta = 0x07; + $this->meta += mt_rand(0, 3) + 2; + if ($this->meta > 7) { + $this->meta = 7; + } $this->level->setBlock($this, $this, true, false, true); if(($player->gamemode & 0x01) === 0){ $player->removeItem(DYE,0x0F,1); diff --git a/src/material/block/plant/MelonStem.php b/src/material/block/plant/MelonStem.php index bdd32ad2..3ca92ad9 100644 --- a/src/material/block/plant/MelonStem.php +++ b/src/material/block/plant/MelonStem.php @@ -69,7 +69,10 @@ class MelonStemBlock extends FlowableBlock{ public function onActivate(Item $item, Player $player){ if($item->getID() === DYE and $item->getMetadata() === 0x0F){ //Bonemeal - $this->meta = 0x07; + $this->meta += mt_rand(0, 3) + 2; + if ($this->meta > 7) { + $this->meta = 7; + } $this->level->setBlock($this, $this, true, false, true); if(($player->gamemode & 0x01) === 0){ $player->removeItem(DYE,0x0F,1); diff --git a/src/material/block/plant/PotatoBlock.php b/src/material/block/plant/PotatoBlock.php index 67fcf239..562b7954 100644 --- a/src/material/block/plant/PotatoBlock.php +++ b/src/material/block/plant/PotatoBlock.php @@ -38,7 +38,10 @@ class PotatoBlock extends FlowableBlock{ public function onActivate(Item $item, Player $player){ if($item->getID() === DYE and $item->getMetadata() === 0x0F){ //Bonemeal - $this->meta = 0x07; + $this->meta += mt_rand(0, 3) + 2; + if ($this->meta > 7) { + $this->meta = 7; + } $this->level->setBlock($this, $this, true, false, true); if(($player->gamemode & 0x01) === 0){ $player->removeItem(DYE,0x0F,1); diff --git a/src/material/block/plant/PumpkinStem.php b/src/material/block/plant/PumpkinStem.php index 5f47b40c..8e0a2aa1 100644 --- a/src/material/block/plant/PumpkinStem.php +++ b/src/material/block/plant/PumpkinStem.php @@ -69,7 +69,10 @@ class PumpkinStemBlock extends FlowableBlock{ public function onActivate(Item $item, Player $player){ if($item->getID() === DYE and $item->getMetadata() === 0x0F){ //Bonemeal - $this->meta = 0x07; + $this->meta += mt_rand(0, 3) + 2; + if ($this->meta > 7) { + $this->meta = 7; + } $this->level->setBlock($this, $this, true, false, true); if(($player->gamemode & 0x01) === 0){ $player->removeItem(DYE,0x0F,1); diff --git a/src/material/block/plant/Wheat.php b/src/material/block/plant/Wheat.php index c43c80ac..d29b5b6f 100644 --- a/src/material/block/plant/Wheat.php +++ b/src/material/block/plant/Wheat.php @@ -38,7 +38,10 @@ class WheatBlock extends FlowableBlock{ public function onActivate(Item $item, Player $player){ if($item->getID() === DYE and $item->getMetadata() === 0x0F){ //Bonemeal - $this->meta = 0x07; + $this->meta += mt_rand(0, 3) + 2; + if ($this->meta > 7) { + $this->meta = 7; + } $this->level->setBlock($this, $this, true, false, true); if(($player->gamemode & 0x01) === 0){ $player->removeItem(DYE,0x0F,1);