Removed a bunch of TODO and fixed item drops on block update

This commit is contained in:
Shoghi Cervantes
2014-10-13 18:54:34 +02:00
parent 1eec333501
commit b26ee09f76
14 changed files with 26 additions and 131 deletions

View File

@ -81,9 +81,8 @@ class Carpet extends Flowable{
public function onUpdate($type){
if($type === Level::BLOCK_UPDATE_NORMAL){
if($this->getSide(0)->getID() === self::AIR){ //TODO: Replace with common break method
$this->getLevel()->dropItem($this, Item::get($this->id, $this->meta, 1));
$this->getLevel()->setBlock($this, new Air(), true);
if($this->getSide(0)->getID() === self::AIR){
$this->getLevel()->useBreakOn($this);
return Level::BLOCK_UPDATE_NORMAL;
}