mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
commit
571f3d5570
6 changed files with 24 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue