public static void DoWater(Level lvl, ref PhysInfo C)
 {
     if (lvl.Config.FiniteLiquids)
     {
         if (lvl.Config.FiniteHighWater)
         {
             ushort y = C.Y;
             if (y >= lvl.Config.EdgeLevel)
             {
                 FinitePhysics.DoWaterOrLava(lvl, ref C);
                 return;
             }
         }
         else
         {
             FinitePhysics.DoWaterOrLava(lvl, ref C);
             return;
         }
     }
     if (lvl.Config.RandomFlow)
     {
         DoWaterRandowFlow(lvl, ref C);
     }
     else
     {
         DoWaterUniformFlow(lvl, ref C);
     }
 }
 public static void DoWater(Level lvl, ref PhysInfo C)
 {
     if (lvl.Config.FiniteLiquids)
     {
         FinitePhysics.DoWaterOrLava(lvl, ref C);
     }
     else if (lvl.Config.RandomFlow)
     {
         DoWaterRandowFlow(lvl, ref C);
     }
     else
     {
         DoWaterUniformFlow(lvl, ref C);
     }
 }
        public static void DoWater(Level lvl, ref Check C)
        {
            Random rand = lvl.physRandom;

            if (lvl.finite)
            {
                lvl.liquids.Remove(C.b);
                FinitePhysics.DoWaterOrLava(lvl, ref C);
                return;
            }

            if (lvl.randomFlow)
            {
                DoWaterRandowFlow(lvl, ref C);
            }
            else
            {
                DoWaterUniformFlow(lvl, ref C);
            }
        }
        public static void DoLava(Level lvl, ref PhysInfo C)
        {
            // upper 3 bits are time delay
            if (C.Data.Data < (4 << 5))
            {
                C.Data.Data += (1 << 5); return;
            }

            if (lvl.Config.FiniteLiquids)
            {
                FinitePhysics.DoWaterOrLava(lvl, ref C);
            }
            else if (lvl.Config.RandomFlow)
            {
                DoLavaRandowFlow(lvl, ref C, true);
            }
            else
            {
                DoLavaUniformFlow(lvl, ref C, true);
            }
        }
        public static void DoLava(Level lvl, ref Check C)
        {
            if (C.data.Data < 4)
            {
                C.data.Data++; return;
            }
            if (lvl.finite)
            {
                lvl.liquids.Remove(C.b);
                FinitePhysics.DoWaterOrLava(lvl, ref C);
                return;
            }

            if (lvl.randomFlow)
            {
                DoLavaRandowFlow(lvl, ref C, true);
            }
            else
            {
                DoLavaUniformFlow(lvl, ref C, true);
            }
        }