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

◆ IsFood

bool [] Terraria.ID.ItemID.Sets.IsFood = Factory.CreateBoolSet(353, 357, 1787, 1911, 1912, 1919, 1920, 2266, 2267, 2268, 2425, 2426, 2427, 3195, 3532, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023, 4024, 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 967, 969, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4403, 4411, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 5009, 5042, 5041, 5092, 5093, 5275, 5277, 5278)
static

If true for a given item type (F:Terraria.Item.type), then that item is food.
Food items can be placed onto F:Terraria.ID.TileID.FoodPlatters, have a F:Terraria.Item.holdStyle of F:Terraria.ID.ItemHoldStyleID.HoldFront, hide shields (F:Terraria.Item.shieldSlot) when held,
Food item sprites must have 3 frames. The required framing code is automatically initialized.

The auto-initialized animation for foods have 3 vertical frames.
1. Inventory sprite
2. Held sprite
3. F:Terraria.ID.TileID.FoodPlatter sprite
M:Terraria.Item.DefaultToFood(System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean,System.Int32) will set many common item values for food.

Definition at line 446 of file ItemID.cs.

Referenced by Terraria.Main.DrawItem_GetBasics(), Terraria.Main.DrawProj_DrawNormalProjs(), Terraria.GameContent.Drawing.TileDrawing.DrawSpecialTilesLegacy(), Terraria.GameContent.Tile_Entities.TEFoodPlatter.FitsFoodPlatter(), Terraria.Item.GetDrawHitbox(), Terraria.Player.GetItemDrawFrame(), Terraria.Main.InitializeItemAnimations(), Terraria.Player.ItemCheck_ApplyHoldStyle_Inner(), Terraria.Player.ItemIsVisuallyIncompatible(), and Terraria.Item.SetDefaults().