mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Improved item drop spawning
This commit is contained in:
@ -121,10 +121,7 @@ class Leaves2 extends Leaves{
|
||||
if($ev->isCancelled() or $this->findLog($this, $visited, 0, $check) === true){
|
||||
$this->getLevel()->setBlock($this, $this, false, false);
|
||||
}else{
|
||||
$this->getLevel()->setBlock($this, new Air(), false, false, true);
|
||||
if(mt_rand(1, 20) === 1){ //Saplings
|
||||
$this->getLevel()->dropItem($this, Item::get($this->id, $this->meta & 0x03, 1));
|
||||
}
|
||||
$this->getLevel()->useBreakOn($this);
|
||||
|
||||
return Level::BLOCK_UPDATE_NORMAL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user