34 lines
1.3 KiB
Java
34 lines
1.3 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package net.minecraft.client.renderer.entity;
|
|
|
|
import com.mojang.blaze3d.vertex.PoseStack;
|
|
import net.minecraft.client.model.EntityModel;
|
|
import net.minecraft.client.renderer.SubmitNodeCollector;
|
|
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
|
import net.minecraft.client.renderer.entity.MobRenderer;
|
|
import net.minecraft.client.renderer.entity.state.LivingEntityRenderState;
|
|
import net.minecraft.client.renderer.state.CameraRenderState;
|
|
import net.minecraft.world.entity.Mob;
|
|
|
|
@Deprecated
|
|
public abstract class AgeableMobRenderer<T extends Mob, S extends LivingEntityRenderState, M extends EntityModel<? super S>>
|
|
extends MobRenderer<T, S, M> {
|
|
private final M adultModel;
|
|
private final M babyModel;
|
|
|
|
public AgeableMobRenderer(EntityRendererProvider.Context context, M adultModel, M babyModel, float shadow) {
|
|
super(context, adultModel, shadow);
|
|
this.adultModel = adultModel;
|
|
this.babyModel = babyModel;
|
|
}
|
|
|
|
@Override
|
|
public void submit(S state, PoseStack poseStack, SubmitNodeCollector submitNodeCollector, CameraRenderState camera) {
|
|
this.model = ((LivingEntityRenderState)state).isBaby ? this.babyModel : this.adultModel;
|
|
super.submit(state, poseStack, submitNodeCollector, camera);
|
|
}
|
|
}
|
|
|