@Environment(value=CLIENT) public abstract class LivingEntityRenderer<T extends LivingEntity,M extends EntityModel<T>> extends EntityRenderer<T> implements FeatureRendererContext<T,M>
Modifier and Type | Field and Description |
---|---|
protected List<FeatureRenderer<T,M>> |
features |
private static Logger |
LOGGER |
protected M |
model |
dispatcher, shadowOpacity, shadowRadius
Constructor and Description |
---|
LivingEntityRenderer(EntityRenderDispatcher dispatcher,
M model,
float shadowRadius) |
Modifier and Type | Method and 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) |
getBlockLight, getFontRenderer, getLight, getPositionOffset, getRenderManager, getTexture, method_27950, renderLabelIfPresent, shouldRender
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTexture
private static final Logger LOGGER
protected M extends EntityModel<T> model
protected final List<FeatureRenderer<T extends LivingEntity,M extends EntityModel<T>>> features
public LivingEntityRenderer(EntityRenderDispatcher dispatcher, M model, float shadowRadius)
protected final boolean addFeature(FeatureRenderer<T,M> feature)
public M getModel()
getModel
in interface FeatureRendererContext<T extends LivingEntity,M extends EntityModel<T>>
public void render(T t, float float2, float float3, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int int2)
render
in class EntityRenderer<T extends LivingEntity>
@Nullable protected RenderLayer getRenderLayer(T entity, boolean showBody, boolean translucent, boolean showOutline)
public static int getOverlay(LivingEntity entity, float whiteOverlayProgress)
protected boolean isVisible(T entity)
private static float getYaw(Direction direction)
protected boolean isShaking(T entity)
protected void setupTransforms(T entity, MatrixStack matrices, float animationProgress, float bodyYaw, float tickDelta)
protected float getHandSwingProgress(T entity, float tickDelta)
protected float getAnimationProgress(T entity, float tickDelta)
protected float getLyingAngle(T entity)
protected float getAnimationCounter(T entity, float tickDelta)
protected void scale(T entity, MatrixStack matrices, float amount)
protected boolean hasLabel(T t)
EntityRenderer
Checks for a custom nametag on living entities, and for teams/team visibilities for players.
hasLabel
in class EntityRenderer<T extends LivingEntity>