Package forestry.api.client.plugin
Interface IClientRegistration
public interface IClientRegistration
Handles client registration for Forestry plugins.
-
Method Summary
Modifier and TypeMethodDescriptionvoidsetButterflySprites(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.voidsetCustomBeeModel(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.voidsetDefaultBeeModel(ILifeStage stage, net.minecraft.resources.ResourceLocation modelLocation) Registers a default model for bees of a given life stage.voidsetLeafSprite(net.minecraft.resources.ResourceLocation speciesId, ILeafSprite sprite) Sets the leaf sprite of this species.voidsetLeafTint(net.minecraft.resources.ResourceLocation speciesId, ILeafTint tint) Sets the custom leaf tint object of this species.voidsetSaplingModel(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
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 newILifeStageto 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
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
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.
-