mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +00:00
Updated Entity::touchingBlock()
This commit is contained in:
parent
6a0b3c0e9a
commit
2a63699dcc
1 changed files with 1 additions and 1 deletions
|
|
@ -287,7 +287,7 @@ class Entity extends stdClass{
|
||||||
public function touchingBlock($x, $y, $z, $radius = 0.9){
|
public function touchingBlock($x, $y, $z, $radius = 0.9){
|
||||||
$block = new Vector3($x, $y, $z);
|
$block = new Vector3($x, $y, $z);
|
||||||
$me = new Vector3($this->x - 0.5, $this->y, $this->z - 0.5);
|
$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 true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue