mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Mod Support - Item Tiers.
1 is Wood, 2 is Stone, 3 is Iron, 4 is Diamond.
This commit is contained in:
@ -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())) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user