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

◆ OnPlayerInteraction()

static void Terraria.GameContent.Tile_Entities.TEFoodPlatter.OnPlayerInteraction ( Player player,
int clickX,
int clickY )
inlinestatic

Definition at line 150 of file TEFoodPlatter.cs.

151 {
152 if (FitsFoodPlatter(player.inventory[player.selectedItem]) && !player.inventory[player.selectedItem].favorited)
153 {
154 player.GamepadEnableGrappleCooldown();
156 Recipe.FindRecipes();
157 return;
158 }
159 int num = Find(clickX, clickY);
160 if (num != -1 && ((TEFoodPlatter)TileEntity.ByID[num]).item.stack > 0)
161 {
162 player.GamepadEnableGrappleCooldown();
163 WorldGen.KillTile(clickX, clickY, fail: true);
164 if (Main.netMode == 1)
165 {
166 NetMessage.SendData(17, -1, -1, null, 0, clickX, clickY, 1f);
167 }
168 }
169 }
static Dictionary< int, TileEntity > ByID
Definition TileEntity.cs:20
static void PlaceItemInFrame(Player player, int x, int y)

References Terraria.DataStructures.TileEntity.ByID, Terraria.Item.favorited, Terraria.GameContent.Tile_Entities.TEFoodPlatter.Find(), Terraria.Recipe.FindRecipes(), Terraria.GameContent.Tile_Entities.TEFoodPlatter.FitsFoodPlatter(), Terraria.Player.GamepadEnableGrappleCooldown(), Terraria.Player.inventory, Terraria.WorldGen.KillTile(), Terraria.Main.netMode, Terraria.GameContent.Tile_Entities.TEFoodPlatter.PlaceItemInFrame(), Terraria.Player.selectedItem, and Terraria.NetMessage.SendData().

Referenced by Terraria.Player.TileInteractionsUse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: