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

  • Constructor Details

  • Method Details

    • getEntity

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

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

      public float getPartialTick()
      Returns the partial tick.
      Returns:
      the partial tick
    • 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: