EntityRenderState .java

net.minecraft.client.renderer.entity.state.EntityRenderState (class, 66 lines): members: boundingBoxHeight, boundingBoxWidth, passengerOffset, ShadowPiece.

net.minecraft.client.renderer.entity.stateclass66 linesclient2.2 KB

Implements

API Surface (3)

boolean appearsGlowing()
void fillCrashReportCategory(final CrashReportCategory category)
record ShadowPiece(float relativeX, float relativeY, float relativeZ, VoxelShape shapeBelow, float alpha)

Fields & Constants (22)

NO_OUTLINE
entityType
x
y
z
ageInTicks
boundingBoxWidth
boundingBoxHeight
eyeHeight
distanceToCameraSq
isInvisible
isDiscrete
displayFireAnimation
lightCoords
outlineColor
passengerOffset
nameTag
scoreText
nameTagAttachment
leashStates
shadowRadius
shadowPieces

String literals (1)

"Entity's Exact location"

Code Graph: Dependencies (5)

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

Full Source

EntityRenderState.java66 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.renderer.entity.state;
2
3
import java.util.ArrayList;
4
import java.util.List;
5
import java.util.Locale;
6
import net.fabricmc.api.EnvType;
7
import net.fabricmc.api.Environment;
8
import net.fabricmc.fabric.api.client.rendering.v1.FabricRenderState;
9
import net.minecraft.CrashReportCategory;
10
import net.minecraft.network.chat.Component;
11
import net.minecraft.world.entity.EntityType;
12
import net.minecraft.world.phys.Vec3;
13
import net.minecraft.world.phys.shapes.VoxelShape;
14
import org.jspecify.annotations.Nullable;
15
16
@Environment(EnvType.CLIENT)
17
public class EntityRenderState implements FabricRenderState {
18
	public static final int NO_OUTLINE = 0;
19
	public EntityType<?> entityType;
20
	public double x;
21
	public double y;
22
	public double z;
23
	public float ageInTicks;
24
	public float boundingBoxWidth;
25
	public float boundingBoxHeight;
26
	public float eyeHeight;
27
	public double distanceToCameraSq;
28
	public boolean isInvisible;
29
	public boolean isDiscrete;
30
	public boolean displayFireAnimation;
31
	public int lightCoords = 15728880;
32
	public int outlineColor = 0;
33
	public @Nullable Vec3 passengerOffset;
34
	public @Nullable Component nameTag;
35
	public @Nullable Component scoreText;
36
	public @Nullable Vec3 nameTagAttachment;
37
	public @Nullable List<EntityRenderState.LeashState> leashStates;
38
	public float shadowRadius;
39
	public final List<EntityRenderState.ShadowPiece> shadowPieces = new ArrayList<>();
40
41
	public boolean appearsGlowing() {
42
		return this.outlineColor != 0;
43
	}
44
45
	public void fillCrashReportCategory(final CrashReportCategory category) {
46
		category.setDetail("EntityRenderState", this.getClass().getCanonicalName());
47
		category.setDetail("Entity's Exact location", String.format(Locale.ROOT, "%.2f, %.2f, %.2f", this.x, this.y, this.z));
48
	}
49
50
	@Environment(EnvType.CLIENT)
51
	public static class LeashState implements FabricRenderState {
52
		public Vec3 offset = Vec3.ZERO;
53
		public Vec3 start = Vec3.ZERO;
54
		public Vec3 end = Vec3.ZERO;
55
		public int startBlockLight = 0;
56
		public int endBlockLight = 0;
57
		public int startSkyLight = 15;
58
		public int endSkyLight = 15;
59
		public boolean slack = true;
60
	}
61
62
	@Environment(EnvType.CLIENT)
63
	public record ShadowPiece(float relativeX, float relativeY, float relativeZ, VoxelShape shapeBelow, float alpha) {
64
	}
65
}
66

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