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

◆ FixChand()

static void Terraria.WorldGen.FixChand ( int i,
int j )
inlinestatic

Definition at line 46754 of file WorldGen.cs.

46755 {
46756 int num = 0;
46757 Tile tile = Main.tile[i, j];
46758 int type = tile.type;
46759 tile = Main.tile[i, j];
46760 if (tile.active())
46761 {
46762 if (type == 35)
46763 {
46764 num = 1;
46765 }
46766 if (type == 36)
46767 {
46768 num = 2;
46769 }
46770 if (type == 170)
46771 {
46772 num = 3;
46773 }
46774 if (type == 171)
46775 {
46776 num = 4;
46777 }
46778 if (type == 172)
46779 {
46780 num = 5;
46781 }
46782 }
46783 if (num <= 0)
46784 {
46785 return;
46786 }
46787 int num2 = i;
46788 int num3 = j;
46789 tile = Main.tile[i, j];
46790 for (num2 = tile.frameX / 18; num2 >= 3; num2 -= 3)
46791 {
46792 }
46793 if (num2 >= 3)
46794 {
46795 num2 -= 3;
46796 }
46797 num2 = i - num2;
46798 int num4 = num3;
46799 tile = Main.tile[i, j];
46800 num3 = num4 + tile.frameY / 18 * -1;
46801 for (int k = num2; k < num2 + 3; k++)
46802 {
46803 for (int l = num3; l < num3 + 3; l++)
46804 {
46805 if (Main.tile[k, l] == null)
46806 {
46807 tile = (Main.tile[k, l] = default(Tile));
46808 }
46809 tile = Main.tile[k, l];
46810 if (tile.active())
46811 {
46812 tile = Main.tile[k, l];
46813 if (tile.type == type)
46814 {
46815 tile = Main.tile[k, l];
46816 tile.type = 34;
46817 tile = Main.tile[k, l];
46818 ref short frameY = ref tile.frameY;
46819 tile = Main.tile[k, l];
46820 frameY = (short)(tile.frameY + num * 54);
46821 }
46822 }
46823 }
46824 }
46825 }

References Terraria.Tile.active(), Terraria.Tile.frameX, Terraria.Tile.frameY, Terraria.Main.tile, and Terraria.Tile.type.

+ Here is the call graph for this function: