Class RenderLivingEvent<T extends LivingEntity,S extends LivingEntityRenderState,M extends EntityModel<? super S>>
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RenderLivingEvent<T,S,M>
- Type Parameters:
T- the living entity that is being renderedM- the model for the living entity
- Direct Known Subclasses:
RenderLivingEvent.Post,RenderLivingEvent.Pre,RenderPlayerEvent
public abstract class RenderLivingEvent<T extends LivingEntity,S extends LivingEntityRenderState,M extends EntityModel<? super S>>
extends net.neoforged.bus.api.Event
Fired when a
LivingEntity is rendered.
See the two subclasses to listen for before and after rendering.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRenderLivingEvent.Post<T extends LivingEntity,S extends LivingEntityRenderState, M extends EntityModel<? super S>> Fired after an entity is rendered, if the correspondingRenderLivingEvent.Postis not cancelled.static classRenderLivingEvent.Pre<T extends LivingEntity,S extends LivingEntityRenderState, M extends EntityModel<? super S>> Fired before an entity is rendered. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MultiBufferSourceprivate final intprivate final floatprivate final PoseStackprivate final LivingEntityRenderer<T, S, M> private final S -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRenderLivingEvent(S renderState, LivingEntityRenderer<T, S, M> renderer, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight) -
Method Summary
Modifier and TypeMethodDescriptionReturns the source of rendering buffers.intReturns the amount of packed (sky and block) light for rendering.floatReturns the partial tick.Returns the pose stack used for rendering.
-
Field Details
-
renderState
-
renderer
private final LivingEntityRenderer<T extends LivingEntity,S extends LivingEntityRenderState, rendererM extends EntityModel<? super S>> -
partialTick
private final float partialTick -
poseStack
-
multiBufferSource
-
packedLight
private final int packedLight
-
-
Constructor Details
-
RenderLivingEvent
@Internal protected RenderLivingEvent(S renderState, LivingEntityRenderer<T, S, M> renderer, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight)
-
-
Method Details
-
getRenderState
- Returns:
- the render state of the living entity being rendered
-
getRenderer
- Returns:
- the renderer for the living entity
-
getPartialTick
public float getPartialTick()Returns the partial tick.- Returns:
- the partial tick
-
getPoseStack
Returns the pose stack used for rendering.- Returns:
- the pose stack used for rendering
-
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:
-