tModLoader v2023.01
A mod to make and play Terraria mods
Terraria.WorldGen Class Reference

Classes

struct  CheckTreeSettings
 
struct  GrowTreeSettings
 
class  Hooks
 
class  SavedOreTiers
 
class  Spread
 
class  TenthAnniversaryWorldInfo
 

Public Types

enum  SpecialKillTileContext { None , MowingTheGrass }
 

Public Member Functions

delegate bool GetTreeFoliageDataMethod (int i, int j, int xoffset, ref int treeFrame, ref int treeStyle, out int floorY, out int topTextureFrameWidth, out int topTextureFrameHeight)
 

Static Public Member Functions

static bool ActiveAndWalkableTile (int i, int j)
 
static bool AddBuriedChest (int i, int j, int contain=0, bool notNearOtherChests=false, int Style=-1, bool trySlope=false, ushort chestTileType=0)
 
static bool AddBuriedChest (Point point, int contain=0, bool notNearOtherChests=false, int Style=-1)
 
static void AddHellHouses ()
 
static bool AddLifeCrystal (int i, int j)
 
static void AddShadowOrb (int x, int y)
 
static void AddTrees ()
 
static void AddUpAlignmentCounts (bool clearCounts=false)
 
static bool AllowsSandfall (Tile tileTopCache)
 
static bool AnchorValid (Tile tileCache, AnchorType anchor)
 
static bool BiomeTileCheck (int x, int y)
 
static bool BlockBelowMakesSandFall (int i, int j)
 
static bool BottomEdgeCanBeAttachedTo (int i, int j)
 
static void BroadcastText (NetworkText text, byte r, byte g, byte b)
 
static void BroadcastText (NetworkText text, Color color)
 
static void BroadcastText (NetworkText text, int r, int g, int b)
 
static void BroadcastText (NetworkText text, Vector3 color)
 
static void BroadcastText (NetworkText text, Vector4 color)
 
static bool BunnyCannonCanFire ()
 
static void CactusFrame (int i, int j)
 
static bool CanCutTile (int x, int y, TileCuttingContext context)
 
static bool CanKillTile (int i, int j)
 
static bool CanKillTile (int i, int j, out bool blockDamaged)
 
static bool CanKillTile (int i, int j, SpecialKillTileContext context)
 
static int CanPlaceProjectilePressurePad (int x, int y, int type=442, int style=0, int direction=0, int alternate=0)
 
static bool CanPlaceSink (int x, int y, ushort type, int style)
 
static bool CanPoundTile (int x, int y)
 
static bool CanUnderwaterPlantGrowHere (ushort type, int x, int y, bool ignoreSelf)
 
static void CaveOpenater (int i, int j)
 
static void Caverer (int X, int Y)
 
static void Cavinator (int i, int j, int steps)
 
static void ChasmRunner (int i, int j, int steps, bool makeOrb=false)
 
static void ChasmRunnerSideways (int i, int j, int direction, int steps)
 
static void Check1x1 (int x, int y, int type)
 
static void Check1x2 (int x, int j, ushort type)
 
static void Check1x2Top (int x, int j, ushort type)
 
static void Check1xX (int x, int j, short type)
 
static void Check2x1 (int i, int y, ushort type)
 
static void Check2x2 (int i, int j, int type)
 
static void Check2x2Style (int i, int j, int type)
 
static void Check2x3Wall (int x, int y)
 
static void Check2x5 (int i, int j, int type)
 
static void Check2xX (int i, int j, ushort type)
 
static void Check3x1 (int i, int j, int type)
 
static void Check3x2 (int i, int j, int type)
 
static void Check3x2Wall (int x, int y)
 
static void Check3x3 (int i, int j, int type)
 
static void Check3x3Wall (int x, int y)
 
static void Check3x4 (int i, int j, int type)
 
static void Check3x5 (int i, int j, int type)
 
static void Check3x6 (int i, int j, int type)
 
static void Check4x2 (int i, int j, int type)
 
static void Check4x3Wall (int x, int y)
 
static void Check5x4 (int i, int j, int type)
 
static void Check6x3 (int i, int j, int type)
 
static void Check6x4Wall (int x, int y)
 
static void CheckAchievement_RealEstate ()
 
static void CheckAlch (int x, int y)
 
static void CheckBamboo (int x, int y)
 
static void CheckBanner (int x, int j, byte type)
 
static bool CheckBoulderChest (int i, int j)
 
static bool CheckCactus (int i, int j)
 
static void CheckCannon (int i, int j, int type)
 
static void CheckCatTail (int x, int j)
 
static void CheckChand (int i, int j, int type)
 
static void CheckChest (int i, int j, int type)
 
static void CheckDye (int x, int y)
 
static void CheckFoodPlatter (int x, int y, int type)
 
static void CheckGnome (int x, int j)
 
static void CheckGolf1x1 (int x, int y, int type)
 
static void CheckJunglePlant (int i, int j, int type)
 
static void CheckLilyPad (int x, int y)
 
static void CheckLogicTiles (int x, int y, int type)
 
static void CheckMan (int i, int j)
 
static void CheckMB (int i, int j, int type)
 
static void CheckOasisPlant (int i, int j, int type=530)
 
static void CheckOnTable1x1 (int x, int y, int type)
 
static void CheckOrb (int i, int j, int type)
 
static void CheckPalmTree (int i, int j)
 
static void CheckPile (int i, int y)
 
static void CheckPot (int i, int j, int type=28)
 
static void CheckProjectilePressurePad (int i, int j)
 
static void CheckRockGolemHead (int x, int y)
 
