TippableArrowRenderer .java

net.minecraft.client.renderer.entity.TippableArrowRenderer (class, 31 lines): members: NORMAL_ARROW_LOCATION, TIPPED_ARROW_LOCATION, getTextureLocation.

net.minecraft.client.renderer.entityclass31 linesclientextends ArrowRenderer<Arrow1.2 KB

API Surface (3)

Identifier getTextureLocation(final TippableArrowRenderState state)
TippableArrowRenderState createRenderState()
void extractRenderState(final Arrow entity, final TippableArrowRenderState state, final float partialTicks)

Fields & Constants (2)

NORMAL_ARROW_LOCATION
TIPPED_ARROW_LOCATION

String literals (2)

"textures/entity/projectiles/arrow.png"
"textures/entity/projectiles/arrow_tipped.png"

Code Graph: Dependencies (5)

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

Full Source

TippableArrowRenderer.java31 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.renderer.entity.state.TippableArrowRenderState;
6
import net.minecraft.resources.Identifier;
7
import net.minecraft.world.entity.projectile.arrow.Arrow;
8
9
@Environment(EnvType.CLIENT)
10
public class TippableArrowRenderer extends ArrowRenderer<Arrow, TippableArrowRenderState> {
11
	public static final Identifier NORMAL_ARROW_LOCATION = Identifier.withDefaultNamespace("textures/entity/projectiles/arrow.png");
12
	public static final Identifier TIPPED_ARROW_LOCATION = Identifier.withDefaultNamespace("textures/entity/projectiles/arrow_tipped.png");
13
14
	public TippableArrowRenderer(final EntityRendererProvider.Context context) {
15
		super(context);
16
	}
17
18
	protected Identifier getTextureLocation(final TippableArrowRenderState state) {
19
		return state.isTipped ? TIPPED_ARROW_LOCATION : NORMAL_ARROW_LOCATION;
20
	}
21
22
	public TippableArrowRenderState createRenderState() {
23
		return new TippableArrowRenderState();
24
	}
25
26
	public void extractRenderState(final Arrow entity, final TippableArrowRenderState state, final float partialTicks) {
27
		super.extractRenderState(entity, state, partialTicks);
28
		state.isTipped = entity.getColor() > 0;
29
	}
30
}
31

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