mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +00:00
changed pathfinder(hopefully one last time)
This commit is contained in:
parent
8c12e0de26
commit
e11c40f645
28 changed files with 401 additions and 416 deletions
16
src/astarnavigator/providers/MCBlockedProvider.php
Normal file
16
src/astarnavigator/providers/MCBlockedProvider.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
|
||||
class MCBlockedProvider implements IBlockedProvider
|
||||
{
|
||||
public function isBlocked(PathTile $tile)
|
||||
{
|
||||
if($tile instanceof PathTileXYZ){
|
||||
$b = $tile->level->getBlockWithoutVector($tile->x, $tile->y, $tile->z);
|
||||
return $b instanceof Block && $b->isSolid;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue