Improved item drop spawning

This commit is contained in:
Shoghi Cervantes
2014-10-13 22:45:04 +02:00
parent b26ee09f76
commit 883f93cc8c
8 changed files with 11 additions and 22 deletions

View File

@ -33,9 +33,8 @@ class BrownMushroom extends Flowable{
public function onUpdate($type){
if($type === Level::BLOCK_UPDATE_NORMAL){
if($this->getSide(0)->isTransparent === true){ //Replace with common break method
$this->getLevel()->dropItem($this, Item::get($this->id));
$this->getLevel()->setBlock($this, new Air(), false, false, true);
if($this->getSide(0)->isTransparent === true){
$this->getLevel()->useBreakOn($this);
return Level::BLOCK_UPDATE_NORMAL;
}