static void CheckRoom (int x, int y)
 
static void CheckSign (int x, int y, ushort type)
 
static bool CheckSpecialTownNPCSpawningConditions (int type)
 
static void CheckSunflower (int i, int j, int type=27)
 
static void CheckSuper (int x, int y, int type)
 
static void CheckTallGate (int x, int y, int type)
 
static void CheckTight (int x, int j)
 
static bool CheckTileAnchors (int sx, int sy, int w, int h, int mode, AnchorType anchor)
 
static int CheckTileBreakability (int x, int y)
 
static bool CheckTileBreakability2_ShouldTileSurvive (int x, int y)
 
static bool CheckTileFrames (int type, int sx, int sy, int w, int h, int styleX, int frameXinc, int styleY, int frameYinc)
 
static void CheckTorch (int x, int y)
 
static void CheckTrapDoor (int x, int y, int type)
 
static void CheckTree (int i, int j)
 
static void CheckTreeWithSettings (int x, int y, CheckTreeSettings settings)
 
static bool checkUnderground (int x, int y)
 
static void CheckUnderwaterPlant (ushort type, int x, int y)
 
static void CheckWeaponsRack (int i, int j)
 
static void CheckWoman (int i, int j)
 
static void CheckXmasTree (int x, int y)
 
static int checkXmasTreeDrop (int x, int y, int obj)
 
static bool Chlorophyte (int i, int j)
 
static void ClearAllBrokenTraps ()
 
static void ClearBrokenTraps (Point startTileCoords, List< Point > pointsWeAlreadyWentOver)
 
static void clearWorld ()
 
static bool CloseDoor (int i, int j, bool forced=false)
 
static void CloudIsland (int i, int j)
 
static void CloudLake (int i, int j)
 
static void ConsumePostGenActions (StructureMap structures)
 
static void Convert (int i, int j, int conversionType, int size=4)
 Allows easy conversion of eligible tiles to and from their variants for vanilla spreading biomes.
Please view the conversionType parameter's description for more details on what biomes are supported.
This method, by default, converts a 9x9 square. Please view the size parameter's description for info on how to adjust this behavior. More...
 
static int countDirtTiles (int x, int y)
 
static int CountNearBlocksTypes (int i, int j, int radius, int cap=0, params int[] tiletypes)
 
static void CountTiles (int X)
 
static int countTiles (int x, int y, bool jungle=false, bool lavaOk=false)
 
static void CountTileTypesInArea (int[] tileTypeCounts, int startX, int endX, int startY, int endY)
 
static int[] CountTileTypesInWorld (params int[] oreTypes)
 
static int countWires (int x, int y, int size)
 
static Task CreateNewWorld (GenerationProgress progress=null)
 
static void CrimEnt (Vector2 position, int crimDir)
 
static void CrimPlaceHearts ()
 
static void CrimStart (int i, int j)
 
static void CrimVein (Vector2 position, Vector2 velocity)
 
static bool DefaultTreeWallTest (int wallType)
 
static void DesertCloudIsland (int i, int j)
 
static void DestroyHeart (int i, int j)
 
static void DiamondTileFrame (int i, int j)
 
static Vector2 digTunnel (float X, float Y, float xDir, float yDir, int Steps, int Size, bool Wet=false)
 
static void DirtyRockRunner (int i, int j)
 
static void do_worldGenCallBack (object threadContext)
 
static void DontStarveTryWateringTile (int x, int y)
 
static void DropDoorItem (int x, int y, int doorStyle)
 
static void dropMeteor ()
 
static void dropXmasTree (int x, int y, int obj)
 
static void DungeonEnt (int i, int j, ushort tileType, int wallType)
 
static void DungeonHalls (int i, int j, ushort tileType, int wallType, bool forceX=false)
 
static bool DungeonPitTrap (int i, int j, ushort tileType, int wallType)
 
static void DungeonRoom (int i, int j, ushort tileType, int wallType)
 
static void DungeonStairs (int i, int j, ushort tileType, int wallType)
 
static bool EmptyLiquid (int x, int y)
 
static bool EmptyTileCheck (int startX, int endX, int startY, int endY, int ignoreID=-1)
 
static void EveryTileFrame ()
 
static void ExplodeMine (int i, int j, bool fromWiring)
 
static void FillWallHolesInArea (Rectangle worldCoordsArea)
 
static void FixChand (int i, int j)
 
static void FixChands ()
 
static void FixHeart (int i, int j)
 
static void FixHearts ()
 
static void FixSunflower (int i, int j)
 
static void FixSunflowers ()
 
static void FloatingIsland (int i, int j)
 
static void gemCave (int x, int y)
 
static bool GemTreeGroundTest (int tileType)
 
static bool GemTreeWallTest (int wallType)
 
static void GenerateWorld (int seed, GenerationProgress customProgressObject=null)
 
static void GERunner (int i, int j, float speedX=0f, float speedY=0f, bool good=true)
 
static void GetBiomeInfluence (int startX, int endX, int startY, int endY, out int corruptCount, out int crimsonCount, out int hallowedCount)
 
static bool GetCommonTreeFoliageData (int i, int j, int xoffset, ref int treeFrame, ref int treeStyle, out int floorY, out int topTextureFrameWidth, out int topTextureFrameHeight)
 
static bool GetGemTreeFoliageData (int i, int j, int xoffset, ref int treeFrame, ref int treeStyle, out int floorY, out int topTextureFrameWidth, out int topTextureFrameHeight)
 
static int GetHollowTreeFoliageStyle ()
 
static int GetItemDrop_Benches (int style)
 
