45695 {
45696 Tile tile = Main.tile[x, y];
45698 bool vanillaSloping = Main.tileSolid[tile.type] || tile.type == 314 || tile.type == 351 || tile.type == 424 || tile.type == 442;
45700 {
45705 {
45707 }
45709 {
45712 {
45713 return;
45714 }
45716 {
45718 {
45719 if (tile.halfBrick())
45720 {
45722 if (Main.netMode == 1)
45723 {
45724 NetMessage.SendData(17, -1, -1,
null, 7, x, y, 1
f);
45725 }
45726 }
45727 else
45728 {
45730 int slope = 2;
45732 {
45734 slope = 1;
45735 }
45736 if (Main.tile[x, y].slope() == 0)
45737 {
45739 int num8 = Main.tile[x, y].slope();
45740 if (Main.netMode == 1)
45741 {
45742 NetMessage.SendData(17, -1, -1,
null, 14, x, y,
num8);
45743 }
45744 }
45745 else if (Main.tile[x, y].slope() ==
num)
45746 {
45748 int num9 = Main.tile[x, y].slope();
45749 if (Main.netMode == 1)
45750 {
45751 NetMessage.SendData(17, -1, -1,
null, 14, x, y,
num9);
45752 }
45753 }
45754 else
45755 {
45757 int num10 = Main.tile[x, y].slope();
45758 if (Main.netMode == 1)
45759 {
45760 NetMessage.SendData(17, -1, -1,
null, 14, x, y,
num10);
45761 }
45763 if (Main.netMode == 1)
45764 {
45765 NetMessage.SendData(17, -1, -1,
null, 7, x, y, 1
f);
45766 }
45767 }
45768 }
45769 }
45770 else if (Main.tile[x, y].type == 314)
45771 {
45772 if (Minecart.FrameTrack(x, y,
pound:
true) && Main.netMode == 1)
45773 {
45774 NetMessage.SendData(17, -1, -1,
null, 15, x, y, 1
f);
45775 }
45776 }
45777 else if (Main.tile[x, y].type == 137)
45778 {
45780 switch (Main.tile[x, y].frameY / 18)
45781 {
45782 case 0:
45783 case 1:
45784 case 2:
45785 case 5:
45786 switch (Main.tile[x, y].frameX / 18)
45787 {
45788 case 0:
45790 break;
45791 case 1:
45793 break;
45794 case 2:
45796 break;
45797 case 3:
45799 break;
45800 case 4:
45802 break;
45803 case 5:
45805 break;
45806 }
45807 break;
45808 case 3:
45809 case 4:
45810 switch (Main.tile[x, y].frameX / 18)
45811 {
45812 case 0:
45813 case 1:
45815 break;
45816 case 3:
45818 break;
45819 case 2:
45821 break;
45822 case 4:
45824 break;
45825 }
45826 break;
45827 }
45828 Main.tile[x, y].frameX = (short)(
num11 * 18);
45829 if (Main.netMode == 1)
45830 {
45831 NetMessage.SendTileSquare(-1, x, y);
45832 }
45833 }
45834 else if (Main.tile[x, y].type == 424)
45835 {
45836 if (Main.tile[x, y].frameX == 0)
45837 {
45838 Main.tile[x, y].frameX = 18;
45839 }
45840 else if (Main.tile[x, y].frameX == 18)
45841 {
45842 Main.tile[x, y].frameX = 36;
45843 }
45844 else
45845 {
45846 Main.tile[x, y].frameX = 0;
45847 }
45848 if (Main.netMode == 1)
45849 {
45850 NetMessage.SendTileSquare(-1, x, y);
45851 }
45852 }
45853 else if (Main.tile[x, y].type == 442)
45854 {
45872 {
45874 }
45876 {
45878 }
45880 {
45882 }
45884 {
45886 }
45888 {
45890 }
45892 {
45894 }
45896 {
45898 }
45900 {
45902 }
45904 bool flag2 =
false;
45905 bool flag3 =
false;
45906 bool flag4 =
false;
45908 {
45910 }
45912 {
45914 }
45916 {
45918 }
45920 {
45922 }
45923 int num2 = Main.tile[x, y].frameX / 22;
45926 {
45927 case 0:
45929 break;
45930 case 2:
45932 break;
45933 case 1:
45935 break;
45936 case 3:
45938 break;
45939 }
45941 {
45943 {
45945 }
45946 Main.tile[x, y].frameX = (short)(22 *
num3);
45947 if (Main.netMode == 1)
45948 {
45949 NetMessage.SendTileSquare(-1, x, y);
45950 }
45951 }
45952 }
45953 else if ((Main.tile[x, y].halfBrick() || Main.tile[x, y].slope() != 0) && !Main.tileSolidTop[Main.tile[x, y].type])
45954 {
45958 if ((
WorldGen.SolidTile(x + 1, y) || Main.tile[x + 1, y].slope() == 1 || Main.tile[x + 1, y].slope() == 3) && !
WorldGen.SolidTile(x - 1, y))
45959 {
45962 }
45964 {
45966 }
45968 {
45969 if (Main.tile[x, y].slope() == 0)
45970 {
45972 }
45973 else if (Main.tile[x, y].slope() ==
num5)
45974 {
45976 }
45977 else if (Main.tile[x, y].slope() ==
num6)
45978 {
45980 }
45981 else if (Main.tile[x, y].slope() ==
num5 + 2)
45982 {
45984 }
45985 else
45986 {
45988 }
45989 }
45990 else if (Main.tile[x, y].slope() == 0)
45991 {
45993 }
45994 else if (Main.tile[x, y].slope() ==
num5 + 2)
45995 {
45997 }
45998 else if (Main.tile[x, y].slope() ==
num6 + 2)
45999 {
46001 }
46002 else if (Main.tile[x, y].slope() ==
num5)
46003 {
46005 }
46006 else
46007 {
46009 }
46010 int num7 = Main.tile[x, y].slope();
46011 if (Main.netMode == 1)
46012 {
46013 NetMessage.SendData(17, -1, -1,
null, 14, x, y,
num7);
46014 }
46015 }
46016 else
46017 {
46019 if (Main.netMode == 1)
46020 {
46021 NetMessage.SendData(17, -1, -1,
null, 7, x, y, 1
f);
46022 }
46023 }
46024 }
46026 }
46027 else
46028 {
46031 }
46032 }
46033 else
46034 {
46036 }
46037 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
int AddDamage(int tileId, int damageAmount, bool updateAmount=true)
static bool[] CanBeSloped
Allows non-solid tiles to be sloped (solid tiles can always be sloped, regardless of this set).
static bool Slope(int i, int j, int type)
This serves as the central class from which tile-related functions are supported and carried out.
void ClearMiningCacheAt(int x, int y, int hitTileCacheType)
void ApplyItemTime(Item sItem, float multiplier=1f, bool? callUseItem=null)