From 45dbb3f82896c7c8d50a8e8043bb907a4bcb6f49 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 16 Sep 2014 12:02:33 +0200 Subject: [PATCH] Improved block collision check --- src/pocketmine/entity/Entity.php | 6 +++--- src/pocketmine/entity/Living.php | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index dd40cff51..87062d59d 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -994,9 +994,9 @@ public function move($dx, $dy, $dz){ } protected function checkBlockCollision(){ - $minX = floor($this->boundingBox->minX + 0.001); - $minY = floor($this->boundingBox->minY + 0.001); - $minZ = floor($this->boundingBox->minZ + 0.001); + $minX = floor($this->boundingBox->minX - 0.001); + $minY = floor($this->boundingBox->minY - 0.001); + $minZ = floor($this->boundingBox->minZ - 0.001); $maxX = floor($this->boundingBox->maxX + 0.001); $maxY = floor($this->boundingBox->maxY + 0.001); $maxZ = floor($this->boundingBox->maxZ + 0.001); diff --git a/src/pocketmine/entity/Living.php b/src/pocketmine/entity/Living.php index b96024ad6..9b825ebf1 100644 --- a/src/pocketmine/entity/Living.php +++ b/src/pocketmine/entity/Living.php @@ -135,6 +135,8 @@ public function entityBaseTick(){ } $this->extinguish(); + }else{ + $this->airTicks = 300; } if($this->attackTime > 0){