TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ GrowMoreVines()

static bool Terraria.WorldGen.GrowMoreVines ( int x,
int y )
inlinestaticprivate

Definition at line 38270 of file WorldGen.cs.

38271 {
38272 //IL_0084: Unknown result type (might be due to invalid IL or missing references)
38273 //IL_0097: Unknown result type (might be due to invalid IL or missing references)
38274 if (!InWorld(x, y, 30))
38275 {
38276 return false;
38277 }
38278 int num = 4;
38279 int num2 = 6;
38280 int num3 = 10;
38281 int num4 = 60;
38282 int num5 = 0;
38283 if (Main.tile[x, y].type == 528)
38284 {
38285 num4 /= 5;
38286 }
38287 for (int i = x - num; i <= x + num; i++)
38288 {
38289 for (int j = y - num2; j <= y + num3; j++)
38290 {
38291 if (TileID.Sets.IsVine[Main.tile[i, j].type])
38292 {
38293 num5++;
38294 if (j > y && Collision.CanHitLine(new Vector2((float)(x * 16), (float)(y * 16)), 1, 1, new Vector2((float)(i * 16), (float)(j * 16)), 1, 1))
38295 {
38296 num5 = ((Main.tile[i, j].type != 528) ? (num5 + (j - y) * 2) : (num5 + (j - y) * 20));
38297 }
38298 if (num5 > num4)
38299 {
38300 return false;
38301 }
38302 }
38303 }
38304 }
38305 return true;
38306 }
static bool[] IsVine
Definition TileID.cs:215
static bool InWorld(int x, int y, int fluff=0)
Definition WorldGen.cs:6481

References Terraria.Collision.CanHitLine(), Terraria.ID.TileID.Sets.IsVine, and Terraria.Main.tile.

+ Here is the call graph for this function: