mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
small tweaks
This commit is contained in:
parent
c41e31e237
commit
9f5304bdad
7 changed files with 52 additions and 47 deletions
|
|
@ -12,14 +12,15 @@ class MCDiagonalProvider implements INeighborProvider
|
|||
$pnts = [];
|
||||
foreach(MCDiagonalProvider::$neighbors as $offset){
|
||||
$pnt = $tile->addOffset($offset);
|
||||
if(!$tile->level->getBlockWithoutVector($pnt->x, $pnt->y, $pnt->z)->isSolid){
|
||||
if(!$tile->level->getBlockWithoutVector($pnt->x, $pnt->y - 1, $pnt->z)->isSolid){
|
||||
if(!$tile->level->getBlockWithoutVector($pnt->x, $pnt->y, $pnt->z, false)->isSolid){
|
||||
if(!$tile->level->getBlockWithoutVector($pnt->x, $pnt->y - 1, $pnt->z, false)->isSolid){
|
||||
--$pnt->y;
|
||||
}
|
||||
$pnts[] = $pnt;
|
||||
}else{
|
||||
if(!$tile->level->getBlockWithoutVector($pnt->x, $pnt->y + 1, $pnt->z)->isSolid){
|
||||
$pnts[] = $pnt->addOffset(self::$jumpOffset);
|
||||
if(!$tile->level->getBlockWithoutVector($pnt->x, $pnt->y + 1, $pnt->z, false)->isSolid){
|
||||
++$pnt->y;
|
||||
$pnts[] = $pnt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue