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 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

      default List<net.minecraft.resources.ResourceLocation> getModuleDependencies()
      Returns:
      A list of identifiers of the modules this module requires in order to load (Apiculture, Mail, etc.)
    • getModDependencies

      default List<String> 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, use registerClientHandler(java.util.function.Consumer<forestry.api.client.IClientModuleHandler>) and IClientModuleHandler.registerEvents(net.minecraftforge.eventbus.api.IEventBus).
      Parameters:
      modBus - The mod-specific event bus for the mod found from the namespace of getId().
    • registerClientHandler

      default void registerClientHandler(Consumer<IClientModuleHandler> registrar)
      Runs at mod construction on the logical client, after registerEvents(net.minecraftforge.eventbus.api.IEventBus).
    • setupApi

      @Deprecated default void setupApi()
      Deprecated.
      Note: this is generally not recommended to use. Called during Forestry's common phase. Initialize any static API.
    • registerPackets

      default void registerPackets(IPacketRegistry registry)
    • 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.