armor rewrite

This commit is contained in:
GameHerobrine 2023-01-23 17:39:57 +03:00
parent 45b36cb034
commit bae0d4618e
34 changed files with 143 additions and 67 deletions

View file

@ -13,12 +13,12 @@ class MCDiagonalProvider implements INeighborProvider
foreach(MCDiagonalProvider::$neighbors as $offset){
$pnt = $tile->addOffset($offset);
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){
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, false)->isSolid){
if(!$tile->level->getBlockWithoutVector($pnt->x, $pnt->y + 1, $pnt->z, false)->isSolid){
++$pnt->y;
$pnts[] = $pnt;
}