public static boolean isRedprint(ItemStack stack) { return ItemHelper.itemsEqual(stack.getItem(), TFItems.itemDiagramRedprint); }
/** * Determine if two ItemStacks have the same Item. */ public static boolean itemsEqualWithoutMetadata(ItemStack stackA, ItemStack stackB) { return stackA != null && stackB != null && itemsEqual(stackA.getItem(), stackB.getItem()); }
/** * Determine if a player is holding an ItemStack of a specific Item type. */ public static boolean isPlayerHoldingItem(Item item, EntityPlayer player) { return itemsEqual(item, getItemFromStack(getHeldStack(player))); }
public static boolean isPlayerHoldingOffhand(Item item, EntityPlayer player) { return itemsEqual(item, getItemFromStack(getOffhandStack(player))); }
public static boolean isPlayerHoldingMainhand(Item item, EntityPlayer player) { return itemsEqual(item, getItemFromStack(getMainhandStack(player))); }