FontDescription .java

net.minecraft.network.chat.FontDescription (interface, 27 lines): members: PlayerSprite, AtlasSprite, Resource, DEFAULT, CODEC. strings: "default".

net.minecraft.network.chatinterface27 linescommon939 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Fields & Constants (2)

CODEC
DEFAULT

String literals (2)

"Unsupported font description type: "
"default"

Code Graph: Dependencies (2)

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

Full Source

FontDescription.java27 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.network.chat;
2
3
import com.mojang.serialization.Codec;
4
import com.mojang.serialization.DataResult;
5
import net.minecraft.resources.Identifier;
6
import net.minecraft.world.item.component.ResolvableProfile;
7
8
public interface FontDescription {
9
	Codec<FontDescription> CODEC = Identifier.CODEC
10
		.flatComapMap(
11
			FontDescription.Resource::new,
12
			fontDescription -> fontDescription instanceof FontDescription.Resource resource
13
				? DataResult.success(resource.id())
14
				: DataResult.error(() -> "Unsupported font description type: " + fontDescription)
15
		);
16
	FontDescription.Resource DEFAULT = new FontDescription.Resource(Identifier.withDefaultNamespace("default"));
17
18
	record AtlasSprite(Identifier atlasId, Identifier spriteId) implements FontDescription {
19
	}
20
21
	record PlayerSprite(ResolvableProfile profile, boolean hat) implements FontDescription {
22
	}
23
24
	record Resource(Identifier id) implements FontDescription {
25
	}
26
}
27

Decompiled Minecraft 26.3 source of FontDescription (net/minecraft/network/chat/FontDescription.java) with Mojang official mappings, stored verbatim on the site.