Search in sources :

Example 1 with Entry

use of amerifrance.guideapi.api.impl.Entry 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

Book (amerifrance.guideapi.api.impl.Book)1 Entry (amerifrance.guideapi.api.impl.Entry)1 CategoryAbstract (amerifrance.guideapi.api.impl.abstraction.CategoryAbstract)1 EntryAbstract (amerifrance.guideapi.api.impl.abstraction.EntryAbstract)1 CategoryItemStack (amerifrance.guideapi.category.CategoryItemStack)1 EntryItemStack (amerifrance.guideapi.entry.EntryItemStack)1 PageFurnaceRecipe (amerifrance.guideapi.page.PageFurnaceRecipe)1 PageIRecipe (amerifrance.guideapi.page.PageIRecipe)1 PageText (amerifrance.guideapi.page.PageText)1 Nullable (javax.annotation.Nullable)1 ItemStack (net.minecraft.item.ItemStack)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 ShapedOreRecipe (net.minecraftforge.oredict.ShapedOreRecipe)1