mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Fixed #1970 Breaking blocks does not remove tile entities
This commit is contained in:
parent
a0df0a8fff
commit
c3b1b59118
@ -874,6 +874,11 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
$drops = $target->getDrops($item); //Fixes tile entities being deleted before getting drops
|
||||
$target->onBreak($item);
|
||||
$tile = $this->getTile($target);
|
||||
if($tile instanceof Tile){
|
||||
$tile->close();
|
||||
}
|
||||
|
||||
if($item instanceof Item){
|
||||
$item->useOn($target);
|
||||
if($item->isTool() and $item->getDamage() >= $item->getMaxDurability()){
|
||||
|
Loading…
x
Reference in New Issue
Block a user