static int GetItemDrop_Chair (int style)
 
static int GetItemDrop_PicnicTables (int style)
 
static int GetItemDrop_Toilet (int style)
 
static IEntitySource GetItemSource_FromTileBreak (int x, int y)
 
static IEntitySource GetItemSource_FromTreeShake (int x, int y)
 
static IEntitySource GetItemSource_FromWallBreak (int x, int y)
 
static int GetNextJungleChestItem ()
 
static void GetRidOfCultists ()
 
static int GetTileMossColor (int tileType)
 
static int GetTileTypeCountByCategory (int[] tileTypeCounts, TileScanGroup group)
 
static ? Rectangle GetTileVisualHitbox (int x, int y)
 
static Point GetTopLeftAndStyles (ref int x, ref int y, int w, int h, int frameXinc, int frameYinc)
 
static int GetTreeFrame (Tile t)
 
static void GetTreeLeaf (int x, Tile topTile, Tile t, ref int treeHeight, out int treeFrame, out int passStyle)
 
static TreeTypes GetTreeType (int tileType)
 
static bool GetVanityTreeFoliageData (int i, int j, int xoffset, ref int treeFrame, ref int treeStyle, out int floorY, out int topTextureFrameWidth, out int topTextureFrameHeight)
 
static double GetWorldUpdateRate ()
 
static void GrowAlch (int x, int y)
 
static void GrowCactus (int i, int j)
 
static void GrowCatTail (int x, int j)
 
static void GrowCheckSeaweed (int x, int y)
 
static bool GrowDungeonTree (int i, int j, bool patch=false)
 
static bool GrowEpicTree (int i, int y)
 
static bool GrowLivingTree (int i, int j, bool patch=false)
 
static bool GrowPalmTree (int i, int y)
 
static void GrowPumpkin (int i, int j, int type)
 
static bool GrowShroom (int i, int y)
 
static void GrowSpike (int i, int j, ushort spikeType, ushort landType)
 
static bool GrowTree (int i, int y)
 
static bool GrowTreeWithSettings (int checkedX, int checkedY, GrowTreeSettings settings)
 
static void GrowUndergroundTree (int i, int y)
 
static void hardUpdateWorld (int i, int j)
 
static bool HasAnyWireNearby (int sourceX, int sourceY, int boxSpread)
 
static void HellFort (int i, int j, ushort tileType=75, byte wallType=14)
 
static void HellHouse (int i, int j, byte type=76, byte wall=13)
 
static void HellRoom (int i, int j, int width, int height, byte type=76, byte wall=13)
 
static void Housing_GetTestedRoomBounds (out int startX, out int endX, out int startY, out int endY)
 
static bool InAPlaceWithWind (int x, int y, int width, int height)
 
static bool InAPlaceWithWind (Vector2 position, int width, int height)
 
static bool InWorld (int x, int y, int fluff=0)
 
static bool IsAContainer (Tile t)
 
static bool IsBackgroundConsideredTheSame (int oldBG, int newBG)
 
static bool IsChestRigged (int x, int y)
 
static bool IsFitToPlaceFlowerIn (int x, int y, int typeAttemptedToPlace)
 
static bool IsHarvestableHerbWithSeed (int type, int style)
 
static bool IsItATrap (Tile tile)
 
static bool IsItATrigger (Tile tile)
 
static void IslandHouse (int i, int j, int islandStyle)
 
static bool IsLockedDoor (int x, int y)
 
static bool IsLockedDoor (Tile t)
 
static bool IsNPCEvictable (int n)
 
static bool IsOpenDoorAnchorFrame (int x, int y)
 
static bool IsPalmOasisTree (int x)
 
static bool IsSafeFromRain (int startX, int startY)
 
static bool IsThereASpawnablePrioritizedTownNPC (int x, int y, ref bool canSpawnNewTownNPC)
 
static bool IsThereASpawnablePrioritizedTownNPC_Old (int x, int y)
 
static bool IsThisAMushroomTree (int i, int j)
 
static bool IsTileALeafyTreeTop (int i, int j)
 
static bool IsTileNearby (int x, int y, int type, int distance)
 
static bool IsTileReplacable (int x, int y)
 
static bool IsTileTypeFitForTree (ushort type)
 
static bool IsTreeType (int tree)
 
static void JustQuit ()
 
static void kickOut (int n)
 
static bool KillActuator (int i, int j)
 
