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

◆ CheckFoodPlatter()

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

Definition at line 75036 of file WorldGen.cs.

75037 {
75038 if (Main.tile[x, y] == null || destroyObject || SolidTileAllowBottomSlope(x, y + 1))
75039 {
75040 return;
75041 }
75042 if (type == 520)
75043 {
75044 int num = TEFoodPlatter.Find(x, y);
75045 if (num != -1 && ((TEFoodPlatter)TileEntity.ByID[num]).item.stack > 0)
75046 {
75047 ((TEFoodPlatter)TileEntity.ByID[num]).DropItem();
75048 if (Main.netMode != 2)
75049 {
75050 Main.LocalPlayer.InterruptItemUsageIfOverTile(520);
75051 }
75052 }
75053 }
75054 destroyObject = true;
75055 if (Main.tile[x, y].type == type)
75056 {
75057 KillTile(x, y);
75058 }
75059 if (type == 520)
75060 {
75061 TEFoodPlatter.Kill(x, y);
75062 }
75063 destroyObject = false;
75064 }
static Dictionary< int, TileEntity > ByID
Definition TileEntity.cs:20
static bool destroyObject
Definition WorldGen.cs:1258
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.DataStructures.TileEntity.ByID, Terraria.GameContent.Tile_Entities.TEFoodPlatter.Find(), Terraria.GameContent.Tile_Entities.TEFoodPlatter.Kill(), Terraria.Main.LocalPlayer, Terraria.Main.netMode, and Terraria.Main.tile.

+ Here is the call graph for this function: