ModTileEntity
Tile Entities are Entities tightly coupled with tiles, allowing the possibility of tiles to exhibit cool behavior. TileEntitry.Update is called in SP and on Server, not on Clients.
Methods
- GetTileEntity(System.Int32)()
- Gets the base ModTileEntity object with the given type.
- CountInWorld()
- Returns the number of modded tile entities that exist in the world currently being played.
- Initialize()
- You should never use this. It is only included here for completion's sake.
- NetPlaceEntity(System.Int32,System.Int32,System.Int32)()
- You should never use this. It is only included here for completion's sake.
- ConstructFromType(System.Int32)()
- Returns a new ModTileEntity with the same class, mod, name, and type as the ModTileEntity with the given type. It is very rare that you should have to use this.
- ConstructFromBase(Terraria.ModLoader.ModTileEntity)()
- Returns a new ModTileEntity with the same class, mod, name, and type as the parameter. It is very rare that you should have to use this.
- Place(System.Int32,System.Int32)()
- A helper method that places this kind of tile entity in the given coordinates for you.
- Kill(System.Int32,System.Int32)()
- A helper method that removes this kind of tile entity from the given coordinates for you.
- Find(System.Int32,System.Int32)()
- Returns the entity ID of this kind of tile entity at the given coordinates for you.
- WriteExtraData(System.IO.BinaryWriter,System.Boolean)()
- Don't use this. It is included only for completion's sake.
- ReadExtraData(System.IO.BinaryReader,System.Boolean)()
- Don't use this. It is included only for completion's sake.
- Autoload(System.String@)()
- Allows you to automatically load a tile entity instead of using Mod.AddTileEntity. Return true to allow autoloading; by default returns the mod's autoload property. Name is initialized to the overriding class name. Use this method to either force or stop an autoload, or change the default display name.
- Save()
- Allows you to save custom data for this tile entity.
- Load(Terraria.ModLoader.IO.TagCompound)()
- Allows you to load the custom data you have saved for this tile entity.
- NetSend(System.IO.BinaryWriter,System.Boolean)()
- Allows you to send custom data for this tile entity between client and server. This is called on the server while sending tile data (!lightSend) and when a MessageID.TileEntitySharing message is sent (lightSend)
- NetReceive(System.IO.BinaryReader,System.Boolean)()
- Receives the data sent in the NetSend hook. Called on MP Client when receiving tile data (!lightReceive) and when a MessageID.TileEntitySharing message is sent (lightReceive)
- ValidTile(System.Int32,System.Int32)()
- Whether or not this tile entity is allowed to survive at the given coordinates. You should check whether the tile is active, as well as the tile's type and frame.
- Hook_AfterPlacement(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)()
- This method does not get called by tModLoader, and is only included for you convenience so you do not have to cast the result of Mod.GetTileEntity.
- OnNetPlace()
- Code that should be run when this tile entity is placed by means of server-syncing. Called on Server only.
- PreGlobalUpdate()
- Code that should be run before all tile entities in the world update.
- PostGlobalUpdate()
- Code that should be run after all tile entities in the world update.
- OnKill()
- This method only gets called in the Kill method. If you plan to use that, you can put code here to make things happen when it is called.