mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
More Repair optimizations.
This commit is contained in:
parent
b39c02154a
commit
8cf9601af4
@ -339,10 +339,7 @@ public class Repair {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isArmor(ItemStack is){
|
public static boolean isArmor(ItemStack is){
|
||||||
return is.getTypeId() == 306 || is.getTypeId() == 307 ||is.getTypeId() == 308 ||is.getTypeId() == 309 || //IRON
|
return isLeatherArmor(is) || isGoldArmor(is) || isIronArmor(is) || isDiamondArmor(is);
|
||||||
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
|
|
||||||
}
|
}
|
||||||
public static boolean isLeatherArmor(ItemStack is){
|
public static boolean isLeatherArmor(ItemStack is){
|
||||||
return is.getTypeId() == 298 || is.getTypeId() == 299 || is.getTypeId() == 300 || is.getTypeId() == 301;
|
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)
|
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
|
return isStoneTools(is) || isWoodTools(is) || isGoldTools(is) || isIronTools(is) || isDiamondTools(is) || isBow(is);
|
||||||
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
|
|
||||||
}
|
}
|
||||||
public static boolean isStoneTools(ItemStack is){
|
public static boolean isStoneTools(ItemStack is){
|
||||||
return is.getTypeId() == 272 || is.getTypeId() == 273 || is.getTypeId() == 274 || is.getTypeId() == 275 || is.getTypeId() == 291;
|
return is.getTypeId() == 272 || is.getTypeId() == 273 || is.getTypeId() == 274 || is.getTypeId() == 275 || is.getTypeId() == 291;
|
||||||
|
Loading…
Reference in New Issue
Block a user