tModLoader Error CS0234 (1.4) - Fixed (Check Thread)

RADICALAdrift

Official Terrarian
Got this error with my ModWorld file while updating my mod to TML 1.4
ModWorld Error.png

Related Code Here
C:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.World.Generation;
using Terraria.GameContent.Generation;
using System.IO;
using System.Collections.Generic;
using Microsoft.Xna.Framework;

namespace OPDefense
{
    public class ModWord : ModWorld
    {
        private const int saveVersion = 0;
        public override void ModifyWorldGenTasks(List<GenPass> tasks, ref float totalWeight)
        {
            int ShiniesIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Shinies"));
            if (ShiniesIndex == -1)
            {
                return;
            }
            tasks.Insert(ShiniesIndex + 1, new PassLegacy("Mod Ores", delegate (GenerationProgress progress)
            {
                progress.Message = "Mod Ores";
                for (int k = 0; k < (int)((double)(Main.maxTilesX * Main.maxTilesY) * 6E-04); k++)
                {
                    WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int)WorldGen.worldSurfaceLow, Main.maxTilesY), (double)WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(2, 6), mod.TileType("CraytaniumOreTile"), false, 0f, 0f, false, true);
                }
            }));
        }

    }
}

P.S i get if the world generation has completely changed, I just want to know what i need to change to get my world gen code working and yes ive tried to let VS2022 suggest fixes but they still show up red
Thanks in advance,
Radical
 
Last edited:
Back
Top Bottom