mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
fix crash on falling block above the height limit, closes #2803
This commit is contained in:
@@ -109,7 +109,7 @@ class FallingBlock extends Entity{
|
|||||||
$this->flagForDespawn();
|
$this->flagForDespawn();
|
||||||
|
|
||||||
$block = $this->world->getBlock($pos);
|
$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
|
//FIXME: anvils are supposed to destroy torches
|
||||||
$this->getWorld()->dropItem($this, $this->block->asItem());
|
$this->getWorld()->dropItem($this, $this->block->asItem());
|
||||||
}else{
|
}else{
|
||||||
|
Reference in New Issue
Block a user