mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Fixes
This commit is contained in:
@ -45,13 +45,11 @@ class SaplingBlock extends TransparentBlock{
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
console("SAPLING SAPLING SAPLING");return false; //Placeholder
|
||||
if($block->inWorld === true){
|
||||
$down = $level->getBlockFace($block, 0);
|
||||
$down = $this->getSide(0);
|
||||
if($down->getID() === GRASS or $down->getID() === DIRT or $down->getID() === FARMLAND){
|
||||
$level->setBlock($block, $this->id, $this->getMetadata());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -66,9 +64,6 @@ class SaplingBlock extends TransparentBlock{
|
||||
|
||||
public function onUpdate($type){
|
||||
console("SAPLING SAPLING SAPLING");return false; //Placeholder
|
||||
if($this->inWorld !== true){
|
||||
return false;
|
||||
}
|
||||
if($type === BLOCK_UPDATE_RANDOM and mt_rand(0,2) === 0){ //Growth
|
||||
if(($this->meta & 0x08) === 0x08){
|
||||
TreeObject::growTree($level, $this);
|
||||
|
Reference in New Issue
Block a user