Package net.minecraftforge.client
Interface IItemRenderProperties
public interface IItemRenderProperties
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault <A extends HumanoidModel<?>>
AgetArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlot armorSlot, A _default)
Override this method to have an item handle its own armor rendering.default Font
Returns the font renderer used to render tooltips and overlays for this item.default BlockEntityWithoutLevelRenderer
default void
renderHelmetOverlay(ItemStack stack, Player player, int width, int height, float partialTicks)
Called when the client starts rendering the HUD, for whatever item the player currently has as a helmet.
-
Field Details
-
DUMMY
-
-
Method Details
-
getFont
Returns the font renderer used to render tooltips and overlays for this item. Returning null will use the standard font renderer.- Parameters:
stack
- The current item stack- Returns:
- A instance of FontRenderer or null to use default
-
getArmorModel
default <A extends HumanoidModel<?>> A getArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlot armorSlot, A _default)Override this method to have an item handle its own armor rendering.- Parameters:
entityLiving
- The entity wearing the armoritemStack
- The itemStack to render the model ofarmorSlot
- The slot the armor is in_default
- Original armor model. Will have attributes set.- Returns:
- A ModelBiped to render instead of the default
-
renderHelmetOverlay
default void renderHelmetOverlay(ItemStack stack, Player player, int width, int height, float partialTicks)Called when the client starts rendering the HUD, for whatever item the player currently has as a helmet. This is where pumpkins would render there overlay.- Parameters:
stack
- The ItemStack that is equippedplayer
- Reference to the current client entitywidth
- Viewport widthheight
- Viewport heightpartialTicks
- Partial ticks for the renderer, useful for interpolation
-
getItemStackRenderer
- Returns:
- This Item's renderer, or the default instance if it does not have one.
-