Package forestry.api.modules
Interface IForestryModule
public interface IForestryModule
IF YOU WANT TO ADD BEE SPECIES, FORESTRY COMPATIBILITY, ETC. USE A
IForestryPlugin.
The entry point for a Forestry module. Your mod probably doesn't need this, but it's here if you want to use it.
Must be annotated by ForestryModule to be loaded and must have an empty constructor.
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationgetId()default List<net.minecraft.resources.ResourceLocation>default booleanisCore()default voidregisterClientHandler(Consumer<IClientModuleHandler> registrar) Runs at mod construction on the logical client, afterregisterEvents(net.minecraftforge.eventbus.api.IEventBus).default voidregisterEvents(net.minecraftforge.eventbus.api.IEventBus modBus) Called during mod construction, allowing modules to subscribe to mod bus events using their mod's event bus.default voidregisterPackets(IPacketRegistry registry) default voidsetupApi()Deprecated.
-
Method Details
-
getId
net.minecraft.resources.ResourceLocation getId()- Returns:
- The unique identifier for this module. The namespace should be the modid of the mod adding this module.
-
getModuleDependencies
- Returns:
- A list of identifiers of the modules this module requires in order to load (Apiculture, Mail, etc.)
-
getModDependencies
- Returns:
- A list of identifiers of the mods this module requires in order to load (IC2, BuildCraft, etc.)
-
registerEvents
default void registerEvents(net.minecraftforge.eventbus.api.IEventBus modBus) Called during mod construction, allowing modules to subscribe to mod bus events using their mod's event bus. For client-only events, useregisterClientHandler(java.util.function.Consumer<forestry.api.client.IClientModuleHandler>)andIClientModuleHandler.registerEvents(net.minecraftforge.eventbus.api.IEventBus).- Parameters:
modBus- The mod-specific event bus for the mod found from the namespace ofgetId().
-
registerClientHandler
Runs at mod construction on the logical client, afterregisterEvents(net.minecraftforge.eventbus.api.IEventBus). -
setupApi
Deprecated.Note: this is generally not recommended to use. Called during Forestry's common phase. Initialize any static API. -
registerPackets
-
isCore
default boolean isCore()- Returns:
- If this module is a "core" module, a dependency of all other modules added by this mod. Loads before other modules.
-