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

42 lines
1.6 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.client.renderer.entity;
import net.minecraft.client.model.ArmadilloModel;
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.ArmadilloRenderState;
import net.minecraft.resources.Identifier;
import net.minecraft.world.entity.animal.armadillo.Armadillo;
public class ArmadilloRenderer
extends AgeableMobRenderer<Armadillo, ArmadilloRenderState, ArmadilloModel> {
private static final Identifier ARMADILLO_LOCATION = Identifier.withDefaultNamespace("textures/entity/armadillo.png");
public ArmadilloRenderer(EntityRendererProvider.Context context) {
super(context, new ArmadilloModel(context.bakeLayer(ModelLayers.ARMADILLO)), new ArmadilloModel(context.bakeLayer(ModelLayers.ARMADILLO_BABY)), 0.4f);
}
@Override
public Identifier getTextureLocation(ArmadilloRenderState state) {
return ARMADILLO_LOCATION;
}
@Override
public ArmadilloRenderState createRenderState() {
return new ArmadilloRenderState();
}
@Override
public void extractRenderState(Armadillo entity, ArmadilloRenderState state, float partialTicks) {
super.extractRenderState(entity, state, partialTicks);
state.isHidingInShell = entity.shouldHideInShell();
state.peekAnimationState.copyFrom(entity.peekAnimationState);
state.rollOutAnimationState.copyFrom(entity.rollOutAnimationState);
state.rollUpAnimationState.copyFrom(entity.rollUpAnimationState);
}
}