Beispiel #1
0
        private static bool LiquidIntersectionCheck(World world, Ray ray, Vector3i position)
        {
            LiquidInstance?liquid = world.GetLiquid(position);

            // Check if the ray intersects the bounding box of the liquid.
            return(liquid != null && liquid.Liquid != Liquid.None &&
                   Liquid.GetBoundingBox(position, liquid.Level).Intersects(ray));
        }