mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-07 10:31:51 +00:00
Increased support Y radius
This commit is contained in:
parent
c42fd790ff
commit
1e14485444
@ -776,7 +776,7 @@ class Entity extends Position{
|
|||||||
public function isSupport(Vector3 $pos, $radius = 1){
|
public function isSupport(Vector3 $pos, $radius = 1){
|
||||||
$me = new Vector3($this->x - 0.5, $pos->y, $this->z - 0.5);
|
$me = new Vector3($this->x - 0.5, $pos->y, $this->z - 0.5);
|
||||||
$diff = $this->y - $pos->y;
|
$diff = $this->y - $pos->y;
|
||||||
if($me->distance($pos) < $radius and $diff > 0 and $diff < 1.2){
|
if($me->distance($pos) < $radius and $diff > 0 and $diff < 1.6){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user