Package net.minecraftforge.client
Interface IItemRenderProperties
public interface IItemRenderProperties
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault HumanoidModel<?>
getArmorModel
(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlot armorSlot, HumanoidModel<?> _default) Override this method to have an item handle its own armor rendering.default Model
getBaseArmorModel
(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlot armorSlot, HumanoidModel<?> _default) Override this method to return a generic model rather than aHumanoidModel
.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 partialTick) 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
@Nullable default HumanoidModel<?> getArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlot armorSlot, HumanoidModel<?> _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 HumanoidModel to render instead of the default, will have the relevant properties copied in {@link #getBaseArmorModel(LivingEntity, ItemStack, EquipmentSlot, HumanoidModel). Returning null will cause the default to render.
- See Also:
-
getBaseArmorModel
@Nonnull default Model getBaseArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlot armorSlot, HumanoidModel<?> _default) Override this method to return a generic model rather than aHumanoidModel
. More ideal for wrapping the original model or returning non-standard models like elytra wings. By default, this hook copies in the model properties from the default into the model returned bygetArmorModel(LivingEntity, ItemStack, EquipmentSlot, HumanoidModel)
, so if you override this method you are responsible for copying properties you care about- 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 Model to render instead of the default
- See Also:
-
renderHelmetOverlay
default void renderHelmetOverlay(ItemStack stack, Player player, int width, int height, float partialTick) 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 heightpartialTick
- Partial tick for the renderer, useful for interpolation
-
getItemStackRenderer
- Returns:
- This Item's renderer, or the default instance if it does not have one.
-