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

◆ GetBestPickaxe()

Item Terraria.Player.GetBestPickaxe ( )
inline

Definition at line 38853 of file Player.cs.

38854 {
38855 Item item = null;
38856 for (int i = 0; i < 50; i++)
38857 {
38858 if (inventory[i].stack > 0 && inventory[i].pick > 0 && (item == null || inventory[i].pick > item.pick))
38859 {
38860 item = inventory[i];
38861 }
38862 }
38863 return item;
38864 }
int pick
The Pickaxe power of this item. For example, Item.pick = 50; will appear as 50% Pickaxe Power in the ...
Definition Item.cs:409
Item[] inventory
The player's normal inventory. Indexes 0-9 hold the hotbar items, 10-49 the rest of the main inventor...
Definition Player.cs:1767

References Terraria.Player.inventory, and Terraria.Item.pick.

Referenced by Terraria.Player.HasEnoughPickPowerToHurtTile(), Terraria.Player.PlaceThing_CheckSpecificValidtyCaseForBlockSwap(), and Terraria.Player.PlaceThing_TryReplacingTiles().

+ Here is the caller graph for this function: