fix crash on falling block above the height limit, closes #2803

This commit is contained in:
Dylan K. Taylor 2019-07-02 19:56:26 +01:00
parent d23eeff832
commit 720254f64f

View File

@ -109,7 +109,7 @@ class FallingBlock extends Entity{
$this->flagForDespawn();
$block = $this->world->getBlock($pos);
if($block->isTransparent() and !$block->canBeReplaced()){
if(($block->isTransparent() and !$block->canBeReplaced()) or !$this->world->isInWorld($pos->getFloorX(), $pos->getFloorY(), $pos->getFloorZ())){
//FIXME: anvils are supposed to destroy torches
$this->getWorld()->dropItem($this, $this->block->asItem());
}else{