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

◆ CreateStandForLarva()

static void Terraria.GameContent.Biomes.HiveBiome.CreateStandForLarva ( Vector2D position)
inlinestatic

Definition at line 394 of file HiveBiome.cs.

395 {
396 //IL_000a: Unknown result type (might be due to invalid IL or missing references)
397 //IL_0029: Unknown result type (might be due to invalid IL or missing references)
398 //IL_0066: Unknown result type (might be due to invalid IL or missing references)
399 //IL_006e: Unknown result type (might be due to invalid IL or missing references)
400 GenVars.larvaX[GenVars.numLarva] = Utils.Clamp((int)position.X, 5, Main.maxTilesX - 5);
401 GenVars.larvaY[GenVars.numLarva] = Utils.Clamp((int)position.Y, 5, Main.maxTilesY - 5);
403 if (GenVars.numLarva >= GenVars.larvaX.Length)
404 {
405 GenVars.numLarva = GenVars.larvaX.Length - 1;
406 }
407 int num = (int)position.X;
408 int num2 = (int)position.Y;
409 for (int i = num - 1; i <= num + 1 && i > 0 && i < Main.maxTilesX; i++)
410 {
411 for (int j = num2 - 2; j <= num2 + 1 && j > 0 && j < Main.maxTilesY; j++)
412 {
413 if (j != num2 + 1)
414 {
415 Main.tile[i, j].active(active: false);
416 continue;
417 }
418 Main.tile[i, j].active(active: true);
419 Main.tile[i, j].type = 225;
420 Main.tile[i, j].slope(0);
421 Main.tile[i, j].halfBrick(halfBrick: false);
422 }
423 }
424 }

References Terraria.WorldBuilding.GenVars.larvaX, Terraria.WorldBuilding.GenVars.larvaY, Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.WorldBuilding.GenVars.numLarva, Terraria.Main.tile, ReLogic.Utilities.Vector2D.X, and ReLogic.Utilities.Vector2D.Y.

Referenced by Terraria.GameContent.Biomes.HiveBiome.Place().