示例#1
0
        private void LoadAlloyRecipes()
        {
            Dictionary <AssetLocation, AlloyRecipe> alloys = api.Assets.GetMany <AlloyRecipe>(api.Server.Logger, "recipes/alloy");

            foreach (var val in alloys)
            {
                if (!val.Value.Enabled)
                {
                    continue;
                }

                val.Value.Resolve(api.World, "alloy recipe " + val.Key);
                api.RegisterMetalAlloy(val.Value);
            }

            api.World.Logger.Event("{0} metal alloys loaded", alloys.Count);
        }