static void KillTile (int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
 
static void KillTile_GetItemDrops (int x, int y, Tile tileCache, out int dropItem, out int dropItemStack, out int secondaryItem, out int secondaryItemStack, bool includeLargeObjectDrops=false)
 
static int KillTile_GetTileDustAmount (bool fail, Tile tileCache, int x, int y)
 
static int KillTile_MakeTileDust (int i, int j, Tile tileCache)
 
static void KillTile_PlaySounds (int i, int j, bool fail, Tile tileCache)
 
static void KillWall (int i, int j, bool fail=false)
 
static bool KillWire (int i, int j)
 
static bool KillWire2 (int i, int j)
 
static bool KillWire3 (int i, int j)
 
static bool KillWire4 (int i, int j)
 
static void Lakinater (int i, int j, float strengthMultiplier=1f)
 
static void LaunchRocket (int x, int y, bool fromWiring)
 
static void LaunchRocketSmall (int x, int y, bool fromWiring)
 
static bool LeftEdgeCanBeAttachedTo (int i, int j)
 
static void MakeDungeon (int x, int y)
 
static void makeTemple (int x, int y)
 
static void MakeWateryIceThing (int i, int j)
 
static bool MarblePileWithStatues (int X, int Y)
 
static bool mayanTrap (int x2, int y2)
 
static void MessageLunarApocalypse ()
 
static bool meteor (int i, int j, bool ignorePlayers=false)
 
static void MineHouse (int i, int j)
 
static void Mountinater (int i, int j)
 
static void moveRoom (int x, int y, int n)
 
static bool MoveTownNPC (int x, int y, int n)
 
static void MudWallRunner (int i, int j)
 
static bool NearFriendlyWall (int x, int y)
 
static bool nearPicture (int x, int y)
 
static bool nearPicture2 (int x, int y)
 
static void neonMossBiome (int i, int j, int maxY=99999)
 
static void nextCount (int x, int y, bool jungle=false, bool lavaOk=false)
 
static void nextDirtCount (int x, int y)
 
static void oceanCave (int i, int j)
 
static bool oceanDepths (int x, int y)
 
static bool OpenDoor (int i, int j, int direction)
 
static void OreHelper (int X, int Y)
 
static bool OrePatch (int X, int Y)
 
static void OreRunner (int i, int j, double strength, int steps, ushort type)
 
static void outerTempled (int x, int y)
 
static Color paintColor (int color)
 
static void paintEffect (int x, int y, byte color, byte oldColor)
 
static bool paintTile (int x, int y, byte color, bool broadCast=false)
 
static bool paintWall (int x, int y, byte color, bool broadCast=false)
 
static void Place1x1 (int x, int y, int type, int style=0)
 
static void Place1x2 (int x, int y, ushort type, int style)
 
static void Place1x2Top (int x, int y, ushort type, int style)
 
static void Place1xX (int x, int y, ushort type, int style=0)
 
static void Place2x1 (int x, int y, ushort type, int style=0)
 
static void Place2x2 (int x, int y, ushort type, int style)
 
static bool Place2x2Horizontal (int x, int y, ushort type, int Style=0)
 
static void Place2x2Style (int x, int y, ushort type, int style=0)
 
static void Place2x3Wall (int x, int y, ushort type, int style)
 
static void Place2xX (int x, int y, ushort type, int style=0)
 
static void Place3x1 (int x, int y, ushort type, int style=0)
 
static void Place3x2 (int x, int y, ushort type, int style=0)
 
static void Place3x2Wall (int x, int y, ushort type, int style)
 
static void Place3x3 (int x, int y, ushort type, int style=0)
 
static void Place3x3Wall (int x, int y, ushort type, int style)
 
static void Place3x4 (int x, int y, ushort type, int style)
 
static void Place4x2 (int x, int y, ushort type, int direction=-1, int style=0)
 
static void Place4x3Wall (int x, int y, ushort type, int style)
 
static void Place5x4 (int x, int y, ushort type, int style)
 
static void Place6x3 (int x, int y, ushort type, int direction=-1, int style=0)
 
static void Place6x4Wall (int x, int y, ushort type, int style)
 
static bool PlaceActuator (int i, int j)
 
static bool PlaceAlch (int x, int y, int style)
 
static void PlaceBanner (int x, int y, ushort type, int style=0)
 
static void PlaceCannon (int x, int y, ushort type, int style=0)
 
static Point PlaceCatTail (int x, int j)
 
static void PlaceChand (int x, int y, ushort type, int style=0)
 
static int PlaceChest (int x, int y, ushort type=21, bool notNearOtherChests=false, int style=0)
 
static void PlaceChestDirect (int x, int y, ushort type, int style, int id)
 
static bool PlaceDoor (int i, int j, int type, int style=0)
 
static void PlaceDresserDirect (int x, int y, ushort type, int style, int id)
 
static void PlaceDye (int x, int y, int style)
 
static void PlaceGnome (int x, int y, int style)
 
static void PlaceJunglePlant (int X2, int Y2, ushort type, int styleX, int styleY)
 
static bool placeLavaTrap (int x, int y)
 
static bool PlaceLilyPad (int x, int j)
 
static bool PlaceLiquid (int x, int y, byte liquidType, byte amount)
 
static void PlaceLogicTiles (int x, int y, int type, int style=0)
 
static void PlaceMan (int i, int j, int dir)
 
static void PlaceMB (int X, int y, ushort type, int style)
 
static bool PlaceOasis (int X, int Y)
 
static void PlaceOasisPlant (int X, int Y, ushort type=530)
 
static bool PlaceObject (int x, int y, int type, bool mute=false, int style=0, int alternate=0, int random=-1, int direction=-1)
 
static void PlaceOnTable1x1 (int x, int y, int type, int style=0)
 
static bool PlacePot (int x, int y, ushort type=28, int style=0)
 
static void PlacePumpkin (int x, int superY)
 
static bool PlaceSandTrap (int i, int j)
 
static bool PlaceSign (int x, int y, ushort type, int Style=0)
 
static bool PlaceSmallPile (int i, int j, int X, int Y, ushort type=185)
 
static void PlaceStatueTrap (int x, int y)
 
static void PlaceSunflower (int x, int y, ushort type=27)
 
static void PlaceTight (int x, int y, bool spiders=false)
 
static bool PlaceTile (int i, int j, int Type, bool mute=false, bool forced=false, int plr=-1, int style=0)
 
static bool placeTrap (int x2, int y2, int type=-1)
 
static void PlaceUncheckedStalactite (int x, int y, bool preferSmall, int variation, bool spiders)
 
static void PlaceUnderwaterPlant (ushort type, int x, int y)
 
static void PlaceWall (int i, int j, int type, bool mute=false)
 
static bool PlaceWire (int i, int j)
 
static bool PlaceWire2 (int i, int j)
 
static bool PlaceWire3 (int i, int j)
 
static bool PlaceWire4 (int i, int j)
 
static void PlaceWoman (int i, int j, int dir)
 
static void PlaceXmasTree (int x, int y, ushort type=171)
 
static int PlaceXmasTree_Direct (int x, int y, int type, int style, int dir, int alternate)
 
static void PlantAlch ()
 
static void PlantCactus (int i, int j)
 
static void PlantCheck (int x, int y)
 
static void plantDye (int i, int j, bool exoticPlant=false)
 
static int PlatformProperSides (int x, int y, bool acceptNonOpposing=false)
 
static bool PlatformProperTopFrame (short frameX)
 
static bool PlayerLOS (int x, int y)
 
static void playWorld ()
 
static void playWorldCallBack (object threadContext)
 
static void PoundPlatform (int x, int y)
 
static bool PoundTile (int i, int j)
 
static bool Pyramid (int i, int j)
 
static void QueuePostGenAction (Action< StructureMap > action)
 
static void QuickFindHome (int npc)
 
static Vector2 randBoneTile ()
 
static int randGem ()
 
static ushort randGemTile ()
 
static Vector2 randHellPicture ()
 
static Vector2 randHousePicture ()
 
static Vector2 RandHousePictureDesert ()
 
static void randMoss ()
 
static void RandomizeBackgroundBasedOnPlayer (UnifiedRandom random, Player player)
 
static void RandomizeBackgrounds (UnifiedRandom random)
 
static void RandomizeCaveBackgrounds ()
 
static void RandomizeMoonState ()
 
static void RandomizeTreeStyle ()
 
static void RandomizeWeather ()
 
static Point RandomRectanglePoint (int x, int y, int width, int height)
 
static Point RandomRectanglePoint (Rectangle rectangle)
 
static Point RandomWorldPoint (int padding)
 
static Point RandomWorldPoint (int top=0, int right=0, int bottom=0, int left=0)
 
static Vector2 randPictureTile ()
 
static void RangeFrame (int startX, int startY, int endX, int endY)
 
static void RenameWorld (WorldFileData data, string newName, Action< string > callback=null)
 
static void RenameWorldCallBack (object threadContext)
 
static bool ReplaceTile (int x, int y, ushort targetType, int targetStyle)
 
static bool ReplaceWall (int x, int y, ushort targetWall)
 
static bool RightEdgeCanBeAttachedTo (int i, int j)
 
static bool RoomNeeds (int npcType)
 
static void saveAndPlay ()
 
static void saveAndPlayCallBack (object threadContext)
 
static void SaveAndQuit (Action callback=null)
 
static void SaveAndQuitCallBack (object threadContext)
 
static void saveToonWhilePlaying ()
 
static void saveToonWhilePlayingCallBack (object threadContext)
 
static void ScoreRoom (int ignoreNPC=-1, int npcTypeAskingToScoreRoom=-1)
 
static void SectionTileFrame (int startX, int startY, int endX, int endY)
 
static void SectionTileFrameWithCheck (int startX, int startY, int endX, int endY)
 
static Task serverLoadWorld ()
 
static void serverLoadWorldCallBack ()
 
static void setBG (int bg, int style)
 
static void setMoss (int x, int y)
 
static void SetupStatueList ()
 
static void setWorldSize ()
 
static void setXmasTree (int x, int y, int obj, int style)
 
static bool ShellPile (int X, int Y)
 
static bool ShiftTallGate (int x, int y, bool closing, bool forced=false)
 
static bool ShiftTrapdoor (int x, int y, bool playerAbove, int onlyCloseOrOpen=-1)
 
static void ShootFromCannon (int x, int y, int angle, int ammo, int Damage, float KnockBack, int owner, bool fromWire)
 
static void ShroomPatch (int i, int j)
 
static bool SlopeTile (int i, int j, int slope=0, bool noEffects=false)
 
static void SmashAltar (int i, int j)
 
static void smCallBack (object threadContext)
 
static void SnowCloudIsland (int i, int j)
 
static bool SolidOrSlopedTile (int x, int y)
 
static bool SolidOrSlopedTile (Tile tile)
 
static bool SolidTile (int i, int j, bool noDoors=false)
 
static bool SolidTile (Point p)
 
static bool SolidTile (Tile testTile)
 
static bool SolidTile2 (int i, int j)
 
static bool SolidTile2 (Tile testTile)
 
static bool SolidTile3 (int i, int j)
 
static bool SolidTile3 (Tile t)
 
static bool SolidTileAllowBottomSlope (int i, int j)
 
static bool SolidTileAllowTopSlope (int i, int j)
 
static bool SolidTileNoAttach (int i, int j)
 
static void SonOfLakinater (int i, int j, float strengthMultiplier=1f)
 
static TownNPCSpawnResult SpawnTownNPC (int x, int y)
 
static void SpawnTravelNPC ()
 
static void SpreadDesertWalls (int wallDist, int i, int j)
 
static void SpreadGrass (int i, int j, int dirt=0, int grass=2, bool repeat=true, byte color=0)
 
static void SquareTileFrame (int i, int j, bool resetFrame=true)
 
static void SquareWallFrame (int i, int j, bool resetFrame=true)
 
static void StartHardmode ()
 
static void StartImpendingDoom ()
 
static bool StartRoomCheck (int x, int y)
 
static bool Statue (int x, int y, byte paint)
 
static bool StonePatch (int X, int Y)
 
static void SwitchCannon (int i, int j)
 
static void SwitchFountain (int i, int j)
 
static void SwitchMB (int i, int j)
 
static void SwitchMonolith (int i, int j)
 
static void templeCleaner (int x, int y)
 
static void templePart2 ()
 
static Vector2 templePather (Vector2 templePath, int destX, int destY)
 
static void tileCountAndDestroy ()
 
static int tileCounter (int x, int y)
 
static void tileCounterKill ()
 
static void tileCounterNext (int x, int y)
 
static bool TileEmpty (int i, int j)
 
static void TileFrame (int i, int j, bool resetFrame=false, bool noBreak=false)
 
static void TileMergeAttempt (int myType, bool[] lookfor, bool[] exclude, ref int up, ref int down, ref int left, ref int right, ref int upLeft, ref int upRight, ref int downLeft, ref int downRight)
 
static void TileMergeAttempt (int myType, bool[] lookfor, ref int up, ref int down, ref int left, ref int right, ref int upLeft, ref int upRight, ref int downLeft, ref int downRight)
 
static void TileMergeAttempt (int myType, int lookfor, ref int up, ref int down, ref int left, ref int right)
 
static void TileMergeAttempt (int myType, int lookfor, ref int up, ref int down, ref int left, ref int right, ref int upLeft, ref int upRight, ref int downLeft, ref int downRight)
 
static void TileMergeAttemptFrametest (int i, int j, int myType, bool[] lookfor, ref int up, ref int down, ref int left, ref int right, ref int upLeft, ref int upRight, ref int downLeft, ref int downRight)
 
static void TileMergeAttemptFrametest (int i, int j, int myType, int lookfor, ref int up, ref int down, ref int left, ref int right, ref int upLeft, ref int upRight, ref int downLeft, ref int downRight)
 
static void TileMergeAttemptWeird (int myType, int changeTo, bool[] exclude, ref int up, ref int down, ref int left, ref int right, ref int upLeft, ref int upRight, ref int downLeft, ref int downRight)
 
static void TileRunner (int i, int j, double strength, int steps, int type, bool addTile=false, float speedX=0f, float speedY=0f, bool noYChange=false, bool overRide=true, int ignoreTileType=-1)
 
static int TileType (int x, int y)
 
static void ToggleGemLock (int i, int j, bool on)
 
static bool TopEdgeCanBeAttachedTo (int i, int j)
 
static void TreeGrowFX (int x, int y, int height, int treeGore, bool hitTree=false)
 
static void TreeGrowFXCheck (int x, int y)
 
static void TriggerLunarApocalypse ()
 
static bool TryGrowingTreeByType (int treeTileType, int checkedX, int checkedY)
 
static bool TryToggleLight (int x, int y, bool? forcedState, bool skipWires)
 
static void UnlockDoor (int i, int j)
 
static void UnspawnTravelNPC ()
 
static void UpdateDesertHiveBounds (int x, int y)
 
static void UpdateLunarApocalypse ()
 
static bool UpdateMapTile (int i, int j, bool addToList=true)
 
static bool UpdateStalagtiteStyle (int x, int j)
 
static void UpdateWorld ()
 
static bool VanityTreeGroundTest (int tileType)
 
static void WaterCheck ()
 
static void WavyCaverer (int startX, int startY, float waveStrengthScalar, float wavePercentScalar, int steps, int type)
 
static bool WillWaterPlacedHereStayPut (int x, int y)
 
static void worldGenCallback (object threadContext)
 
static bool WouldTileReplacementBeBlockedByLiquid (int x, int y, int liquidType)
 
static bool WouldTileReplacementWork (ushort attemptingToReplaceWith, int x, int y)
 

Static Public Attributes

static UnifiedRandom _genRand
 
static int _genRandSeed = -2
 
static int _lastSeed
 
static bool AllowedToSpreadInfections = true
 
static int altarCount
 
static BackgroundChangeFlashInfo BackgroundsCache = new BackgroundChangeFlashInfo()
 
static int beachBordersWidth
 
static int beachDistance = 380
 
static int beachSandDungeonExtraWidth
 
static int beachSandJungleExtraWidth
 
static int beachSandRandomCenter
 
static int beachSandRandomWidthRange
 
static int bestX
 
static int bestY
 
const bool BUBBLES_SOLID_STATE_FOR_HOUSING = true
 
static int cactusWaterHeight = 25
 
static int cactusWaterLimit = 25
 
static int cactusWaterWidth = 50
 
static bool canSpawn
 
static int catTailDistance = 8
 
static WorldGenConfiguration configuration
 
static int copper
 
static int copperBar = 20
 
static int corruptBG
 
static Dictionary< Point, bool > CountedTiles = new Dictionary<Point, bool>(maxTileCount)
 
static ushort crackedType = 481
 
static bool crimson
 
static int crimsonBG
 
static bool currentlyTryingToUseAlternateHousingSpot
 
static string currentWorldSeed
 
static int[] DDoorPos = new int[500]
 
static int[] DDoorX = new int[500]
 
static int[] DDoorY = new int[500]
 
static int dEnteranceX
 
static int desertBG
 
static int desertHiveHigh = 0
 
static int desertHiveLeft = 0
 
static int desertHiveLow = 0
 
static int desertHiveRight = 0
 
static bool destroyObject
 
static int dMaxX
 
static int dMaxY
 
static int dMinX
 
static int dMinY
 
static bool dontStarveWorldGen = false
 
static int[] dRoomB = new int[maxDRooms]
 
static int[] dRoomL = new int[maxDRooms]
 
static int[] dRoomR = new int[maxDRooms]
 
static int[] dRoomSize = new int[maxDRooms]
 
static int[] dRoomT = new int[maxDRooms]
 
static bool[] dRoomTreasure = new bool[maxDRooms]
 
static int[] dRoomX = new int[maxDRooms]
 
static int[] dRoomY = new int[maxDRooms]
 
static bool drunkWorldGen = false
 
static bool drunkWorldGenText = false
 
static bool dSurface
 
static float dub2 = 0f
 
static bool dungeonLake = false
 
static int dungeonLocation
 
static int[] dungeonPlatformX = new int[500]
 
static int[] dungeonPlatformY = new int[500]
 
static int dungeonSide
 
static int dungeonX
 
static int dungeonY
 
static double dxStrength1
 
static double dxStrength2
 
static double dyStrength1
 
static double dyStrength2
 
static int evilBiomeAvoidanceMidFixer
 
static int evilBiomeBeachAvoidance
 
static Queue< Point > ExploitDestroyQueue = new Queue<Point>()
 
static int[] floatingIslandHouseX = new int[30]
 
static int[] floatingIslandHouseY = new int[30]
 
static int[] floatingIslandStyle = new int[30]
 
static bool fossilBreak = false
 
static bool[] gem = new bool[6]
 
static volatile bool gen
 
static bool generatedShadowKey
 
static bool generatingWorld = false
 
static bool getGoodWorldGen = false
 
static int gold
 
static int goldBar = 19
 
static int grassSpread
 
static int hallowBG
 
static int heartCount
 
static Vector2[] heartPos = new Vector2[100]
 
static int hellChest
 
static int[] hellChestItem = new int[7]
 
static int hiScore
 
static int houseCount
 
static bool[] houseTile = new bool[625]
 
static int howFar
 
static int iceCount
 
static int iron
 
static int ironBar = 22
 
static bool IsGeneratingHardMode
 
static int[] JChestX = new int[100]
 
static int[] JChestY = new int[100]
 
static int jungleBG
 
static ushort jungleHut
 
static int JungleItemCount
 
static int jungleMaxX
 
static int jungleMinX
 
static int jungleOriginX
 
static int JungleX
 
static int lakesBeachAvoidance
 
static int[] LakeX = new int[maxLakes]
 
static int lAltarX
 
static int lAltarY
 
static int[] larvaX = new int[100]
 
static int[] larvaY = new int[100]
 
static Vector2 lastDungeonHall = Vector2.Zero
 
static int lastMaxTilesX
 
static int lastMaxTilesY
 
static int lavaCount
 
static int lavaLine
 
static int leftBeachEnd
 
static bool loadBackup = false
 
static bool loadFailed = false
 
static bool loadSuccess = false
 
static int logX
 
static int logY
 
static int maxDRooms = 100
 
static int maxLakes = 50
 
static int maxMushroomBiomes = 50
 
static int maxOasis = 20
 
static int maxOceanCaveTreasure = 2
 
static int maxOrePatch = 50
 
static int maxRoomTiles = 750
 
static int maxTileCount = 3500
 
static int maxTreeShakes = 500
 
static int maxTunnels = 50
 
static int maxWallOut2 = 5000
 
static int[] mCaveX = new int[30]
 
static int[] mCaveY = new int[30]
 
static bool mergeDown
 
static bool mergeLeft
 
static bool mergeRight
 
static bool mergeUp
 
static int minSsandBeforeWater
 
static ushort mossTile = 179
 
static int[] mossType = new int[3]
 
static ushort mossWall = 54
 
static bool mudWall
 
static int mushroomBG
 
static Vector2[] mushroomBiomesPosition = new Vector2[maxMushroomBiomes]
 
static MysticLogFairiesEvent mysticLogsEvent = new MysticLogFairiesEvent()
 
static ushort neonMossType
 
static bool noLiquidCheck
 
static bool noMapUpdate
 
static bool noTileActions
 
static bool notTheBees = false
 
static int numDDoors
 
static int numDRooms
 
static int numDungeonPlatforms
 
static int numIslandHouses
 
static int numJChests
 
static int numLakes = 0
 
static int numLarva
 
static int numMCaves
 
static int numMushroomBiomes = 0
 
static int numOasis = 0
 
static int numOceanCaveTreasure = 0
 
static int numOrePatch
 
static int numPyr
 
static int numRoomTiles
 
static int numTileCount
 
static int numTreeShakes = 0
 
static int numTunnels
 
static int oasisHeight = 20
 
static Vector2[] oasisPosition = new Vector2[maxOasis]
 
static int[] oasisWidth = new int[maxOasis]
 
static int oceanBG
 
static Point[] oceanCaveTreasure = new Point[maxOceanCaveTreasure]
 
static int oceanDistance = 250
 
static int oceanWaterForcedJungleLength
 
static int oceanWaterStartRandomMax
 
static int oceanWaterStartRandomMin
 
static int[] orePatchX = new int[maxOrePatch]
 
static bool placingTraps = false
 
static int prioritizedTownNPCType
 
static int[] PyrX
 
static int[] PyrY
 
static int rightBeachStart
 
static int rockCount
 
static double rockLayer
 
static double rockLayerHigh
 
static double rockLayerLow
 
static int roomCeilingsCount
 
static int[] roomCeilingX = new int[maxRoomTiles]
 
static int[] roomCeilingY = new int[maxRoomTiles]
 
static bool roomChair
 
static TownNPCRoomCheckFailureReason roomCheckFailureReason = TownNPCRoomCheckFailureReason.None
 
static bool roomDoor
 
static bool roomEvil
 
static bool roomOccupied
 
static bool roomTable
 
static bool roomTorch
 
static int[] roomX = new int[maxRoomTiles]
 
static int roomX1
 
static int roomX2
 
static int[] roomY = new int[maxRoomTiles]
 
static int roomY1
 
static int roomY2
 
static int shadowOrbCount
 
static bool shadowOrbSmashed
 
static int sharedRoomX
 
static int shellStartXLeft
 
static int shellStartXRight
 
static int shellStartYLeft
 
static int shellStartYRight
 
static int shroomCount
 
static int silver
 
static int silverBar = 21
 
static bool skipDesertTileCheck = false
 
static bool skipFramingDuringGen = false
 
static bool[] skyLake = new bool[30]
 
static int skyLakes
 
static int SmallConsecutivesEliminated = 0
 
static int SmallConsecutivesFound = 0
 
static int smallHolesBeachAvoidance
 
static int snowBG
 
static int snowBottom
 
static int[] snowMaxX
 
static int[] snowMinX
 
static int snowOriginLeft
 
static int snowOriginRight
 
static int snowTop
 
static int spawnDelay
 
static bool spawnEye
 
static int spawnHardBoss
 
static bool spawnMeteor
 
static Point16[] statueList
 
static List< int > StatuesWithTraps
 
static string statusText = ""
 
static bool stopDrops
 
static StructureMap structures
 
static int surfaceCavesBeachAvoidance2
 
static byte tBlood
 
static int tBottom
 
static bool tenthAnniversaryWorldGen = false
 
static byte tEvil
 
static byte tGood
 
static int tileCounterMax = 20
 
static int tileCounterNum
 
static int[] tileCounterX = new int[tileCounterMax]
 
static int[] tileCounterY = new int[tileCounterMax]
 
static int[] tileCounts = new int[625]
 
static int tileReframeCount
 
static int tLeft
 
static int totalBlood
 
static int totalBlood2
 
static int totalD
 
static int totalEvil
 
static int totalEvil2
 
static int totalGood
 
static int totalGood2
 
static int totalSolid
 
static int totalSolid2
 
static int totalX
 
static TownRoomManager TownManager = new TownRoomManager()
 
static int[,] trapDiag = new int[4, 2]
 
static int treeBG1
 
static int treeBG2
 
static int treeBG3
 
static int treeBG4
 
static int[] treeShakeX = new int[maxTreeShakes]
 
static int[] treeShakeY = new int[maxTreeShakes]
 
static TreeTopsInfo TreeTops = new TreeTopsInfo()
 
static int tRight
 
static int tRooms
 
static int tTop
 
static int[] tunnelX = new int[maxTunnels]
 
static Rectangle UndergroundDesertHiveLocation = Rectangle.Empty
 
static Rectangle UndergroundDesertLocation = Rectangle.Empty
 
static int underworldBG
 
const bool USE_FRAMING_SKIP_FOR_UNIMPORTANT_TILES_IN_WORLDGEN = false
 
static int waterLine
 
static bool worldBackup
 
static bool worldCleared
 
static int WorldGenParam_Evil = -1
 
static double worldSurface
 
static double worldSurfaceHigh
 
static double worldSurfaceLow
 

Properties

static UnifiedRandom genRand [get]
 
static double oceanLevel [get]
 
static bool SkipFramingBecauseOfGen [get]
 

Member Function Documentation

◆ Convert()

static void Terraria.WorldGen.Convert ( int  i,
int  j,
int  conversionType,
int  size = 4 
)
static

Allows easy conversion of eligible tiles to and from their variants for vanilla spreading biomes.
Please view the conversionType parameter's description for more details on what biomes are supported.
This method, by default, converts a 9x9 square. Please view the size parameter's description for info on how to adjust this behavior.

For an easily-viewable example of the method's usage, you may refer to the code for projectile AI style 31 (the AI style used for the Clentaminator's solutions).

