Package forestry.api.plugin
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
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationid()default voidregisterApiculture(IApicultureRegistration apiculture) Override to register bee species, effects, flower types, hives, etc.default voidregisterArboriculture(IArboricultureRegistration arboriculture) Override to register tree species, fruits, etc.default voidregisterCircuits(ICircuitRegistration circuits) Called after all species are registered.default voidregisterClient(Consumer<Consumer<IClientRegistration>> registrar) Called after all species are registered to register client-only resources for species.default voidregisterErrors(IErrorRegistration errors) default voidregisterFarming(IFarmingRegistration farming) default voidregisterGenetics(IGeneticRegistration genetics) Called before registerApiculture, registerArboriculture, and registerLepidopterology to set up core genetic data.default voidregisterLepidopterology(ILepidopterologyRegistration lepidopterology) Override to register butterfly species at the correct time.default voidregisterPollen(IPollenRegistration pollen) Called after all species are registered.default boolean
-
Method Details
-
registerGenetics
Called before registerApiculture, registerArboriculture, and registerLepidopterology to set up core genetic data. -
registerApiculture
Override to register bee species, effects, flower types, hives, etc. at the correct time. Called immediately after item registry. -
registerArboriculture
Override to register tree species, fruits, etc. at the correct time. Called immediately after item registry. -
registerLepidopterology
Override to register butterfly species at the correct time. Called immediately after item registry. -
registerCircuits
Called after all species are registered. Register circuits and circuit layout types heere. -
registerErrors
-
registerFarming
-
registerPollen
Called after all species are registered. Register new pollen types here. -
registerClient
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.
-