chore: initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package net.minecraft.client.renderer.entity;
|
||||
|
||||
import net.minecraft.client.model.EntityModel;
|
||||
import net.minecraft.world.entity.Mob;
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.api.distmarker.OnlyIn;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public abstract class MobRenderer<T extends Mob, M extends EntityModel<T>> extends LivingEntityRenderer<T, M> {
|
||||
public MobRenderer(EntityRendererProvider.Context context, M model, float shadowRadius) {
|
||||
super(context, model, shadowRadius);
|
||||
}
|
||||
|
||||
protected boolean shouldShowName(T entity) {
|
||||
return super.shouldShowName(entity)
|
||||
&& (entity.shouldShowName() || entity.hasCustomName() && entity == this.entityRenderDispatcher.crosshairPickEntity);
|
||||
}
|
||||
|
||||
protected float getShadowRadius(T entity) {
|
||||
return super.getShadowRadius(entity) * entity.getAgeScale();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user