TrimPatterns .java

net.minecraft.world.item.equipment.trim.TrimPatterns (class): members: defaultAssetId, WAYFINDER, SILENCE, RAISER, SENTRY, SHAPER, COAST, SNOUT, SPIRE.

net.minecraft.world.item.equipment.trimclass66 linescommon2.9 KB

API Surface (3)

void bootstrap(final BootstrapContext<TrimPattern> context)
void register(final BootstrapContext<TrimPattern> context, final ResourceKey<TrimPattern> registryKey)
Identifier defaultAssetId(final ResourceKey<TrimPattern> registryKey)

Fields & Constants (18)

SENTRY
DUNE
COAST
WILD
WARD
EYE
VEX
TIDE
SNOUT
RIB
SPIRE
WAYFINDER
SHAPER
SILENCE
RAISER
HOST
FLOW
BOLT

String literals (16)

"sentry"
"dune"
"coast"
"wild"
"ward"
"tide"
"snout"
"spire"
"wayfinder"
"shaper"
"silence"
"raiser"
"host"
"flow"
"bolt"
"trim_pattern"

Full Source

TrimPatterns.java66 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.item.equipment.trim;
2
3
import net.minecraft.core.registries.Registries;
4
import net.minecraft.data.worldgen.BootstrapContext;
5
import net.minecraft.network.chat.Component;
6
import net.minecraft.resources.Identifier;
7
import net.minecraft.resources.ResourceKey;
8
import net.minecraft.util.Util;
9
10
public class TrimPatterns {
11
	public static final ResourceKey<TrimPattern> SENTRY = registryKey("sentry");
12
	public static final ResourceKey<TrimPattern> DUNE = registryKey("dune");
13
	public static final ResourceKey<TrimPattern> COAST = registryKey("coast");
14
	public static final ResourceKey<TrimPattern> WILD = registryKey("wild");
15
	public static final ResourceKey<TrimPattern> WARD = registryKey("ward");
16
	public static final ResourceKey<TrimPattern> EYE = registryKey("eye");
17
	public static final ResourceKey<TrimPattern> VEX = registryKey("vex");
18
	public static final ResourceKey<TrimPattern> TIDE = registryKey("tide");
19
	public static final ResourceKey<TrimPattern> SNOUT = registryKey("snout");
20
	public static final ResourceKey<TrimPattern> RIB = registryKey("rib");
21
	public static final ResourceKey<TrimPattern> SPIRE = registryKey("spire");
22
	public static final ResourceKey<TrimPattern> WAYFINDER = registryKey("wayfinder");
23
	public static final ResourceKey<TrimPattern> SHAPER = registryKey("shaper");
24
	public static final ResourceKey<TrimPattern> SILENCE = registryKey("silence");
25
	public static final ResourceKey<TrimPattern> RAISER = registryKey("raiser");
26
	public static final ResourceKey<TrimPattern> HOST = registryKey("host");
27
	public static final ResourceKey<TrimPattern> FLOW = registryKey("flow");
28
	public static final ResourceKey<TrimPattern> BOLT = registryKey("bolt");
29
30
	public static void bootstrap(final BootstrapContext<TrimPattern> context) {
31
		register(context, SENTRY);
32
		register(context, DUNE);
33
		register(context, COAST);
34
		register(context, WILD);
35
		register(context, WARD);
36
		register(context, EYE);
37
		register(context, VEX);
38
		register(context, TIDE);
39
		register(context, SNOUT);
40
		register(context, RIB);
41
		register(context, SPIRE);
42
		register(context, WAYFINDER);
43
		register(context, SHAPER);
44
		register(context, SILENCE);
45
		register(context, RAISER);
46
		register(context, HOST);
47
		register(context, FLOW);
48
		register(context, BOLT);
49
	}
50
51
	public static void register(final BootstrapContext<TrimPattern> context, final ResourceKey<TrimPattern> registryKey) {
52
		TrimPattern pattern = new TrimPattern(
53
			defaultAssetId(registryKey), Component.translatable(Util.makeDescriptionId("trim_pattern", registryKey.identifier())), false
54
		);
55
		context.register(registryKey, pattern);
56
	}
57
58
	private static ResourceKey<TrimPattern> registryKey(final String id) {
59
		return ResourceKey.create(Registries.TRIM_PATTERN, Identifier.withDefaultNamespace(id));
60
	}
61
62
	public static Identifier defaultAssetId(final ResourceKey<TrimPattern> registryKey) {
63
		return registryKey.identifier();
64
	}
65
}
66

Decompiled Minecraft 26.3 source of TrimPatterns (net/minecraft/world/item/equipment/trim/TrimPatterns.java) with Mojang official mappings, stored verbatim on the site.