Interface IForestryPlugin


public interface IForestryPlugin
Entry point for registering things to the Forestry API. Forestry uses ServiceLoader to load IForestryPlugin classes, so the mod jar must include a file named:

     META-INF/services/forestry.api.plugin.IForestryPlugin
 

With a line for each IForestryPlugin class to register:


     com.example.examplemod.compat.ExampleForestryPlugin  # You can list multiple plugins
     com.example.examplemod.compat.AnotherExampleForestryPlugin
 
See Also:
  • Method Details

    • registerGenetics

      default void registerGenetics(IGeneticRegistration genetics)
      Called before registerApiculture, registerArboriculture, and registerLepidopterology to set up core genetic data.
    • registerApiculture

      default void registerApiculture(IApicultureRegistration apiculture)
      Override to register bee species, effects, flower types, hives, etc. at the correct time. Called immediately after item registry.
    • registerArboriculture

      default void registerArboriculture(IArboricultureRegistration arboriculture)
      Override to register tree species, fruits, etc. at the correct time. Called immediately after item registry.
    • registerLepidopterology

      default void registerLepidopterology(ILepidopterologyRegistration lepidopterology)
      Override to register butterfly species at the correct time. Called immediately after item registry.
    • registerCircuits

      default void registerCircuits(ICircuitRegistration circuits)
      Called after all species are registered. Register circuits and circuit layout types heere.
    • registerErrors

      default void registerErrors(IErrorRegistration errors)
    • registerFarming

      default void registerFarming(IFarmingRegistration farming)
    • registerPollen

      default void registerPollen(IPollenRegistration pollen)
      Called after all species are registered. Register new pollen types here.
    • registerClient

      default void registerClient(Consumer<Consumer<IClientRegistration>> registrar)
      Called after all species are registered to register client-only resources for species.
      Parameters:
      registrar - Accepts a class that handles client registration. Consumer is for maintaining side-safety.
    • id

      net.minecraft.resources.ResourceLocation id()
      Returns:
      Unique ID for this plugin.
    • shouldLoad

      default boolean shouldLoad()
      Returns:
      Whether this plugin should have any of its registerGenetics, registerApiculture, etc. methods called.