Ejemplo n.º 1
0
        public bool isStandableAtWithHeight(BlockLoc IslandSpace, int entityHeight)
        {
            BlockLoc underFoot = new BlockLoc(IslandSpace.WSX(), IslandSpace.WSY() - 1, IslandSpace.WSZ());//locInPath + new IntVector3(0, -1, 0);

            if (!isProfileSolidAtWithWithinCheck(IslandSpace) && isInProfileScope(IslandSpace))
            {
                if (isProfileSolidAtWithWithinCheck(underFoot))
                {
                    for (int i = 1; i < entityHeight; i++)
                    {
                        if (isProfileSolidAtWithWithinCheck(IslandSpace.getVector3WithAddedIntvec(new IntVector3(0, i, 0))))
                        {
                            return(false);
                        }
                    }
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
 public bool isSwimableAtWithHeight(BlockLoc IslandSpace, int entityHeight)
 {
     if (!isProfileSolidAtWithWithinCheck(IslandSpace))
     {
         if (IslandSpace.WSY() == 0)
         {
             for (int i = 1; i < entityHeight; i++)
             {
                 if (isProfileSolidAtWithWithinCheck(IslandSpace.getVector3WithAddedIntvec(new IntVector3(0, i, 0))))
                 {
                     return(false);
                 }
             }
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else
     {
         return(false);
     }
 }