From 8cf9601af4f36ebe58ceb1bb166507fd5af3d770 Mon Sep 17 00:00:00 2001 From: GJ Date: Thu, 23 Feb 2012 19:39:06 -0500 Subject: [PATCH] More Repair optimizations. --- src/main/java/com/gmail/nossr50/skills/Repair.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/Repair.java b/src/main/java/com/gmail/nossr50/skills/Repair.java index 37a61c9f3..fc005d497 100644 --- a/src/main/java/com/gmail/nossr50/skills/Repair.java +++ b/src/main/java/com/gmail/nossr50/skills/Repair.java @@ -339,10 +339,7 @@ public class Repair { } public static boolean isArmor(ItemStack is){ - return is.getTypeId() == 306 || is.getTypeId() == 307 ||is.getTypeId() == 308 ||is.getTypeId() == 309 || //IRON - is.getTypeId() == 310 ||is.getTypeId() == 311 ||is.getTypeId() == 312 ||is.getTypeId() == 313 || //DIAMOND - is.getTypeId() == 314 || is.getTypeId() == 315 || is.getTypeId() == 316 || is.getTypeId() == 317 || //GOLD - is.getTypeId() == 298 || is.getTypeId() == 299 || is.getTypeId() == 300 || is.getTypeId() == 301; //LEATHER + return isLeatherArmor(is) || isGoldArmor(is) || isIronArmor(is) || isDiamondArmor(is); } public static boolean isLeatherArmor(ItemStack is){ return is.getTypeId() == 298 || is.getTypeId() == 299 || is.getTypeId() == 300 || is.getTypeId() == 301; @@ -358,12 +355,7 @@ public class Repair { } public static boolean isTools(ItemStack is) { - return is.getTypeId() == 359 || is.getTypeId() == 256 || is.getTypeId() == 257 || is.getTypeId() == 258 || is.getTypeId() == 267 || is.getTypeId() == 292 || //IRON - is.getTypeId() == 276 || is.getTypeId() == 277 || is.getTypeId() == 278 || is.getTypeId() == 279 || is.getTypeId() == 293 || //DIAMOND - is.getTypeId() == 283 || is.getTypeId() == 285 || is.getTypeId() == 286 || is.getTypeId() == 284 || is.getTypeId() == 294 || //GOLD - is.getTypeId() == 268 || is.getTypeId() == 269 || is.getTypeId() == 270 || is.getTypeId() == 271 || is.getTypeId() == 290 ||//WOOD - is.getTypeId() == 272 || is.getTypeId() == 273 || is.getTypeId() == 274 || is.getTypeId() == 275|| is.getTypeId() == 291 || //STONE - is.getTypeId() == 261; //BOW + return isStoneTools(is) || isWoodTools(is) || isGoldTools(is) || isIronTools(is) || isDiamondTools(is) || isBow(is); } public static boolean isStoneTools(ItemStack is){ return is.getTypeId() == 272 || is.getTypeId() == 273 || is.getTypeId() == 274 || is.getTypeId() == 275 || is.getTypeId() == 291;