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

◆ Place1x1()

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

Definition at line 36229 of file WorldGen.cs.

36230 {
36231 Tile tile = Main.tile[x, y];
36232 if (Main.tile[x, y] == null)
36233 {
36234 tile = new Tile();
36235 Main.tile[x, y] = tile;
36236 }
36237 if (Main.tile[x, y + 1] == null)
36238 {
36239 Main.tile[x, y + 1] = new Tile();
36240 }
36241 if (type == 324)
36242 {
36243 if (SolidTile2(x, y + 1) || (Main.tile[x, y + 1].nactive() && Main.tileTable[Main.tile[x, y + 1].type]))
36244 {
36245 tile.active(active: true);
36246 tile.type = (ushort)type;
36247 tile.frameX = (short)(22 * genRand.Next(3));
36248 tile.frameY = (short)(22 * style);
36249 }
36250 }
36251 else if (SolidTile2(x, y + 1) && !tile.active())
36252 {
36253 tile.active(active: true);
36254 tile.type = (ushort)type;
36255 switch (type)
36256 {
36257 case 324:
36258 tile.frameX = (short)(22 * RollRandomSeaShellStyle());
36259 tile.frameY = (short)(22 * style);
36260 break;
36261 case 36:
36262 case 144:
36263 case 239:
36264 tile.frameX = (short)(style * 18);
36265 tile.frameY = 0;
36266 break;
36267 default:
36268 tile.frameY = (short)(style * 18);
36269 break;
36270 }
36271 }
36272 }
static UnifiedRandom genRand
Definition WorldGen.cs:1215
static bool SolidTile2(Tile testTile)
static int RollRandomSeaShellStyle()

References Terraria.Tile.active(), Terraria.DataStructures.Tile, Terraria.Main.tile, Terraria.Main.tileTable, and System.type.