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.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
-
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.
-