• Forums

Navigation

  • Home
  • Style Guide
  • Getting Started
    • Home
    • Structuring Your Mod
    • Forge Update Checker
    • Debug Profiler
  • Concepts
    • Sides
    • Resources
    • Data
    • Registries
    • Mod Lifecycle
    • Internationalization and localization
  • Blocks
    • Home
    • Blockstates
    • Interaction
  • Tile Entities
    • Home
    • Renderer
  • Items
    • Home
    • Loot Modification
  • Models
    • Intro to Models
    • Model Files
    • Blockstates
      • Intro to Blockstate JSONs
    • Coloring Textures
    • Item Property Overrides
    • Advanced Models
      • IBakedModel
      • Perspective
      • ItemOverrideList
  • Rendering
    • ItemStackTileEntityRenderer
      • Using ItemStackTileEntityRenderer
  • Data Generation
    • Introduction
    • Model Providers
  • Events
    • Basic Usage
  • Networking
    • Home
    • Overview
    • SimpleImpl
    • Entities
  • Data Storage
    • Capabilities
    • World Saved Data
  • Utilities
    • Recipes
    • Tags
  • Effects
    • Particles
    • Sounds
  • Conventions
    • Versioning
    • Locations
  • Advanced Topics
    • Access Transformers
  • Contributing to Forge
    • Getting Started
    • PR Guidelines
  • Legacy Versions
    • Home
    • Porting to 1.16

ItemStackTileEntityRenderer

ItemStackTileEntityRenderer is a method to handle dynamic rendering on items. This system is much simpler than the old TESR ItemStack system, which required a TileEntity, and did not allow access to the ItemStack.

Using ItemStackTileEntityRenderer

ItemStackTileEntityRenderer allows you to render your item using public void renderByItem(ItemStack itemStackIn, TransformType transformTypeIn, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn).

In order to use an ISTER, the Item must first satisfy the condition that its model returns true for IBakedModel#isCustomRenderer. Once that returns true, the Item’s ISTER will be accessed for rendering. If it does not have one, it will use the default ItemStackTileEntityRenderer#instance.

To set the ISTER for an Item, use Item$Properties#setISTER. Each Item can only ever provide one ISTER, and the getter is final so that mods do not return new instances each frame.

That is it, no additional setup is necessary to use a ISTER.

Built with MkDocs using a custom theme. Hosted by Read the Docs.
Enable Dark Theme