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

38 lines
1.3 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.client.renderer.entity;
import net.minecraft.client.model.geom.ModelLayers;
import net.minecraft.client.renderer.entity.AbstractHoglinRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.entity.state.HoglinRenderState;
import net.minecraft.resources.Identifier;
import net.minecraft.world.entity.monster.hoglin.Hoglin;
public class HoglinRenderer
extends AbstractHoglinRenderer<Hoglin> {
private static final Identifier HOGLIN_LOCATION = Identifier.withDefaultNamespace("textures/entity/hoglin/hoglin.png");
public HoglinRenderer(EntityRendererProvider.Context context) {
super(context, ModelLayers.HOGLIN, ModelLayers.HOGLIN_BABY, 0.7f);
}
@Override
public Identifier getTextureLocation(HoglinRenderState state) {
return HOGLIN_LOCATION;
}
@Override
public void extractRenderState(Hoglin entity, HoglinRenderState state, float partialTicks) {
super.extractRenderState(entity, state, partialTicks);
state.isConverting = entity.isConverting();
}
@Override
protected boolean isShaking(HoglinRenderState state) {
return super.isShaking(state) || state.isConverting;
}
}