Improved block collision check

This commit is contained in:
Shoghi Cervantes 2014-09-16 12:02:33 +02:00
parent 8a8a95480e
commit 45dbb3f828
2 changed files with 5 additions and 3 deletions

View File

@ -994,9 +994,9 @@ abstract class Entity extends Position implements Metadatable{
} }
protected function checkBlockCollision(){ protected function checkBlockCollision(){
$minX = floor($this->boundingBox->minX + 0.001); $minX = floor($this->boundingBox->minX - 0.001);
$minY = floor($this->boundingBox->minY + 0.001); $minY = floor($this->boundingBox->minY - 0.001);
$minZ = floor($this->boundingBox->minZ + 0.001); $minZ = floor($this->boundingBox->minZ - 0.001);
$maxX = floor($this->boundingBox->maxX + 0.001); $maxX = floor($this->boundingBox->maxX + 0.001);
$maxY = floor($this->boundingBox->maxY + 0.001); $maxY = floor($this->boundingBox->maxY + 0.001);
$maxZ = floor($this->boundingBox->maxZ + 0.001); $maxZ = floor($this->boundingBox->maxZ + 0.001);

View File

@ -135,6 +135,8 @@ abstract class Living extends Entity implements Damageable{
} }
$this->extinguish(); $this->extinguish();
}else{
$this->airTicks = 300;
} }
if($this->attackTime > 0){ if($this->attackTime > 0){