use of amerifrance.guideapi.api.impl.abstraction.CategoryAbstract in project Guide-API by TeamAmeriFrance.
the class TestBook method buildBook.
@Nullable
@Override
public Book buildBook() {
book = new Book();
book.setAuthor("TehNut");
book.setColor(Color.BLUE);
book.setDisplayName("Display Name");
book.setTitle("Title message");
book.setWelcomeMessage("Is this still a thing?");
List<CategoryAbstract> categories = Lists.newArrayList();
Map<ResourceLocation, EntryAbstract> entries = Maps.newHashMap();
List<IPage> pages = Lists.newArrayList();
pages.add(new PageText("Hello, this is\nsome text"));
pages.add(new PageFurnaceRecipe(Blocks.COBBLESTONE));
pages.add(new PageIRecipe(new ShapedOreRecipe(Items.ACACIA_BOAT, "X X", "XXX", 'X', "plankWood")));
Entry entry = new EntryItemStack(pages, "test.entry.name", new ItemStack(Items.POTATO));
entries.put(new ResourceLocation("guideapi", "entry"), entry);
categories.add(new CategoryItemStack(entries, "test.category.name", new ItemStack(Items.BANNER)));
book.setCategoryList(categories);
book.setRegistryName(new ResourceLocation("guideapi", "test_book"));
return book;
}
Aggregations