Class RenderItemInFrameEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RenderItemInFrameEvent
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent

public class RenderItemInFrameEvent extends net.neoforged.bus.api.Event implements net.neoforged.bus.api.ICancellableEvent
Fired before an item stack is rendered in an item frame. This can be used to prevent normal rendering or add custom rendering.

This event is cancellable, and does not

invalid reference
have a result
. If the event is cancelled, then the item stack will not be rendered

This event is fired on the main Forge event bus, only on the logical client.

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getItemStackRenderState

      public ItemStackRenderState getItemStackRenderState()
      Returns the item stack being rendered.
      Returns:
      the item stack being rendered
    • getItemFrameRenderState

      public ItemFrameRenderState getItemFrameRenderState()
      Returns the item frame entity.
      Returns:
      the item frame entity
    • getRenderer

      public ItemFrameRenderer<?> getRenderer()
      Returns the renderer for the item frame entity.
      Returns:
      the renderer for the item frame entity
    • getPoseStack

      public PoseStack getPoseStack()
      Returns the pose stack used for rendering.
      Returns:
      the pose stack used for rendering
    • getMultiBufferSource

      public MultiBufferSource getMultiBufferSource()
      Returns the source of rendering buffers.
      Returns:
      the source of rendering buffers
    • getPackedLight

      public int getPackedLight()
      Returns the amount of packed (sky and block) light for rendering.
      Returns:
      the amount of packed (sky and block) light for rendering
      See Also: