Added new predictive flight protection

This commit is contained in:
Shoghi Cervantes
2015-01-14 23:47:01 +01:00
parent 24c6cca664
commit 63f1a50be4
3 changed files with 21 additions and 9 deletions

View File

@@ -1004,7 +1004,7 @@ abstract class Entity extends Location implements Metadatable{
if(!$this->onGround or $movY != 0){
$bb = clone $this->boundingBox;
$bb->minY -= 1;
if(count($this->level->getCollisionBlocks($bb->expand(0.01, 0.01, 0.01))) > 0){
if(count($this->level->getCollisionBlocks($bb)) > 0){
$this->onGround = true;
}else{
$this->onGround = false;