Explosion: fix chest unpairing (root cause of #2701)

not ready to call this "fixed" yet because any chests that were already affected by the bug will still be affected. This change will prevent the creation of more broken chests like this.
This commit is contained in:
Dylan K. Taylor 2019-01-29 13:58:47 +00:00
parent 1099e2044b
commit 5364e4de68

View File

@ -219,11 +219,10 @@ class Explosion{
$t = $this->level->getTileAt($block->x, $block->y, $block->z);
if($t instanceof Tile){
if($t instanceof Chest){
$t->unpair();
}
if($yieldDrops and $t instanceof Container){
if($t instanceof Chest){
$t->unpair();
}
$t->getInventory()->dropContents($this->level, $t->add(0.5, 0.5, 0.5));
}