tModLoader v0.11.8.9
A mod to make and play Terraria mods
ConvertiblePlants.cs
Go to the documentation of this file.
1using Microsoft.Xna.Framework.Graphics;
2
3namespace Terraria.ModLoader
4{
8 public abstract class ModTree
9 {
14 public virtual int CreateDust() {
15 return 7;
16 }
17
22 public virtual int GrowthFXGore() {
23 return -1;
24 }
25
30 public virtual bool CanDropAcorn() {
31 return true;
32 }
33
38 public abstract int DropWood();
39
44 public abstract Texture2D GetTexture();
45
57 public abstract Texture2D GetTopTextures(int i, int j, ref int frame, ref int frameWidth, ref int frameHeight,
58 ref int xOffsetLeft, ref int yOffset);
59
68 public abstract Texture2D GetBranchTextures(int i, int j, int trunkOffset, ref int frame);
69 }
70
74 public abstract class ModPalmTree
75 {
80 public virtual int CreateDust() {
81 return 215;
82 }
83
88 public virtual int GrowthFXGore() {
89 return -1;
90 }
91
96 public abstract int DropWood();
97
102 public abstract Texture2D GetTexture();
103
108 public abstract Texture2D GetTopTextures();
109 }
110
114 public abstract class ModCactus
115 {
120 public abstract Texture2D GetTexture();
121 }
122}
This class represents a type of modded cactus. The cactus will share a tile ID with the vanilla cacti...
abstract Texture2D GetTexture()
Return the texture that represents the tile sheet used for drawing this cactus.
This class represents a type of modded palm tree. The palm tree will share a tile ID with the vanilla...
abstract Texture2D GetTexture()
Return the texture that represents the tile sheet used for drawing this palm tree.
abstract int DropWood()
The ID of the item that is dropped in bulk when this palm tree is destroyed.
abstract Texture2D GetTopTextures()
Return the texture containing the possible tree tops that can be drawn above this palm tree.
virtual int GrowthFXGore()
Return the type of gore created to represent leaves when this palm tree grows on-screen....
virtual int CreateDust()
Return the type of dust created when this palm tree is destroyed. Returns 215 by default.
This class represents a type of modded tree. The tree will share a tile ID with the vanilla trees (5)...
virtual int CreateDust()
Return the type of dust created when this tree is destroyed. Returns 7 by default.
abstract int DropWood()
The ID of the item that is dropped in bulk when this tree is destroyed.
virtual bool CanDropAcorn()
Whether or not this tree can drop acorns. Returns true by default.
abstract Texture2D GetBranchTextures(int i, int j, int trunkOffset, ref int frame)
Return the texture containing the possible tree branches that can be drawn next to this tree....
abstract Texture2D GetTexture()
Return the texture that represents the tile sheet used for drawing this tree.
abstract Texture2D GetTopTextures(int i, int j, ref int frame, ref int frameWidth, ref int frameHeight, ref int xOffsetLeft, ref int yOffset)
Return the texture containing the possible tree tops that can be drawn above this tree.
virtual int GrowthFXGore()
Return the type of gore created to represent leaves when this tree grows on-screen....