mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Merge branch 'next-minor' into next-major
This commit is contained in:
@ -73,16 +73,17 @@ class Farmland extends Transparent{
|
||||
}
|
||||
|
||||
public function onRandomTick() : void{
|
||||
$world = $this->position->getWorld();
|
||||
if(!$this->canHydrate()){
|
||||
if($this->wetness > 0){
|
||||
$this->wetness--;
|
||||
$this->position->getWorld()->setBlock($this->position, $this, false);
|
||||
$world->setBlock($this->position, $this, false);
|
||||
}else{
|
||||
$this->position->getWorld()->setBlock($this->position, VanillaBlocks::DIRT());
|
||||
$world->setBlock($this->position, VanillaBlocks::DIRT());
|
||||
}
|
||||
}elseif($this->wetness < self::MAX_WETNESS){
|
||||
$this->wetness = self::MAX_WETNESS;
|
||||
$this->position->getWorld()->setBlock($this->position, $this, false);
|
||||
$world->setBlock($this->position, $this, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user