diff --git a/src/pocketmine/block/BurningFurnace.php b/src/pocketmine/block/BurningFurnace.php index e2c702852..12a58907b 100644 --- a/src/pocketmine/block/BurningFurnace.php +++ b/src/pocketmine/block/BurningFurnace.php @@ -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; } diff --git a/src/pocketmine/block/Chest.php b/src/pocketmine/block/Chest.php index 8de754200..c127ed952 100644 --- a/src/pocketmine/block/Chest.php +++ b/src/pocketmine/block/Chest.php @@ -104,7 +104,7 @@ class Chest extends Transparent{ if($t instanceof TileChest){ $t->unpair(); } - $this->getLevel()->setBlock($this, new Air(), true, true, true); + $this->getLevel()->setBlock($this, new Air(), true, true); return true; } @@ -143,19 +143,8 @@ class Chest extends Transparent{ } public function getDrops(Item $item){ - $drops = [ + return [ [$this->id, 0, 1], ]; - $t = $this->getLevel()->getTile($this); - if($t instanceof TileChest){ - for($s = 0; $s < $t->getRealInventory()->getSize(); ++$s){ - $slot = $t->getRealInventory()->getItem($s); - if($slot->getID() > Item::AIR and $slot->getCount() > 0){ - $drops[] = [$slot->getID(), $slot->getDamage(), $slot->getCount()]; - } - } - } - - return $drops; } } \ No newline at end of file diff --git a/src/pocketmine/level/format/mcregion/McRegion.php b/src/pocketmine/level/format/mcregion/McRegion.php index 709db640d..3a395c32a 100644 --- a/src/pocketmine/level/format/mcregion/McRegion.php +++ b/src/pocketmine/level/format/mcregion/McRegion.php @@ -200,6 +200,9 @@ class McRegion extends BaseLevelProvider{ } foreach($chunk->getEntities() as $entity){ + if($entity instanceof Player){ + continue; + } $entity->close(); }