Terraria ModLoader  0.11.7.8
A mod to make and play Terraria mods
ConvertiblePlants.cs
Go to the documentation of this file.
1 using Microsoft.Xna.Framework.Graphics;
2 
3 namespace 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 }
virtual bool CanDropAcorn()
Whether or not this tree can drop acorns. Returns true by default.
virtual int GrowthFXGore()
Return the type of gore created to represent leaves when this palm tree grows on-screen. Returns -1 by default.
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 cactus. The cactus will share a tile ID with the vanilla cacti...
virtual int CreateDust()
Return the type of dust created when this tree is destroyed. Returns 7 by default.
virtual int GrowthFXGore()
Return the type of gore created to represent leaves when this tree grows on-screen. Returns -1 by default.
This class represents a type of modded tree. The tree will share a tile ID with the vanilla trees (5)...
This class represents a type of modded palm tree. The palm tree will share a tile ID with the vanilla...