HoglinRenderer .java

net.minecraft.client.renderer.entity.HoglinRenderer (class, 32 lines): members: BABY_HOGLIN_LOCATION, HOGLIN_LOCATION, isShaking, getTextureLocation.

net.minecraft.client.renderer.entityclass32 linesclientextends AbstractHoglinRenderer<Hoglin>1.3 KB

API Surface (3)

Identifier getTextureLocation(final HoglinRenderState state)
void extractRenderState(final Hoglin entity, final HoglinRenderState state, final float partialTicks)
boolean isShaking(final HoglinRenderState state)

Fields & Constants (2)

HOGLIN_LOCATION
BABY_HOGLIN_LOCATION

String literals (2)

"textures/entity/hoglin/hoglin.png"
"textures/entity/hoglin/hoglin_baby.png"

Code Graph: Dependencies (6)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

HoglinRenderer.java32 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.geom.ModelLayers;
6
import net.minecraft.client.renderer.entity.state.HoglinRenderState;
7
import net.minecraft.resources.Identifier;
8
import net.minecraft.world.entity.monster.hoglin.Hoglin;
9
10
@Environment(EnvType.CLIENT)
11
public class HoglinRenderer extends AbstractHoglinRenderer<Hoglin> {
12
	private static final Identifier HOGLIN_LOCATION = Identifier.withDefaultNamespace("textures/entity/hoglin/hoglin.png");
13
	private static final Identifier BABY_HOGLIN_LOCATION = Identifier.withDefaultNamespace("textures/entity/hoglin/hoglin_baby.png");
14
15
	public HoglinRenderer(final EntityRendererProvider.Context context) {
16
		super(context, ModelLayers.HOGLIN, ModelLayers.HOGLIN_BABY, 0.7F);
17
	}
18
19
	public Identifier getTextureLocation(final HoglinRenderState state) {
20
		return state.isBaby ? BABY_HOGLIN_LOCATION : HOGLIN_LOCATION;
21
	}
22
23
	public void extractRenderState(final Hoglin entity, final HoglinRenderState state, final float partialTicks) {
24
		super.extractRenderState(entity, state, partialTicks);
25
		state.isConverting = entity.isConverting();
26
	}
27
28
	protected boolean isShaking(final HoglinRenderState state) {
29
		return super.isShaking(state) || state.isConverting;
30
	}
31
}
32

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