The following tile and wall types can be converted by this method.

For Corruption, Crimson, and Hallow conversions:

  • Grass (+ wall)
  • Stone (+ wall, also clears moss on stone tiles)
  • Ice
  • Sand
  • Hardened Sand (+ wall)
  • Sandstone (+ wall)
  • Various cave wall types, which will not be listed off individually on account of there simply being too goddamn many of them

    For Corruption and Crimson conversions specifically, thorns, should they exist, will be converted to their evil counterparts
    For Hallow conversions specifically:
  • Thorns are removed entirely
  • Conversion of grass tiles can also safely convert mowed grass

    For Mushroom biome conversions:
  • Jungle Grass (+ wall)
  • Mud Wall
  • Thorns are removed entirely

    "Cleansing" conversions (conversion type 0) affect all listed tile and wall types.
Parameters
iThe X coordinate of the target tile.
jThe Y coordinate of the target tile.
conversionTypeDenotes the biome that you wish to convert to. The following biomes are supported:
1 => The Corruption.
2 => The Hallow.
3 => Mushroom biome.
4 => The Crimson.
Setting this to 0 returns affected tiles to their default states (e.g. Ebonstone, Crimstone, and Pearlstone will be converted back into normal Stone Blocks).
sizeWhen using this method to convert tiles, a square centered on the target tile is converted into those of the target biome.
This optional parameter, which defaults to 4, determines the "radius" of that square in tiles, counting outward from the central tile.
Set to 0 if you only want to convert a single tile. In other cases, use this parameter wisely.

Member Data Documentation

◆ StatuesWithTraps

List<int> Terraria.WorldGen.StatuesWithTraps
static
Initial value:
= new List<int>(new int[4] {
4,
7,
10,
18
})