public override bool Equals(object obj)
        {
            if (!(obj is FaceSides))
            {
                return(false);
            }

            FaceSides sides = (FaceSides)obj;

            return(x == sides.x &&
                   y == sides.y &&
                   z == sides.z &&
                   id == sides.id &&
                   Name == sides.Name);
        }
        public static bool Parse(FaceSides fs, out TextureType type)
        {
            if (fs == Up)
            {
                type = TextureType.up;
                return(true);
            }
            else if (fs == Down)
            {
                type = TextureType.down;
                return(true);
            }
            else if (fs == North)
            {
                type = TextureType.north;
                return(true);
            }
            else if (fs == South)
            {
                type = TextureType.south;
                return(true);
            }
            else if (fs == East)
            {
                type = TextureType.east;
                return(true);
            }
            else if (fs == West)
            {
                type = TextureType.west;
                return(true);
            }

            type = TextureType.up;

            return(false);
        }
Esempio n. 3
0
 public BlockPos OffsetChunk(FaceSides dir)
 {
     return(this + dir * Chunk.ChunkSize);
 }
Esempio n. 4
0
 public BlockPos Offset(FaceSides dir)
 {
     return(this + dir);
 }