use of amerifrance.guideapi.category.CategoryItemStack in project Guide-API by TeamAmeriFrance.
the class TestBook2 method buildBook.
@Nullable
@Override
public Book buildBook() {
book = new Book();
book.setAuthor("TehNut");
book.setColor(Color.GREEN);
book.setDisplayName("Display Name");
book.setTitle("Title message");
book.setWelcomeMessage("Is this still a thing?");
CategoryAbstract testCategory = new CategoryItemStack("test.category.name", new ItemStack(Items.BANNER)).withKeyBase("guideapi");
testCategory.addEntry("entry", new EntryItemStack("test.entry.name", new ItemStack(Items.POTATO)));
testCategory.getEntry("entry").addPage(new PageText("Hello, this is\nsome text"));
testCategory.getEntry("entry").addPage(new PageFurnaceRecipe(Blocks.COBBLESTONE));
testCategory.getEntry("entry").addPage(new PageIRecipe(new ShapedOreRecipe(Items.ACACIA_BOAT, "X X", "XXX", 'X', "plankWood")));
testCategory.getEntry("entry").addPage(new PageBrewingRecipe(new BrewingRecipe(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD), new ItemStack(Items.SPECKLED_MELON), PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.HEALING))));
book.addCategory(testCategory);
book.setRegistryName(new ResourceLocation("guideapi", "test_book2"));
return book;
}
use of amerifrance.guideapi.category.CategoryItemStack 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