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

◆ PlaceDresserDirect()

static void Terraria.WorldGen.PlaceDresserDirect ( int x,
int y,
ushort type,
int style,
int id )
inlinestatic

Definition at line 48905 of file WorldGen.cs.

48906 {
48907 Chest.CreateChest(x - 1, y - 1, id);
48908 for (int i = -1; i <= 1; i++)
48909 {
48910 for (int j = -1; j <= 0; j++)
48911 {
48912 if (Main.tile[x + i, y + j] == null)
48913 {
48914 Main.tile[x + i, y + j] = new Tile();
48915 }
48916 }
48917 }
48918 short num = (short)(style * 54);
48919 Main.tile[x - 1, y - 1].active(active: true);
48920 Main.tile[x - 1, y - 1].frameY = 0;
48921 Main.tile[x - 1, y - 1].frameX = num;
48922 Main.tile[x - 1, y - 1].type = type;
48923 Main.tile[x, y - 1].active(active: true);
48924 Main.tile[x, y - 1].frameY = 0;
48925 Main.tile[x, y - 1].frameX = (short)(num + 18);
48926 Main.tile[x, y - 1].type = type;
48927 Main.tile[x + 1, y - 1].active(active: true);
48928 Main.tile[x + 1, y - 1].frameY = 0;
48929 Main.tile[x + 1, y - 1].frameX = (short)(num + 36);
48930 Main.tile[x + 1, y - 1].type = type;
48931 Main.tile[x - 1, y].active(active: true);
48932 Main.tile[x - 1, y].frameY = 18;
48933 Main.tile[x - 1, y].frameX = num;
48934 Main.tile[x - 1, y].type = type;
48935 Main.tile[x, y].active(active: true);
48936 Main.tile[x, y].frameY = 18;
48937 Main.tile[x, y].frameX = (short)(num + 18);
48938 Main.tile[x, y].type = type;
48939 Main.tile[x + 1, y].active(active: true);
48940 Main.tile[x + 1, y].frameY = 18;
48941 Main.tile[x + 1, y].frameX = (short)(num + 36);
48942 Main.tile[x + 1, y].type = type;
48943 }

References Terraria.Chest.CreateChest(), Terraria.DataStructures.Tile, Terraria.Main.tile, and System.type.

Referenced by Terraria.MessageBuffer.GetData().