VexRenderer .java

net.minecraft.client.renderer.entity.VexRenderer (class, 42 lines): members: VEX_CHARGING_LOCATION, VEX_LOCATION, getBlockLightLevel, getTextureLocation.

net.minecraft.client.renderer.entityclass42 linesclientextends MobRenderer<Vex1.7 KB

API Surface (4)

int getBlockLightLevel(final Vex entity, final BlockPos blockPos)
Identifier getTextureLocation(final VexRenderState state)
VexRenderState createRenderState()
void extractRenderState(final Vex entity, final VexRenderState state, final float partialTicks)

Fields & Constants (2)

VEX_LOCATION
VEX_CHARGING_LOCATION

String literals (2)

"textures/entity/illager/vex.png"
"textures/entity/illager/vex_charging.png"

Full Source

VexRenderer.java42 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.model.monster.vex.VexModel;
7
import net.minecraft.client.renderer.entity.layers.ItemInHandLayer;
8
import net.minecraft.client.renderer.entity.state.ArmedEntityRenderState;
9
import net.minecraft.client.renderer.entity.state.VexRenderState;
10
import net.minecraft.core.BlockPos;
11
import net.minecraft.resources.Identifier;
12
import net.minecraft.world.entity.monster.Vex;
13
14
@Environment(EnvType.CLIENT)
15
public class VexRenderer extends MobRenderer<Vex, VexRenderState, VexModel> {
16
	private static final Identifier VEX_LOCATION = Identifier.withDefaultNamespace("textures/entity/illager/vex.png");
17
	private static final Identifier VEX_CHARGING_LOCATION = Identifier.withDefaultNamespace("textures/entity/illager/vex_charging.png");
18
19
	public VexRenderer(final EntityRendererProvider.Context context) {
20
		super(context, new VexModel(context.bakeLayer(ModelLayers.VEX)), 0.3F);
21
		this.addLayer(new ItemInHandLayer<>(this));
22
	}
23
24
	protected int getBlockLightLevel(final Vex entity, final BlockPos blockPos) {
25
		return 15;
26
	}
27
28
	public Identifier getTextureLocation(final VexRenderState state) {
29
		return state.isCharging ? VEX_CHARGING_LOCATION : VEX_LOCATION;
30
	}
31
32
	public VexRenderState createRenderState() {
33
		return new VexRenderState();
34
	}
35
36
	public void extractRenderState(final Vex entity, final VexRenderState state, final float partialTicks) {
37
		super.extractRenderState(entity, state, partialTicks);
38
		ArmedEntityRenderState.extractArmedEntityRenderState(entity, state, this.itemModelResolver, partialTicks);
39
		state.isCharging = entity.isCharging();
40
	}
41
}
42

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