1using System.Collections.Generic;
4using Terraria.World.Generation;
32 public virtual bool Autoload(ref
string name) {
Mod is an abstract class that you will override. It serves as a central place from which the mod's co...
A ModWorld instance represents an extension of a World. You can store fields in the ModWorld classes ...
virtual void ChooseWaterStyle(ref int style)
Allows you to change the water style (determines water color) that is currently being used.
string Name
The name of this ModWorld. Used for distinguishing between multiple ModWorlds added by a single Mod.
virtual void Load(TagCompound tag)
Allows you to load custom data you have saved for this world.
Mod mod
The mod that added this type of ModWorld.
virtual void NetSend(BinaryWriter writer)
Allows you to send custom data between clients and server. This is useful for syncing information suc...
virtual void TileCountsAvailable(int[] tileCounts)
Allows you to store information about how many of each tile is nearby the player. This is useful for ...
virtual void ModifyWorldGenTasks(List< GenPass > tasks, ref float totalWeight)
A more advanced option to PostWorldGen, this method allows you modify the list of Generation Passes b...
virtual void PostWorldGen()
Use this method to place tiles in the world after world generation is complete.
virtual void PostUpdate()
Use this method to have things happen in the world. In vanilla Terraria, a good example of code suita...
virtual void PreWorldGen()
Allows a mod to run code before a world is generated.
virtual void ResetNearbyTileEffects()
Use this to reset any fields you set in any of your ModTile.NearbyEffects hooks back to their default...
virtual void NetReceive(BinaryReader reader)
Allows you to do things with custom data that is received between clients and server.
virtual void PostDrawTiles()
Called after drawing Tiles. Can be used for drawing a tile overlay akin to wires. Note that spritebat...
virtual void PreUpdate()
Use this method to have things happen in the world. In vanilla Terraria, a good example of code suita...
virtual void ModifyHardmodeTasks(List< GenPass > list)
Similar to ModifyWorldGenTasks, but occurs in-game when Hardmode starts. Can be used to modify which ...
virtual bool Autoload(ref string name)
Allows you to automatically add a ModWorld instead of using Mod.AddModWorld. Return true to allow aut...
virtual void Initialize()
Called whenever the world is loaded. This can be used to initialize data structures,...
virtual void LoadLegacy(BinaryReader reader)
Allows you to load pre-v0.9 custom data you have saved for this world.
virtual TagCompound Save()
Allows you to save custom data for this world. Useful for things like saving world specific flags....
bool Autoload
Whether or not this mod will autoload content by default. Autoloading content means you do not need t...