tModLoader v2022.09
A mod to make and play Terraria mods
Terraria.ModLoader.ModCactus Class Referenceabstract

This class represents a type of modded cactus. This class encapsulates a function for retrieving the cactus's texture and an array for type of soil it grows on. More...

Inherits Terraria.ModLoader.IPlant.

Public Member Functions

abstract Asset< Texture2D > GetFruitTexture ()
 
abstract Asset< Texture2D > GetTexture ()
 
abstract void SetStaticDefaults ()
 
- Public Member Functions inherited from Terraria.ModLoader.IPlant
abstract Asset< Texture2D > GetTexture ()
 
void ILoadable. Load (Mod mod)
 Called when loading the type. More...
 
abstract void SetStaticDefaults ()
 
void ILoadable. Unload ()
 Called during unloading when needed. More...
 
- Public Member Functions inherited from Terraria.ModLoader.ILoadable
virtual bool IsLoadingEnabled (Mod mod)
 Whether or not this type should be loaded when it's told to. Returning false disables Mod.AddContent from actually loading this type. More...
 
abstract void Load (Mod mod)
 Called when loading the type. More...
 
abstract void Unload ()
 Called during unloading when needed. More...
 

Properties

int[] GrowsOnTileId [get, set]
 
int PlantTileId [get]
 The cactus will share a tile ID with the vanilla cacti (80), so that the cacti can freely convert between each other if the sand below is converted. More...
 
int VanillaCount [get]
 
- Properties inherited from Terraria.ModLoader.IPlant
int[] GrowsOnTileId [get, set]
 
int PlantTileId [get]
 
int VanillaCount [get]
 

Detailed Description

This class represents a type of modded cactus. This class encapsulates a function for retrieving the cactus's texture and an array for type of soil it grows on.

Member Function Documentation

◆ GetTexture()

abstract Asset< Texture2D > Terraria.ModLoader.ModCactus.GetTexture ( )
pure virtual

◆ SetStaticDefaults()

abstract void Terraria.ModLoader.ModCactus.SetStaticDefaults ( )
pure virtual

Property Documentation

◆ GrowsOnTileId

int [] Terraria.ModLoader.ModCactus.GrowsOnTileId
getset

◆ PlantTileId

int Terraria.ModLoader.ModCactus.PlantTileId
get

The cactus will share a tile ID with the vanilla cacti (80), so that the cacti can freely convert between each other if the sand below is converted.

Implements Terraria.ModLoader.IPlant.

◆ VanillaCount

int Terraria.ModLoader.ModCactus.VanillaCount
get