Interface BotanyPotsPlugin
- All Known Implementing Classes:
BaseBotanyPotsPlugin
public interface BotanyPotsPlugin
Botany pots plugins can be used to hook into various botany pot systems and improve integration with the mod.
Plugins are registered using a service loader. This makes them viable on several mod loaders using a single entry point. In order to define your plugin define the fully qualified class name in the META-INF/services/net.darkhax.botanypots.common.api.BotanyPotsPlugin. Please refer to the built-in plugin which is also defined using this system if you need more info.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.darkhax.bookshelf.common.api.function.CachedSupplier<List<BotanyPotsPlugin>> Provides a list of registered botany pot plugins. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidBinds a renderer to a display type.default voidregisterCropGenerators(BiConsumer<net.minecraft.resources.ResourceLocation, CropGenerator> register) Registers crop generators with Botany Pots.default voidRegister new display types with Botany Pots.default voidRegister new item drop provider types.default voidregisterSoilGenerators(BiConsumer<net.minecraft.resources.ResourceLocation, SoilGenerator> register) Registers soil generators with Botany Pots.
-
Field Details
-
PLUGINS
static final net.darkhax.bookshelf.common.api.function.CachedSupplier<List<BotanyPotsPlugin>> PLUGINSProvides a list of registered botany pot plugins. Resolving the plugin list will cause all plugins to be initialized.
-
-
Method Details
-
registerSoilGenerators
default void registerSoilGenerators(BiConsumer<net.minecraft.resources.ResourceLocation, SoilGenerator> register) Registers soil generators with Botany Pots. These are data generators that are accessed using the in-game command. These do NOT automatically create and register soils with the mod. Use datapack files for that.- Parameters:
register- A consumer that will register any accepted soil generator.
-
registerCropGenerators
default void registerCropGenerators(BiConsumer<net.minecraft.resources.ResourceLocation, CropGenerator> register) Registers crop generators with Botany Pots. These are data generators that are accessed using the in-game command. These do NOT automatically create and register soils with the mod. Use datapack files for that.- Parameters:
register- A consumer that will register any accepted crop generator.
-
registerDisplayTypes
default void registerDisplayTypes()Register new display types with Botany Pots. These are registered usingDisplayType.register(ResourceLocation, MapCodec, StreamCodec). -
registerDropProviders
default void registerDropProviders()Register new item drop provider types. These are registered usingItemDropProviderType.register(ResourceLocation, MapCodec, StreamCodec). -
bindDisplayRenderers
default void bindDisplayRenderers()Binds a renderer to a display type. This method is only invoked on the client, and it is safe to use client side only code within this method. These are bound usingDisplayRenderer.bind(DisplayType, DisplayRenderer).
-