Fixed Player movement collision checks

This commit is contained in:
Shoghi Cervantes 2014-10-06 11:47:28 +02:00
parent 761cd59514
commit 57bb8f14fa

View File

@ -948,7 +948,7 @@ abstract class Entity extends Position implements Metadatable{
if($this instanceof Player){
if(($this->onGround and $movY != 0) or (!$this->onGround and $movY <= 0)){
if(count($this->getLevel()->getCollisionBlocks($this->boundingBox->getOffsetBoundingBox(0, $movY - 0.1, 0))) > 0){
if(count($this->getLevel()->getCollisionBlocks($this->boundingBox->getOffsetBoundingBox(0, $movY - 0.1, 0)->expand(0.01, 0, 0.01))) > 0){
$isColliding = true;
}else{
$isColliding = false;