public static ArrayList<BookletPage> getPagesForStack(ItemStack stack) { ArrayList<BookletPage> possiblePages = new ArrayList<BookletPage>(); for (BookletPage page : InitBooklet.pagesWithItemStackData) { if (ItemUtil.contains(page.getItemStacksForPage(), stack, true)) { possiblePages.add(page); } } return possiblePages; }