30 lines
1.1 KiB
Java
30 lines
1.1 KiB
Java
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.PolarBearModel;
|
|
import net.minecraft.client.model.geom.ModelLayers;
|
|
import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraft.world.entity.animal.PolarBear;
|
|
|
|
@Environment(EnvType.CLIENT)
|
|
public class PolarBearRenderer extends MobRenderer<PolarBear, PolarBearModel<PolarBear>> {
|
|
private static final ResourceLocation BEAR_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/bear/polarbear.png");
|
|
|
|
public PolarBearRenderer(EntityRendererProvider.Context context) {
|
|
super(context, new PolarBearModel<>(context.bakeLayer(ModelLayers.POLAR_BEAR)), 0.9F);
|
|
}
|
|
|
|
/**
|
|
* Returns the location of an entity's texture.
|
|
*/
|
|
public ResourceLocation getTextureLocation(PolarBear entity) {
|
|
return BEAR_LOCATION;
|
|
}
|
|
|
|
protected void scale(PolarBear livingEntity, PoseStack poseStack, float partialTickTime) {
|
|
poseStack.scale(1.2F, 1.2F, 1.2F);
|
|
super.scale(livingEntity, poseStack, partialTickTime);
|
|
}
|
|
}
|