mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Fixed #410
This commit is contained in:
parent
8dcdf55264
commit
d177af3297
@ -785,7 +785,7 @@ class Entity extends Position{
|
|||||||
public function isSupport(Vector3 $pos, $radius = 1){
|
public function isSupport(Vector3 $pos, $radius = 1){
|
||||||
$me = new Vector2($this->x - 0.5, $this->z - 0.5);
|
$me = new Vector2($this->x - 0.5, $this->z - 0.5);
|
||||||
$diff = $this->y - $pos->y;
|
$diff = $this->y - $pos->y;
|
||||||
if($me->distance(new Vector2($pos->x, $pos->z)) < $radius and $diff > 0 and $diff < 1.6){
|
if($me->distance(new Vector2($pos->x, $pos->z)) < $radius and $diff > -0.7 and $diff < 1.6){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user