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.void
initializeAllBooks
(boolean reload) static void
onClientTagsLoadedStatic
(net.neoforged.neoforge.event.TagsUpdatedEvent event) void
onPlayerLoggedIn
(net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent.LoggingIn event) void
onServerStarted
(net.neoforged.neoforge.event.server.ServerStartedEvent event) static void
onServerStartedStatic
(net.neoforged.neoforge.event.server.ServerStartedEvent event) void
registerInfoBook
(IInfoBook infoBook, String path) Register a new infobook.void
registerSection
(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:IInfoBookRegistry
Register a new infobook.- Specified by:
registerInfoBook
in 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:IInfoBookRegistry
Register a new section to the given section of the given infobook.- Specified by:
registerSection
in 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:IInfoBookRegistry
Get the root of the given book.- Specified by:
getRoot
in 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:
initializeAllBooks
in interfaceIInfoBookRegistry
-