UnbakedModel .java

net.minecraft.client.resources.model.UnbakedModel (interface): members: PARTICLE_TEXTURE_REFERENCE, GuiLight, textureSlots, geometry, guiLight, transforms.

net.minecraft.client.resources.modelinterface65 linesclient1.4 KB

API Surface (2)

UnbakedModel.GuiLight getByName(final String name)
boolean lightLikeBlock()

Fields & Constants (1)

PARTICLE_TEXTURE_REFERENCE

String literals (4)

"particle"
"front"
"side"
"Invalid gui light: "

Code Graph: Dependencies (4)

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

Full Source

UnbakedModel.java65 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.resources.model;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
import net.minecraft.client.resources.model.cuboid.ItemTransforms;
6
import net.minecraft.client.resources.model.geometry.UnbakedGeometry;
7
import net.minecraft.client.resources.model.sprite.TextureSlots;
8
import net.minecraft.resources.Identifier;
9
import org.jspecify.annotations.Nullable;
10
11
@Environment(EnvType.CLIENT)
12
public interface UnbakedModel {
13
	String PARTICLE_TEXTURE_REFERENCE = "particle";
14
15
	default @Nullable Boolean ambientOcclusion() {
16
		return null;
17
	}
18
19
	default UnbakedModel.@Nullable GuiLight guiLight() {
20
		return null;
21
	}
22
23
	default @Nullable ItemTransforms transforms() {
24
		return null;
25
	}
26
27
	default TextureSlots.Data textureSlots() {
28
		return TextureSlots.Data.EMPTY;
29
	}
30
31
	default @Nullable UnbakedGeometry geometry() {
32
		return null;
33
	}
34
35
	default @Nullable Identifier parent() {
36
		return null;
37
	}
38
39
	@Environment(EnvType.CLIENT)
40
	enum GuiLight {
41
		FRONT("front"),
42
		SIDE("side");
43
44
		private final String name;
45
46
		GuiLight(final String name) {
47
			this.name = name;
48
		}
49
50
		public static UnbakedModel.GuiLight getByName(final String name) {
51
			for (UnbakedModel.GuiLight target : values()) {
52
				if (target.name.equals(name)) {
53
					return target;
54
				}
55
			}
56
57
			throw new IllegalArgumentException("Invalid gui light: " + name);
58
		}
59
60
		public boolean lightLikeBlock() {
61
			return this == SIDE;
62
		}
63
	}
64
}
65

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