Package org.cyclops.cyclopscore.infobook
Class InfoBookRegistry
java.lang.Object
org.cyclops.cyclopscore.infobook.InfoBookRegistry
- All Implemented Interfaces:
IInfoBookRegistry,org.cyclops.cyclopscore.init.IRegistry
Registry for info books for a mod.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGet the root of the given book.voidonClientRecipesLoaded(net.neoforged.neoforge.client.event.RecipesUpdatedEvent event) static voidonClientRecipesLoadedStatic(net.neoforged.neoforge.client.event.RecipesUpdatedEvent event) voidonClientTagsLoaded(net.neoforged.neoforge.event.TagsUpdatedEvent event) static voidonClientTagsLoadedStatic(net.neoforged.neoforge.event.TagsUpdatedEvent event) voidonServerStarted(net.neoforged.neoforge.event.server.ServerStartedEvent event) static voidonServerStartedStatic(net.neoforged.neoforge.event.server.ServerStartedEvent event) voidregisterInfoBook(IInfoBook infoBook, String path) Register a new infobook.voidregisterSection(ModBase<?> mod, IInfoBook infoBook, String parentSection, String sectionPath) Register a new section to the given section of the given infobook.
-
Constructor Details
-
InfoBookRegistry
public InfoBookRegistry()
-
-
Method Details
-
registerInfoBook
Description copied from interface:IInfoBookRegistryRegister a new infobook.- Specified by:
registerInfoBookin interfaceIInfoBookRegistry- Parameters:
infoBook- The infobook to register.path- The path to the xml file of the book.
-
registerSection
public void registerSection(ModBase<?> mod, IInfoBook infoBook, String parentSection, String sectionPath) Description copied from interface:IInfoBookRegistryRegister a new section to the given section of the given infobook.- Specified by:
registerSectionin interfaceIInfoBookRegistry- Parameters:
mod- The mod owning the section.infoBook- The infobook to register to.parentSection- The section to register this new section to.sectionPath- The path to the xml file of the section to register.
-
getRoot
Description copied from interface:IInfoBookRegistryGet the root of the given book.- Specified by:
getRootin interfaceIInfoBookRegistry- Parameters:
infoBook- The info book to get the root from.- Returns:
- The root section.
-
onClientTagsLoadedStatic
public static void onClientTagsLoadedStatic(net.neoforged.neoforge.event.TagsUpdatedEvent event) -
onClientRecipesLoadedStatic
public static void onClientRecipesLoadedStatic(net.neoforged.neoforge.client.event.RecipesUpdatedEvent event) -
onServerStartedStatic
public static void onServerStartedStatic(net.neoforged.neoforge.event.server.ServerStartedEvent event) -
onClientTagsLoaded
public void onClientTagsLoaded(net.neoforged.neoforge.event.TagsUpdatedEvent event) -
onClientRecipesLoaded
public void onClientRecipesLoaded(net.neoforged.neoforge.client.event.RecipesUpdatedEvent event) -
onServerStarted
public void onServerStarted(net.neoforged.neoforge.event.server.ServerStartedEvent event) -
afterRecipesAndTagsLoaded
public void afterRecipesAndTagsLoaded()
-