WolfRenderState .java

net.minecraft.client.renderer.entity.state.WolfRenderState (class): members: getBodyRollAngle, tailAngle, wetShade, headRollAngle, collarColor, shakeAnim.

net.minecraft.client.renderer.entity.stateclass35 linesclientextends LivingEntityRenderState1.2 KB

API Surface (1)

float getBodyRollAngle(final float offset)

Fields & Constants (10)

DEFAULT_TEXTURE
isAngry
isSitting
tailAngle
headRollAngle
shakeAnim
wetShade
texture
collarColor
bodyArmorItem

String literals (1)

"textures/entity/wolf/wolf.png"

Code Graph: Dependencies (5)

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

Full Source

WolfRenderState.java35 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.renderer.entity.state;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
import net.minecraft.resources.Identifier;
6
import net.minecraft.util.Mth;
7
import net.minecraft.world.item.DyeColor;
8
import net.minecraft.world.item.ItemStack;
9
import org.jspecify.annotations.Nullable;
10
11
@Environment(EnvType.CLIENT)
12
public class WolfRenderState extends LivingEntityRenderState {
13
	private static final Identifier DEFAULT_TEXTURE = Identifier.withDefaultNamespace("textures/entity/wolf/wolf.png");
14
	public boolean isAngry;
15
	public boolean isSitting;
16
	public float tailAngle = (float) (Math.PI / 5);
17
	public float headRollAngle;
18
	public float shakeAnim;
19
	public float wetShade = 1.0F;
20
	public Identifier texture = DEFAULT_TEXTURE;
21
	public @Nullable DyeColor collarColor;
22
	public ItemStack bodyArmorItem = ItemStack.EMPTY;
23
24
	public float getBodyRollAngle(final float offset) {
25
		float progress = (this.shakeAnim + offset) / 1.8F;
26
		if (progress < 0.0F) {
27
			progress = 0.0F;
28
		} else if (progress > 1.0F) {
29
			progress = 1.0F;
30
		}
31
32
		return Mth.sin(progress * (float) Math.PI) * Mth.sin(progress * (float) Math.PI * 11.0F) * 0.15F * (float) Math.PI;
33
	}
34
}
35

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