2025-11-24 22:52:51 +03:00

39 lines
1.4 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.client.renderer.entity;
import net.minecraft.client.model.PolarBearModel;
import net.minecraft.client.model.geom.ModelLayers;
import net.minecraft.client.renderer.entity.AgeableMobRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.entity.state.PolarBearRenderState;
import net.minecraft.resources.Identifier;
import net.minecraft.world.entity.animal.PolarBear;
public class PolarBearRenderer
extends AgeableMobRenderer<PolarBear, PolarBearRenderState, PolarBearModel> {
private static final Identifier BEAR_LOCATION = Identifier.withDefaultNamespace("textures/entity/bear/polarbear.png");
public PolarBearRenderer(EntityRendererProvider.Context context) {
super(context, new PolarBearModel(context.bakeLayer(ModelLayers.POLAR_BEAR)), new PolarBearModel(context.bakeLayer(ModelLayers.POLAR_BEAR_BABY)), 0.9f);
}
@Override
public Identifier getTextureLocation(PolarBearRenderState state) {
return BEAR_LOCATION;
}
@Override
public PolarBearRenderState createRenderState() {
return new PolarBearRenderState();
}
@Override
public void extractRenderState(PolarBear entity, PolarBearRenderState state, float partialTicks) {
super.extractRenderState(entity, state, partialTicks);
state.standScale = entity.getStandingAnimationScale(partialTicks);
}
}