mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +00:00
Update TallGrass.php
This commit is contained in:
parent
8f4a1807ae
commit
20a4a80f84
1 changed files with 12 additions and 4 deletions
|
|
@ -61,15 +61,23 @@ class TallGrassBlock extends FlowableBlock{
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
0,
|
|
||||||
);
|
);
|
||||||
if ($item->isShears()){
|
if ($item->isShears()){
|
||||||
$drops[] = array(TALL_GRASS, 0, 1);
|
$drops[] = array($this->id, $this->meta & 0x03, 1);
|
||||||
}elseif(($item = $possibleDrops[mt_rand(0, count($possibleDrops) - 1)]) !== 0){
|
}
|
||||||
|
elseif(($item = $possibleDrops[mt_rand(0, count($possibleDrops) - 1)]) !== 0){
|
||||||
$drops[] = $item;
|
$drops[] = $item;
|
||||||
}
|
}
|
||||||
return $drops;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue