Class LivingEntityRenderer<T extends LivingEntity,M extends EntityModel<T>>
java.lang.Object
net.minecraft.client.render.entity.EntityRenderer<T>
net.minecraft.client.render.entity.LivingEntityRenderer<T,M>
- All Implemented Interfaces:
FeatureRendererContext<T,M>
- Direct Known Subclasses:
ArmorStandEntityRenderer
,MobEntityRenderer
,PlayerEntityRenderer
@Environment(CLIENT) public abstract class LivingEntityRenderer<T extends LivingEntity,M extends EntityModel<T>> extends EntityRenderer<T> implements FeatureRendererContext<T,M>
-
Field Summary
Fields Modifier and Type Field Description protected List<FeatureRenderer<T,M>>
features
private static Logger
LOGGER
protected M
model
Fields inherited from class net.minecraft.client.render.entity.EntityRenderer
dispatcher, shadowOpacity, shadowRadius
-
Constructor Summary
Constructors Constructor Description LivingEntityRenderer(EntityRenderDispatcher dispatcher, M model, float shadowRadius)
-
Method Summary
Modifier and Type Method Description protected boolean
addFeature(FeatureRenderer<T,M> feature)
protected float
getAnimationCounter(T entity, float tickDelta)
protected float
getAnimationProgress(T entity, float tickDelta)
This value is passed to other methods when calculating angles for animation.protected float
getHandSwingProgress(T entity, float tickDelta)
protected float
getLyingAngle(T entity)
M
getModel()
static int
getOverlay(LivingEntity entity, float whiteOverlayProgress)
Returns the packed overlay color for an entity, determined by its death progress and whether it is flashing.protected RenderLayer
getRenderLayer(T entity, boolean showBody, boolean translucent, boolean showOutline)
Gets the render layer appropriate for rendering the passed entity.private static float
getYaw(Direction direction)
protected boolean
hasLabel(T t)
Determines whether the passed entity should render with a nameplate above its head.protected boolean
isShaking(T entity)
Returns if this entity is shaking in the way a zombie villager, zombie, husk, or piglin undergoing conversion shakes.protected boolean
isVisible(T entity)
void
render(T t, float float2, float float3, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int int2)
protected void
scale(T entity, MatrixStack matrices, float amount)
protected void
setupTransforms(T entity, MatrixStack matrices, float animationProgress, float bodyYaw, float tickDelta)
Methods inherited from class net.minecraft.client.render.entity.EntityRenderer
getBlockLight, getFontRenderer, getLight, getPositionOffset, getRenderManager, getTexture, method_27950, renderLabelIfPresent, shouldRender
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.render.entity.feature.FeatureRendererContext
getTexture
-
Field Details
-
LOGGER
-
model
-
features
-
-
Constructor Details
-
LivingEntityRenderer
-
-
Method Details
-
addFeature
-
getModel
- Specified by:
getModel
in interfaceFeatureRendererContext<T extends LivingEntity,M extends EntityModel<T>>
-
render
public void render(T t, float float2, float float3, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int int2)- Overrides:
render
in classEntityRenderer<T extends LivingEntity>
-
getRenderLayer
@Nullable protected RenderLayer getRenderLayer(T entity, boolean showBody, boolean translucent, boolean showOutline)Gets the render layer appropriate for rendering the passed entity. Returns null if the entity should not be rendered. -
getOverlay
Returns the packed overlay color for an entity, determined by its death progress and whether it is flashing. -
isVisible
-
getYaw
-
isShaking
Returns if this entity is shaking in the way a zombie villager, zombie, husk, or piglin undergoing conversion shakes. husk, or piglin are undergoing conversion. -
setupTransforms
protected void setupTransforms(T entity, MatrixStack matrices, float animationProgress, float bodyYaw, float tickDelta) -
getHandSwingProgress
-
getAnimationProgress
This value is passed to other methods when calculating angles for animation. It's typically just the sum of the entity's age (in ticks) and the passed in tickDelta. -
getLyingAngle
-
getAnimationCounter
-
scale
-
hasLabel
Description copied from class:EntityRenderer
Determines whether the passed entity should render with a nameplate above its head.Checks for a custom nametag on living entities, and for teams/team visibilities for players.
- Overrides:
hasLabel
in classEntityRenderer<T extends LivingEntity>
-