Class LivingEntityRenderer<T extends LivingEntity,M extends EntityModel<T>>
java.lang.Object
net.minecraft.client.renderer.entity.EntityRenderer<T>
net.minecraft.client.renderer.entity.LivingEntityRenderer<T,M>
- All Implemented Interfaces:
RenderLayerParent<T,
M>
- Direct Known Subclasses:
ArmorStandRenderer
,EntityRendererEventsTest.EntityRenderEventsTestClientModStuff.MyEntityRenderer
,MobRenderer
,PlayerRenderer
public abstract class LivingEntityRenderer<T extends LivingEntity,M extends EntityModel<T>>
extends EntityRenderer<T>
implements RenderLayerParent<T,M>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final float
protected final List
<RenderLayer<T, M>> private static final org.slf4j.Logger
protected M
Fields inherited from class net.minecraft.client.renderer.entity.EntityRenderer
entityRenderDispatcher, LEASH_RENDER_STEPS, NAMETAG_SCALE, shadowRadius, shadowStrength
-
Constructor Summary
ConstructorsConstructorDescriptionLivingEntityRenderer
(EntityRendererProvider.Context pContext, M pModel, float pShadowRadius) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
addLayer
(RenderLayer<T, M> pLayer) protected float
getAttackAnim
(T pLivingBase, float pPartialTickTime) Returns where in the swing animation the living entity is (from 0 to 1).protected float
Defines what float the third param in setRotationAngles of ModelBase isprotected float
getFlipDegrees
(T pLivingEntity) getModel()
static int
getOverlayCoords
(LivingEntity pLivingEntity, float pU) protected RenderType
getRenderType
(T pLivingEntity, boolean pBodyVisible, boolean pTranslucent, boolean pGlowing) protected float
getShadowRadius
(T pEntity) protected float
getWhiteOverlayProgress
(T pLivingEntity, float pPartialTicks) protected boolean
isBodyVisible
(T pLivingEntity) static boolean
isEntityUpsideDown
(LivingEntity pEntity) protected boolean
void
render
(T pEntity, float pEntityYaw, float pPartialTicks, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight) protected void
protected void
setupRotations
(T pEntity, PoseStack pPoseStack, float pBob, float pYBodyRot, float pPartialTick, float pScale) protected boolean
shouldShowName
(T pEntity) private static float
sleepDirectionToRotation
(Direction pFacing) Methods inherited from class net.minecraft.client.renderer.entity.EntityRenderer
getBlockLightLevel, getFont, getPackedLightCoords, getRenderOffset, getSkyLightLevel, getTextureLocation, renderNameTag, 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.renderer.entity.RenderLayerParent
getTextureLocation
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
EYE_BED_OFFSET
private static final float EYE_BED_OFFSET- See Also:
-
model
-
layers
-
-
Constructor Details
-
LivingEntityRenderer
-
-
Method Details
-
addLayer
-
getModel
- Specified by:
getModel
in interfaceRenderLayerParent<T extends LivingEntity,
M extends EntityModel<T>>
-
render
public void render(T pEntity, float pEntityYaw, float pPartialTicks, PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight) - Overrides:
render
in classEntityRenderer<T extends LivingEntity>
-
getRenderType
@Nullable protected RenderType getRenderType(T pLivingEntity, boolean pBodyVisible, boolean pTranslucent, boolean pGlowing) -
getOverlayCoords
-
isBodyVisible
-
sleepDirectionToRotation
-
isShaking
-
setupRotations
-
getAttackAnim
Returns where in the swing animation the living entity is (from 0 to 1). Args : entity, partialTickTime -
getBob
Defines what float the third param in setRotationAngles of ModelBase is -
getFlipDegrees
-
getWhiteOverlayProgress
-
scale
-
shouldShowName
- Overrides:
shouldShowName
in classEntityRenderer<T extends LivingEntity>
-
isEntityUpsideDown
-
getShadowRadius
- Overrides:
getShadowRadius
in classEntityRenderer<T extends LivingEntity>
-