EntityModelSet .java

net.minecraft.client.model.geom.EntityModelSet (class, 31 lines): members: bakeLayer, roots, vanilla, EMPTY. strings: "No model for layer ".

net.minecraft.client.model.geomclass31 linesclient923 B

API Surface (2)

ModelPart bakeLayer(final ModelLayerLocation id)
EntityModelSet vanilla()

Fields & Constants (2)

EMPTY
roots

String literals (1)

"No model for layer "

Code Graph: Dependencies (4)

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

Full Source

EntityModelSet.java31 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.model.geom;
2
3
import com.google.common.collect.ImmutableMap;
4
import java.util.Map;
5
import net.fabricmc.api.EnvType;
6
import net.fabricmc.api.Environment;
7
import net.minecraft.client.model.geom.builders.LayerDefinition;
8
9
@Environment(EnvType.CLIENT)
10
public class EntityModelSet {
11
	public static final EntityModelSet EMPTY = new EntityModelSet(Map.of());
12
	private final Map<ModelLayerLocation, LayerDefinition> roots;
13
14
	public EntityModelSet(final Map<ModelLayerLocation, LayerDefinition> roots) {
15
		this.roots = roots;
16
	}
17
18
	public ModelPart bakeLayer(final ModelLayerLocation id) {
19
		LayerDefinition result = this.roots.get(id);
20
		if (result == null) {
21
			throw new IllegalArgumentException("No model for layer " + id);
22
		} else {
23
			return result.bakeRoot();
24
		}
25
	}
26
27
	public static EntityModelSet vanilla() {
28
		return new EntityModelSet(ImmutableMap.copyOf(LayerDefinitions.createRoots()));
29
	}
30
}
31

Decompiled Minecraft 26.3 source of EntityModelSet (net/minecraft/client/model/geom/EntityModelSet.java) with Mojang official mappings, stored verbatim on the site.