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

◆ Place3x1()

static void Terraria.WorldGen.Place3x1 ( int x,
int y,
ushort type,
int style = 0 )
inlinestatic

Definition at line 45900 of file WorldGen.cs.

45901 {
45902 if (x < 5 || x > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5)
45903 {
45904 return;
45905 }
45906 bool flag = true;
45907 for (int i = x - 1; i < x + 2; i++)
45908 {
45909 if (Main.tile[i, y] == null)
45910 {
45911 Main.tile[i, y] = default(Tile);
45912 }
45913 if (Main.tile[i, y].active())
45914 {
45915 flag = false;
45916 }
45917 if (Main.tile[i, y + 1] == null)
45918 {
45919 Main.tile[i, y + 1] = default(Tile);
45920 }
45921 if (!SolidTile2(i, y + 1))
45922 {
45923 flag = false;
45924 }
45925 }
45926 if (flag)
45927 {
45928 short num = (short)(54 * style);
45929 Main.tile[x - 1, y].active(active: true);
45930 Main.tile[x - 1, y].frameY = 0;
45931 Main.tile[x - 1, y].frameX = num;
45932 Main.tile[x - 1, y].type = type;
45933 Main.tile[x, y].active(active: true);
45934 Main.tile[x, y].frameY = 0;
45935 Main.tile[x, y].frameX = (short)(num + 18);
45936 Main.tile[x, y].type = type;
45937 Main.tile[x + 1, y].active(active: true);
45938 Main.tile[x + 1, y].frameY = 0;
45939 Main.tile[x + 1, y].frameX = (short)(num + 36);
45940 Main.tile[x + 1, y].type = type;
45941 }
45942 }
static bool SolidTile2(Tile testTile)

References Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, and Terraria.Main.tile.