Fixed #2126 Items drop twice from tile entities

This commit is contained in:
Shoghi Cervantes
2014-09-27 14:31:41 +02:00
parent 16384c2b20
commit 1dfb17b932
3 changed files with 6 additions and 23 deletions

View File

@ -61,7 +61,7 @@ class BurningFurnace extends Solid{
}
public function onBreak(Item $item){
$this->getLevel()->setBlock($this, new Air(), true, true, true);
$this->getLevel()->setBlock($this, new Air(), true, true);
return true;
}
@ -116,15 +116,6 @@ class BurningFurnace extends Solid{
if($item->isPickaxe() >= 1){
$drops[] = [Item::FURNACE, 0, 1];
}
$t = $this->getLevel()->getTile($this);
if($t instanceof Furnace){
for($s = 0; $s < $t->getInventory()->getSize(); ++$s){
$slot = $t->getInventory()->getItem($s);
if($slot->getID() > Item::AIR and $slot->getCount() > 0){
$drops[] = [$slot->getID(), $slot->getDamage(), $slot->getCount()];
}
}
}
return $drops;
}