package net.minecraft.client.renderer.entity; import com.mojang.blaze3d.vertex.PoseStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.state.LivingEntityRenderState; import net.minecraft.world.entity.Mob; @Deprecated @Environment(EnvType.CLIENT) public abstract class AgeableMobRenderer> extends MobRenderer { private final M adultModel; private final M babyModel; public AgeableMobRenderer(EntityRendererProvider.Context context, M adultModel, M babyModel, float scale) { super(context, adultModel, scale); this.adultModel = adultModel; this.babyModel = babyModel; } @Override public void render(S renderState, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { this.model = renderState.isBaby ? this.babyModel : this.adultModel; super.render(renderState, poseStack, bufferSource, packedLight); } }