Beispiel #1
0
        private void Set(string namedID, int levelData, Vector3i position)
        {
            Liquid?liquid = Liquid.TranslateNamedID(namedID);

            if (liquid == null)
            {
                Context.Console.WriteError("Cannot find liquid.");

                return;
            }

            var level = (LiquidLevel)levelData;

            if (level is < LiquidLevel.One or > LiquidLevel.Eight)
            {
                Context.Console.WriteError("Invalid level.");

                return;
            }

            Context.Player.World.SetLiquid(liquid.AsInstance(level, isStatic: true), position);
        }