Fixed Entity/Block issues on negative coordinates, closes #2100

This commit is contained in:
Shoghi Cervantes
2014-09-22 11:48:39 +02:00
parent 0a29e66b62
commit 0907aedcef
5 changed files with 38 additions and 39 deletions

View File

@ -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);