ArmadilloRenderer .java

net.minecraft.client.renderer.entity.ArmadilloRenderer (class, 38 lines): members: ARMADILLO_BABY_LOCATION, ARMADILLO_LOCATION, getTextureLocation.

net.minecraft.client.renderer.entityclass38 linesclientextends AgeableMobRenderer<Armadillo1.8 KB

API Surface (3)

Identifier getTextureLocation(final ArmadilloRenderState state)
ArmadilloRenderState createRenderState()
void extractRenderState(final Armadillo entity, final ArmadilloRenderState state, final float partialTicks)

Fields & Constants (2)

ARMADILLO_LOCATION
ARMADILLO_BABY_LOCATION

String literals (2)

"textures/entity/armadillo/armadillo.png"
"textures/entity/armadillo/armadillo_baby.png"

Full Source

ArmadilloRenderer.java38 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.renderer.entity;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
import net.minecraft.client.model.animal.armadillo.AdultArmadilloModel;
6
import net.minecraft.client.model.animal.armadillo.ArmadilloModel;
7
import net.minecraft.client.model.animal.armadillo.BabyArmadilloModel;
8
import net.minecraft.client.model.geom.ModelLayers;
9
import net.minecraft.client.renderer.entity.state.ArmadilloRenderState;
10
import net.minecraft.resources.Identifier;
11
import net.minecraft.world.entity.animal.armadillo.Armadillo;
12
13
@Environment(EnvType.CLIENT)
14
public class ArmadilloRenderer extends AgeableMobRenderer<Armadillo, ArmadilloRenderState, ArmadilloModel> {
15
	private static final Identifier ARMADILLO_LOCATION = Identifier.withDefaultNamespace("textures/entity/armadillo/armadillo.png");
16
	private static final Identifier ARMADILLO_BABY_LOCATION = Identifier.withDefaultNamespace("textures/entity/armadillo/armadillo_baby.png");
17
18
	public ArmadilloRenderer(final EntityRendererProvider.Context context) {
19
		super(context, new AdultArmadilloModel(context.bakeLayer(ModelLayers.ARMADILLO)), new BabyArmadilloModel(context.bakeLayer(ModelLayers.ARMADILLO_BABY)), 0.4F);
20
	}
21
22
	public Identifier getTextureLocation(final ArmadilloRenderState state) {
23
		return state.isBaby ? ARMADILLO_BABY_LOCATION : ARMADILLO_LOCATION;
24
	}
25
26
	public ArmadilloRenderState createRenderState() {
27
		return new ArmadilloRenderState();
28
	}
29
30
	public void extractRenderState(final Armadillo entity, final ArmadilloRenderState state, final float partialTicks) {
31
		super.extractRenderState(entity, state, partialTicks);
32
		state.isHidingInShell = entity.shouldHideInShell();
33
		state.peekAnimationState.copyFrom(entity.peekAnimationState);
34
		state.rollOutAnimationState.copyFrom(entity.rollOutAnimationState);
35
		state.rollUpAnimationState.copyFrom(entity.rollUpAnimationState);
36
	}
37
}
38

Decompiled Minecraft 26.3 source of ArmadilloRenderer (net/minecraft/client/renderer/entity/ArmadilloRenderer.java) with Mojang official mappings, stored verbatim on the site.