Updated Entity::touchingBlock()

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-26 12:59:22 +01:00
parent 6a0b3c0e9a
commit 2a63699dcc

View File

@ -287,7 +287,7 @@ class Entity extends stdClass{
public function touchingBlock($x, $y, $z, $radius = 0.9){
$block = new Vector3($x, $y, $z);
$me = new Vector3($this->x - 0.5, $this->y, $this->z - 0.5);
if(($y == (((int) $this->y) - 1) or $y == ((int) $this->y)) and $block->maxPlainDistance($me) < $radius){
if(($y == (((int) $this->y) - 1) or $y == ((int) $this->y) or $y == (((int) $this->y) + 1)) and $block->maxPlainDistance($me) < $radius){
return true;
}
return false;