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

◆ PlaceOnTable1x1()

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

Definition at line 38027 of file WorldGen.cs.

38028 {
38029 bool flag = false;
38030 if (Main.tile[x, y] == null)
38031 {
38032 Main.tile[x, y] = default(Tile);
38033 }
38034 if (Main.tile[x, y + 1] == null)
38035 {
38036 Main.tile[x, y + 1] = default(Tile);
38037 }
38038 if (!Main.tile[x, y].active() && Main.tile[x, y + 1].nactive() && Main.tileTable[Main.tile[x, y + 1].type])
38039 {
38040 flag = true;
38041 }
38042 if (type == 78 && !Main.tile[x, y].active() && Main.tile[x, y + 1].nactive() && Main.tileSolid[Main.tile[x, y + 1].type] && !Main.tile[x, y + 1].halfBrick() && Main.tile[x, y + 1].slope() == 0)
38043 {
38044 flag = true;
38045 }
38046 if (flag)
38047 {
38048 Main.tile[x, y].active(active: true);
38049 Main.tile[x, y].type = (ushort)type;
38050 if (type == 33)
38051 {
38052 Main.tile[x, y].frameX = 0;
38053 Main.tile[x, y].frameY = (short)(style * 22);
38054 }
38055 else
38056 {
38057 Main.tile[x, y].frameX = (short)(style * 18);
38058 Main.tile[x, y].frameY = 0;
38059 }
38060 if (type == 50)
38061 {
38062 Main.tile[x, y].frameX = (short)(18 * genRand.Next(5));
38063 }
38064 }
38065 }
static UnifiedRandom genRand
Definition WorldGen.cs:1455

References Terraria.Main.tile, Terraria.Main.tileSolid, and Terraria.Main.tileTable.