Interface IItemRenderProperties


public interface IItemRenderProperties
  • Field Details

  • Method Details

    • getFont

      default Font getFont(ItemStack stack)
      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 armor
      itemStack - The itemStack to render the model of
      armorSlot - 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 equipped
      player - Reference to the current client entity
      width - Viewport width
      height - Viewport height
      partialTicks - Partial ticks for the renderer, useful for interpolation
    • getItemStackRenderer

      default BlockEntityWithoutLevelRenderer getItemStackRenderer()
      Returns:
      This Item's renderer, or the default instance if it does not have one.