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

◆ CheckOnTable1x1()

static void Terraria.WorldGen.CheckOnTable1x1 ( int x,
int y,
int type )
inlinestatic

Definition at line 34702 of file WorldGen.cs.

34703 {
34704 if (Main.tile[x, y + 1] == null)
34705 {
34706 return;
34707 }
34708 if (Main.tile[x, y + 1].topSlope())
34709 {
34710 if (TileID.Sets.Platforms[Main.tile[x, y + 1].type])
34711 {
34712 if ((Main.tile[x, y + 1].blockType() != 3 || !Main.tile[x - 1, y + 1].active() || Main.tile[x - 1, y + 1].blockType() != 0 || !TileID.Sets.Platforms[Main.tile[x - 1, y + 1].type]) && (Main.tile[x, y + 1].blockType() != 2 || !Main.tile[x + 1, y + 1].active() || Main.tile[x + 1, y + 1].blockType() != 0 || !TileID.Sets.Platforms[Main.tile[x + 1, y + 1].type]))
34713 {
34714 KillTile(x, y);
34715 }
34716 }
34717 else
34718 {
34719 KillTile(x, y);
34720 }
34721 }
34722 else
34723 {
34724 if (Main.tile[x, y + 1].active() && Main.tileTable[Main.tile[x, y + 1].type] && !Main.tile[x, y + 1].halfBrick())
34725 {
34726 return;
34727 }
34728 if (type == 78)
34729 {
34730 if (!SolidTileAllowBottomSlope(x, y + 1))
34731 {
34732 KillTile(x, y);
34733 }
34734 }
34735 else
34736 {
34737 KillTile(x, y);
34738 }
34739 }
34740 }
static bool[] Platforms
Definition TileID.cs:163
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static bool SolidTileAllowBottomSlope(int i, int j)

References Terraria.ID.TileID.Sets.Platforms, Terraria.Main.tile, Terraria.Main.tileTable, and System.type.