package net.minecraft.world.item.equipment.trim; import net.minecraft.Util; import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstrapContext; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; public class TrimPatterns { public static final ResourceKey SENTRY = registryKey("sentry"); public static final ResourceKey DUNE = registryKey("dune"); public static final ResourceKey COAST = registryKey("coast"); public static final ResourceKey WILD = registryKey("wild"); public static final ResourceKey WARD = registryKey("ward"); public static final ResourceKey EYE = registryKey("eye"); public static final ResourceKey VEX = registryKey("vex"); public static final ResourceKey TIDE = registryKey("tide"); public static final ResourceKey SNOUT = registryKey("snout"); public static final ResourceKey RIB = registryKey("rib"); public static final ResourceKey SPIRE = registryKey("spire"); public static final ResourceKey WAYFINDER = registryKey("wayfinder"); public static final ResourceKey SHAPER = registryKey("shaper"); public static final ResourceKey SILENCE = registryKey("silence"); public static final ResourceKey RAISER = registryKey("raiser"); public static final ResourceKey HOST = registryKey("host"); public static final ResourceKey FLOW = registryKey("flow"); public static final ResourceKey BOLT = registryKey("bolt"); public static void bootstrap(BootstrapContext context) { register(context, SENTRY); register(context, DUNE); register(context, COAST); register(context, WILD); register(context, WARD); register(context, EYE); register(context, VEX); register(context, TIDE); register(context, SNOUT); register(context, RIB); register(context, SPIRE); register(context, WAYFINDER); register(context, SHAPER); register(context, SILENCE); register(context, RAISER); register(context, HOST); register(context, FLOW); register(context, BOLT); } public static void register(BootstrapContext context, ResourceKey key) { TrimPattern trimPattern = new TrimPattern(defaultAssetId(key), Component.translatable(Util.makeDescriptionId("trim_pattern", key.location())), false); context.register(key, trimPattern); } private static ResourceKey registryKey(String name) { return ResourceKey.create(Registries.TRIM_PATTERN, ResourceLocation.withDefaultNamespace(name)); } public static ResourceLocation defaultAssetId(ResourceKey key) { return key.location(); } }