Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.IO;
- using System.Collections.Generic;
- using Terraria;
- using Terraria.ID;
- using Terraria.ModLoader;
- using Terraria.World.Generation;
- using Microsoft.Xna.Framework;
- using Terraria.GameContent.Generation;
- using System.Linq;
- namespace TileNation
- {
- public class TileNationWorld : ModWorld
- {
- 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("Bobak Biome", delegate (GenerationProgress progress)
- {
- progress.Message = "Sending Evil Bobak's To your World";
- for (int i = 0; i < Main.maxTilesX / 3000; i++)
- {
- int X = WorldGen.genRand.Next(1, Main.maxTilesX - 500);
- int Y = WorldGen.genRand.Next((int)WorldGen.rockLayer - 50, Main.maxTilesY - 300);
- int TileType = mod.TileType("BobakHiveBlock");
- WorldGen.TileRunner(X, Y, 300, WorldGen.genRand.Next(300, 300), TileType, false, 0f, 0f, true, true);
- }
- }));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement