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 TypeMethodDescriptionGet the root of the given book.voidinitializeAllBooks(boolean reload) static voidonClientTagsLoadedStatic(net.neoforged.neoforge.event.TagsUpdatedEvent event) voidonPlayerLoggedIn(net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent.LoggingIn 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(ModBaseNeoForge<?> 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(ModBaseNeoForge<?> 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) -
onServerStartedStatic
public static void onServerStartedStatic(net.neoforged.neoforge.event.server.ServerStartedEvent event) -
onPlayerLoggedIn
public void onPlayerLoggedIn(net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent.LoggingIn event) -
onServerStarted
public void onServerStarted(net.neoforged.neoforge.event.server.ServerStartedEvent event) -
initializeAllBooks
public void initializeAllBooks(boolean reload) - Specified by:
initializeAllBooksin interfaceIInfoBookRegistry
-