Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.IO;
- using System.Collections.Generic;
- using System.Linq;
- using Terraria;
- using Terraria.ID;
- using Terraria.Localization;
- using Terraria.ModLoader;
- using Terraria.World.Generation;
- using Microsoft.Xna.Framework;
- using Terraria.GameContent.Generation;
- using Terraria.ModLoader.IO;
- using Terraria.DataStructures;
- using Microsoft.Xna.Framework.Graphics;
- namespace retrocity
- {
- public class retrocityWorld : ModWorld
- {
- private const int saveVersion = 0;
- public static bool downedCoalKing = false;
- }
- public override void ModifyWorldGenTasks(List<GenPass> tasks, ref float totalWeight)
- {
- int genIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Shinies"));
- if (genIndex == -1)
- {
- return;
- }
- tasks.Insert(genIndex + 1, new PassLegacy("Crystal Cave", delegate (GenerationProgress progress)
- {
- progress.Message = "Forming Crystals...";
- for (int i = 0; i < Main.maxTilesX / 450; i++) //the bigger is the number = less biomes
- {
- int X = WorldGen.genRand.Next(1, Main.maxTilesX - 300);
- int Y = WorldGen.genRand.Next((int)WorldGen.rockLayer - 100, Main.maxTilesY - 200);
- int TileType = mod.TileType("CrystalBlock"); //this is the tile u want to use for the biome , if u want to use a vanilla tile then its int TileType = 56; 56 is obsidian block
- WorldGen.TileRunner(X, Y, 200, WorldGen.genRand.Next(100, 200), TileType, false, 0f, 0f, true, true); //350 is how big is the biome 100, 200 this changes how random it looks.
- }
- }));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement