mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Fixed Entity/Block issues on negative coordinates, closes #2100
This commit is contained in:
@ -69,6 +69,16 @@ class FallingBlock extends Entity{
|
||||
return false;
|
||||
}
|
||||
|
||||
if($this->ticksLived === 1){
|
||||
$block = $this->level->getBlock($this->floor());
|
||||
if($block->getID() != $this->blockId){
|
||||
$this->kill();
|
||||
return true;
|
||||
}
|
||||
$this->level->setBlock($this->floor(), Block::get(0, true));
|
||||
|
||||
}
|
||||
|
||||
$this->motionY -= $this->gravity;
|
||||
|
||||
$this->move($this->motionX, $this->motionY, $this->motionZ);
|
||||
@ -81,16 +91,6 @@ class FallingBlock extends Entity{
|
||||
|
||||
$pos = $this->floor();
|
||||
|
||||
if($this->ticksLived === 1){
|
||||
$block = $this->level->getBlock($pos);
|
||||
if($block->getID() != $this->blockId){
|
||||
$this->kill();
|
||||
return true;
|
||||
}
|
||||
$this->level->setBlock($pos, Block::get(0, true));
|
||||
|
||||
}
|
||||
|
||||
if($this->onGround){
|
||||
$this->kill();
|
||||
$block = $this->level->getBlock($pos);
|
||||
|
Reference in New Issue
Block a user