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

41 lines
1.4 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.client.renderer.entity;
import net.minecraft.client.model.GoatModel;
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.GoatRenderState;
import net.minecraft.resources.Identifier;
import net.minecraft.world.entity.animal.goat.Goat;
public class GoatRenderer
extends AgeableMobRenderer<Goat, GoatRenderState, GoatModel> {
private static final Identifier GOAT_LOCATION = Identifier.withDefaultNamespace("textures/entity/goat/goat.png");
public GoatRenderer(EntityRendererProvider.Context context) {
super(context, new GoatModel(context.bakeLayer(ModelLayers.GOAT)), new GoatModel(context.bakeLayer(ModelLayers.GOAT_BABY)), 0.7f);
}
@Override
public Identifier getTextureLocation(GoatRenderState state) {
return GOAT_LOCATION;
}
@Override
public GoatRenderState createRenderState() {
return new GoatRenderState();
}
@Override
public void extractRenderState(Goat entity, GoatRenderState state, float partialTicks) {
super.extractRenderState(entity, state, partialTicks);
state.hasLeftHorn = entity.hasLeftHorn();
state.hasRightHorn = entity.hasRightHorn();
state.rammingXHeadRot = entity.getRammingXHeadRot();
}
}