daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System.IO;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using Terraria;
  5. using Terraria.ID;
  6. using Terraria.Localization;
  7. using Terraria.ModLoader;
  8. using Terraria.World.Generation;
  9. using Microsoft.Xna.Framework;
  10. using Terraria.GameContent.Generation;
  11. using Terraria.ModLoader.IO;
  12. using Terraria.DataStructures;
  13. using Microsoft.Xna.Framework.Graphics;
  14.  
  15. namespace retrocity
  16. {
  17.     public class retrocityWorld : ModWorld
  18.     {
  19.         private const int saveVersion = 0;
  20.         public static bool downedCoalKing = false;
  21.     }
  22.  
  23.  
  24.         public override void ModifyWorldGenTasks(List<GenPass> tasks, ref float totalWeight)
  25.         {
  26.             int genIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Shinies"));
  27.             if (genIndex == -1)
  28.             {
  29.                 return;
  30.             }
  31.             tasks.Insert(genIndex + 1, new PassLegacy("Crystal Cave", delegate (GenerationProgress progress)
  32.             {
  33.                 progress.Message = "Forming Crystals...";
  34.                 for (int i = 0; i < Main.maxTilesX / 450; i++)       //the bigger is the number = less biomes
  35.                 {
  36.                     int X = WorldGen.genRand.Next(1, Main.maxTilesX - 300);
  37.                     int Y = WorldGen.genRand.Next((int)WorldGen.rockLayer - 100, Main.maxTilesY - 200);
  38.                     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
  39.  
  40.                     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.
  41.  
  42.                 }
  43.  
  44.             }));
  45.         }
  46.  
  47.  
  48.  
  49. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top