tModLoader v0.11.8.9
A mod to make and play Terraria mods
Terraria.ModLoader.ModPalmTree Class Referenceabstract

This class represents a type of modded palm tree. The palm tree will share a tile ID with the vanilla palm trees (323), so that the trees can freely convert between each other if the sand below is converted. This class encapsulates several functions that distinguish each type of palm tree from each other. Use ModTile.SetModPalmTree or GlobalTile.AddModPalmTree to make a tile able to grow this kind of palm tree. More...

Public Member Functions

virtual int CreateDust ()
 Return the type of dust created when this palm tree is destroyed. Returns 215 by default. More...
 
abstract int DropWood ()
 The ID of the item that is dropped in bulk when this palm tree is destroyed. More...
 
abstract Texture2D GetTexture ()
 Return the texture that represents the tile sheet used for drawing this palm tree. More...
 
abstract Texture2D GetTopTextures ()
 Return the texture containing the possible tree tops that can be drawn above this palm tree. More...
 
virtual int GrowthFXGore ()
 Return the type of gore created to represent leaves when this palm tree grows on-screen. Returns -1 by default. More...
 

Detailed Description

This class represents a type of modded palm tree. The palm tree will share a tile ID with the vanilla palm trees (323), so that the trees can freely convert between each other if the sand below is converted. This class encapsulates several functions that distinguish each type of palm tree from each other. Use ModTile.SetModPalmTree or GlobalTile.AddModPalmTree to make a tile able to grow this kind of palm tree.

Definition at line 74 of file ConvertiblePlants.cs.

Member Function Documentation

◆ CreateDust()

virtual int Terraria.ModLoader.ModPalmTree.CreateDust ( )
virtual

Return the type of dust created when this palm tree is destroyed. Returns 215 by default.

Returns

Definition at line 80 of file ConvertiblePlants.cs.

80 {
81 return 215;
82 }

◆ DropWood()

abstract int Terraria.ModLoader.ModPalmTree.DropWood ( )
pure virtual

The ID of the item that is dropped in bulk when this palm tree is destroyed.

Returns

◆ GetTexture()

abstract Texture2D Terraria.ModLoader.ModPalmTree.GetTexture ( )
pure virtual

Return the texture that represents the tile sheet used for drawing this palm tree.

Returns

◆ GetTopTextures()

abstract Texture2D Terraria.ModLoader.ModPalmTree.GetTopTextures ( )
pure virtual

Return the texture containing the possible tree tops that can be drawn above this palm tree.

Returns

◆ GrowthFXGore()

virtual int Terraria.ModLoader.ModPalmTree.GrowthFXGore ( )
virtual

Return the type of gore created to represent leaves when this palm tree grows on-screen. Returns -1 by default.

Returns

Definition at line 88 of file ConvertiblePlants.cs.

88 {
89 return -1;
90 }