fCraft.BulletBehavior.CanPlacePortal C# (CSharp) Method

CanPlacePortal() public static method

public static CanPlacePortal ( int x, int y, int z, Map map ) : bool
x int
y int
z int
map Map
return bool
        public static bool CanPlacePortal( int x, int y, int z, Map map )
        {
            int Count = 0;
            for ( int Z = z; Z < z + 2; Z++ ) {
                Block check = map.GetBlock( x, y, Z );
                if ( check != Block.Air && check != Block.Water && check != Block.Lava ) {
                    Count++;
                }
            }
            if ( Count == 2 ) {
                return true;
            } else {
                return false;
            }
        }