Search in sources :

Example 6 with CategoryAbstract

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;
}
Also used : EntryAbstract(amerifrance.guideapi.api.impl.abstraction.EntryAbstract) PageFurnaceRecipe(amerifrance.guideapi.page.PageFurnaceRecipe) ShapedOreRecipe(net.minecraftforge.oredict.ShapedOreRecipe) PageText(amerifrance.guideapi.page.PageText) EntryItemStack(amerifrance.guideapi.entry.EntryItemStack) CategoryItemStack(amerifrance.guideapi.category.CategoryItemStack) Entry(amerifrance.guideapi.api.impl.Entry) CategoryAbstract(amerifrance.guideapi.api.impl.abstraction.CategoryAbstract) PageIRecipe(amerifrance.guideapi.page.PageIRecipe) Book(amerifrance.guideapi.api.impl.Book) ResourceLocation(net.minecraft.util.ResourceLocation) EntryItemStack(amerifrance.guideapi.entry.EntryItemStack) ItemStack(net.minecraft.item.ItemStack) CategoryItemStack(amerifrance.guideapi.category.CategoryItemStack) Nullable(javax.annotation.Nullable)

Aggregations

CategoryAbstract (amerifrance.guideapi.api.impl.abstraction.CategoryAbstract)6 ItemStack (net.minecraft.item.ItemStack)5 Book (amerifrance.guideapi.api.impl.Book)4 ResourceLocation (net.minecraft.util.ResourceLocation)4 IGuideItem (amerifrance.guideapi.api.IGuideItem)2 IGuideLinked (amerifrance.guideapi.api.IGuideLinked)2 EntryAbstract (amerifrance.guideapi.api.impl.abstraction.EntryAbstract)2 CategoryItemStack (amerifrance.guideapi.category.CategoryItemStack)2 EntryItemStack (amerifrance.guideapi.entry.EntryItemStack)2 PageFurnaceRecipe (amerifrance.guideapi.page.PageFurnaceRecipe)2 PageIRecipe (amerifrance.guideapi.page.PageIRecipe)2 PageText (amerifrance.guideapi.page.PageText)2 Nullable (javax.annotation.Nullable)2 IBlockState (net.minecraft.block.state.IBlockState)2 ShapedOreRecipe (net.minecraftforge.oredict.ShapedOreRecipe)2 GuideBook (amerifrance.guideapi.api.GuideBook)1 IGuideBook (amerifrance.guideapi.api.IGuideBook)1 IInfoRenderer (amerifrance.guideapi.api.IInfoRenderer)1 Entry (amerifrance.guideapi.api.impl.Entry)1 ButtonNext (amerifrance.guideapi.button.ButtonNext)1