Class RenderLivingEvent<T extends LivingEntity,M extends EntityModel<T>>

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RenderLivingEvent<T,M>
Type Parameters:
T - the living entity that is being rendered
M - the model for the living entity
Direct Known Subclasses:
RenderLivingEvent.Post, RenderLivingEvent.Pre

public abstract class RenderLivingEvent<T extends LivingEntity,M extends EntityModel<T>> extends net.neoforged.bus.api.Event
Fired when a LivingEntity is rendered. See the two subclasses to listen for before and after rendering.

Despite this event's use of generic type parameters, this is not a

invalid reference
net.neoforged.bus.api.GenericEvent
, and should not be treated as such (such as using generic-specific listeners, which may cause a ClassCastException).

See Also:
  • Field Details Link icon

  • Constructor Details Link icon

  • Method Details Link icon

    • getEntity Link icon

      public LivingEntity getEntity()
      Returns:
      the living entity being rendered
    • getRenderer Link icon

      public LivingEntityRenderer<T,M> getRenderer()
      Returns:
      the renderer for the living entity
    • getPartialTick Link icon

      public float getPartialTick()
      Returns the partial tick.
      Returns:
      the partial tick
    • getPoseStack Link icon

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

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

      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: