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

40 lines
1.4 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.client.renderer.entity;
import net.minecraft.client.model.OcelotModel;
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.FelineRenderState;
import net.minecraft.resources.Identifier;
import net.minecraft.world.entity.animal.Ocelot;
public class OcelotRenderer
extends AgeableMobRenderer<Ocelot, FelineRenderState, OcelotModel> {
private static final Identifier CAT_OCELOT_LOCATION = Identifier.withDefaultNamespace("textures/entity/cat/ocelot.png");
public OcelotRenderer(EntityRendererProvider.Context context) {
super(context, new OcelotModel(context.bakeLayer(ModelLayers.OCELOT)), new OcelotModel(context.bakeLayer(ModelLayers.OCELOT_BABY)), 0.4f);
}
@Override
public Identifier getTextureLocation(FelineRenderState state) {
return CAT_OCELOT_LOCATION;
}
@Override
public FelineRenderState createRenderState() {
return new FelineRenderState();
}
@Override
public void extractRenderState(Ocelot entity, FelineRenderState state, float partialTicks) {
super.extractRenderState(entity, state, partialTicks);
state.isCrouching = entity.isCrouching();
state.isSprinting = entity.isSprinting();
}
}