public class GuideAPI
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static net.minecraftforge.fml.common.registry.IForgeRegistry<Book> |
BOOKS
The new Book registry.
|
static net.minecraft.item.Item |
guideBook
The item corresponding to the Guide-API books.
|
| Constructor and Description |
|---|
GuideAPI() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addTypeReader(ITypeReader typeReader)
Adds a new
ITypeReader to be used when creating JSON books. |
static net.minecraft.item.ItemStack |
getStackFromBook(Book book)
Obtains a new ItemStack associated with the provided book.
|
static java.util.List<ITypeReader> |
getTypeReaders() |
static void |
initialize() |
static void |
setModel(Book book)
Helper method for setting a model for your book.
|
static void |
setModel(Book book,
net.minecraft.util.ResourceLocation modelLoc,
java.lang.String variantName)
Helper method for setting a model for your book.
|
public static final net.minecraftforge.fml.common.registry.IForgeRegistry<Book> BOOKS
GameRegistry.register(IForgeRegistryEntry)public static net.minecraft.item.Item guideBook
public static void addTypeReader(ITypeReader typeReader)
ITypeReader to be used when creating JSON books. If you wish for modpack developers to
be able to use your Category, Entry, or Page in their book, you must register one of these.
Add your TypeReader during FMLPreInitializationEvent. The list will be queried for the only time during FMLInitializationEvent.
typeReader - - ITypeReader to register.TypeReaderspublic static java.util.List<ITypeReader> getTypeReaders()
public static net.minecraft.item.ItemStack getStackFromBook(Book book)
book - - The book to get an ItemStack for.public static void setModel(Book book, net.minecraft.util.ResourceLocation modelLoc, java.lang.String variantName)
Use if you wish to use a custom model.
Only call AFTER you have registered your book.
book - - Book to set model formodelLoc - - Location of the model filevariantName - - Variant to usepublic static void setModel(Book book)
Use if you wish to use the default model with color.
Only call AFTER you have registered your book.
book - - Book to set model forpublic static void initialize()