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

◆ GetItemDrawFrame()

Rectangle Terraria.Player.GetItemDrawFrame ( int type)
inline

Definition at line 41752 of file Player.cs.

41753 {
41754 //IL_0007: Unknown result type (might be due to invalid IL or missing references)
41755 //IL_002e: Unknown result type (might be due to invalid IL or missing references)
41756 //IL_0064: Unknown result type (might be due to invalid IL or missing references)
41757 //IL_0051: Unknown result type (might be due to invalid IL or missing references)
41758 if (Main.dedServ)
41759 {
41760 return Rectangle.Empty;
41761 }
41762 Main.instance.LoadItem(type);
41763 if (ItemID.Sets.IsFood[type])
41764 {
41765 return TextureAssets.Item[type].Frame(1, 3, 0, 1);
41766 }
41767 if (Main.itemAnimations[type] != null)
41768 {
41769 return Main.itemAnimations[type].GetFrame(TextureAssets.Item[type].Value);
41770 }
41771 return TextureAssets.Item[type].Frame();
41772 }
static Asset< Texture2D >[] Item
static bool[] IsFood
If true for a given item type (F:Terraria.Item.type), then that item is food. Food items can be pla...
Definition ItemID.cs:446

References Terraria.Main.dedServ, Terraria.Main.instance, Terraria.ID.ItemID.Sets.IsFood, Terraria.GameContent.TextureAssets.Item, and Terraria.Main.itemAnimations.