mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
more stuff uses StaticBlock class now
This commit is contained in:
parent
9cb7fbafaa
commit
e70c501df8
12 changed files with 49 additions and 86 deletions
|
|
@ -42,12 +42,11 @@ class TileNavigator implements ITileNavigator
|
|||
$current = $open->top();
|
||||
$open->next();
|
||||
if ($current == $to){
|
||||
|
||||
return $this->reconstructPath($path, $current);
|
||||
}
|
||||
foreach($this->neighborProvider->getNeighbors($current) as $neighbor)
|
||||
{
|
||||
if(!Utils::in_range(Utils::distance_noroot($neighbor->asArray(), $from->asArray()), -$maxDist, $maxDist)){
|
||||
if(!Utils::in_range(($from->x - $neighbor->x)*($from->x - $neighbor->x) + ($from->y - $neighbor->y)*($from->y - $neighbor->y) + ($from->z - $neighbor->z)*($from->z - $neighbor->z), -$maxDist, $maxDist)){ //Utils::distance_noroot($neighbor->asArray(), $from->asArray())
|
||||
continue;
|
||||
}
|
||||
if(isset($visited[(string)$neighbor])){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue