Interface IClientRegistration


public interface IClientRegistration
Handles client registration for Forestry plugins.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setButterflySprites(net.minecraft.resources.ResourceLocation speciesId, net.minecraft.resources.ResourceLocation itemTexture, net.minecraft.resources.ResourceLocation entityTexture)
    Sets the sprites used by Forestry butterflies for item/entity rendering.
    void
    setCustomBeeModel(net.minecraft.resources.ResourceLocation speciesId, ILifeStage stage, net.minecraft.resources.ResourceLocation model)
    Registers a custom model for the given bee species when at the given life stage.
    void
    setDefaultBeeModel(ILifeStage stage, net.minecraft.resources.ResourceLocation modelLocation)
    Registers a default model for bees of a given life stage.
    void
    setLeafSprite(net.minecraft.resources.ResourceLocation speciesId, ILeafSprite sprite)
    Sets the leaf sprite of this species.
    void
    setLeafTint(net.minecraft.resources.ResourceLocation speciesId, ILeafTint tint)
    Sets the custom leaf tint object of this species.
    void
    setSaplingModel(net.minecraft.resources.ResourceLocation speciesId, net.minecraft.resources.ResourceLocation blockModel, net.minecraft.resources.ResourceLocation itemModel)
    Registers the block and item models for a tree species's saplings.
  • Method Details

    • setDefaultBeeModel

      void setDefaultBeeModel(ILifeStage stage, net.minecraft.resources.ResourceLocation modelLocation)
      Registers a default model for bees of a given life stage. Used by base Forestry to configure default bee models. If your plugin adds a new ILifeStage to the bee species type, you must call this method so that default models are available for other addons that utilize bee models.
      Parameters:
      stage - The life stage to set the default model for.
      modelLocation - The location of the model to use.
    • setCustomBeeModel

      void setCustomBeeModel(net.minecraft.resources.ResourceLocation speciesId, ILifeStage stage, net.minecraft.resources.ResourceLocation model)
      Registers a custom model for the given bee species when at the given life stage.
      Parameters:
      speciesId - The ID of the bee species to register a custom model for.
      stage - The block model for the sapling.
      model - The location of the item model for the bee species when at the given life stage.
    • setSaplingModel

      void setSaplingModel(net.minecraft.resources.ResourceLocation speciesId, net.minecraft.resources.ResourceLocation blockModel, net.minecraft.resources.ResourceLocation itemModel)
      Registers the block and item models for a tree species's saplings. If you do not call this, Forestry will use "<namespace>:block/sapling/<id without tree_>" and "<namespace>:item/sapling/<id without tree_>" as defaults.
      Parameters:
      speciesId - The ID of the tree species to register models for.
      blockModel - The block model for the sapling.
      itemModel - The item model for the sapling.
    • setLeafSprite

      void setLeafSprite(net.minecraft.resources.ResourceLocation speciesId, ILeafSprite sprite)
      Sets the leaf sprite of this species. Required for all tree species.
      Parameters:
      speciesId - The ID of the tree species to register models for.
      sprite - The sprite used for leaf rendering. Can be reused for multiple species.
    • setLeafTint

      void setLeafTint(net.minecraft.resources.ResourceLocation speciesId, ILeafTint tint)
      Sets the custom leaf tint object of this species. If none is registered, then a default tint based on the escritoire color assigned to the tree species will be used instead.
      Parameters:
      speciesId - The ID of the tree species to set the tint for.
      tint - The tint. Can be reused for multiple species.
    • setButterflySprites

      void setButterflySprites(net.minecraft.resources.ResourceLocation speciesId, net.minecraft.resources.ResourceLocation itemTexture, net.minecraft.resources.ResourceLocation entityTexture)
      Sets the sprites used by Forestry butterflies for item/entity rendering. If none is set, Forestry will use "<namespace>:item/butterfly/<id without butterfly_>" and "<namespace>:textures/entity/butterfly/<id without butterfly_>.png" as defaults. The texture maps are different between the item and entity models, so the returned textures should be different too.
      Parameters:
      speciesId - The ID of the species to set the sprite for.
      itemTexture - The path to the item texture.
      entityTexture - The path to the entity texture.