Mod Support - Item Tiers.

1 is Wood, 2 is Stone, 3 is Iron, 4 is Diamond.
This commit is contained in:
GJ
2012-05-17 21:19:17 -04:00
parent 01235ff398
commit d17fe6bb7a
5 changed files with 34 additions and 7 deletions

View File

@ -243,10 +243,10 @@ public class ItemChecks {
}
/**
* Checks to see if an item is a custom tool.
* Checks to see if an item is custom armor.
*
* @param is Item to check
* @return true if the item is a custom tool, false otherwise
* @return true if the item is custom armor, false otherwise
*/
public static boolean isCustomArmor(ItemStack is) {
if (customArmorEnabled && CustomArmorConfig.getInstance().customIDs.contains(is.getTypeId())) {

View File

@ -140,11 +140,15 @@ public class Misc {
else if (ItemChecks.isIronTool(inHand)) {
tier = 3;
}
else if(ItemChecks.isGoldTool(inHand)) {
else if (ItemChecks.isGoldTool(inHand)) {
tier = 1;
}
else if(ItemChecks.isDiamondTool(inHand))
else if (ItemChecks.isDiamondTool(inHand)) {
tier = 4;
}
else if (ItemChecks.isCustomTool(inHand)) {
tier = ModChecks.getToolFromItemStack(inHand).getTier();
}
return tier;
}