mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
Update Dirt.php
This commit is contained in:
parent
355c2167d1
commit
7347838876
1 changed files with 3 additions and 2 deletions
|
|
@ -42,8 +42,9 @@ class DirtBlock extends SolidBlock{
|
||||||
$this->level->scheduleBlockUpdate(new Position($this, 0, 0, $this->level), Utils::getRandomUpdateTicks(), BLOCK_UPDATE_RANDOM);
|
$this->level->scheduleBlockUpdate(new Position($this, 0, 0, $this->level), Utils::getRandomUpdateTicks(), BLOCK_UPDATE_RANDOM);
|
||||||
if($type === BLOCK_UPDATE_RANDOM){
|
if($type === BLOCK_UPDATE_RANDOM){
|
||||||
if(mt_rand(0, 3) == 0){
|
if(mt_rand(0, 3) == 0){
|
||||||
if(($this->getSide(1)->isTransparent === false) or ($this->getSide(1)->isLiquid) or ($this->getSide(1)->getID() == 60)) return false;
|
$up = $this->getSide(1);
|
||||||
if($this->getGrassInRadius() == true){
|
if(($up->isTransparent === false) or ($up->isLiquid) or ($up->getID() == 60)) return false;
|
||||||
|
if($this->getGrassInRadius()){
|
||||||
$this->level->setBlock($this, BlockAPI::get(GRASS, 0), true, false, true);
|
$this->level->setBlock($this, BlockAPI::get(GRASS, 0), true, false, true);
|
||||||
return BLOCK_UPDATE_RANDOM;
|
return BLOCK_UPDATE_RANDOM;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue