Package net.minecraft.tags
Class TagLoader<T>
java.lang.Object
net.minecraft.tags.TagLoader<T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic final recordstatic final record(package private) static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String(package private) final TagLoader.ElementLookup<T> private static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(Map<ResourceLocation, List<TagLoader.EntryWithSource>> pBuilders) static List<HolderLookup.RegistryLookup<?>> buildUpdatedLookups(RegistryAccess.Frozen pRegistry, List<Registry.PendingTags<?>> pTags) private static Registry.PendingTags<?> findTagsForRegistry(List<Registry.PendingTags<?>> pTags, ResourceKey<? extends Registry<?>> pRegistryKey) load(ResourceManager pResourceManager) private static <T> Optional<Registry.PendingTags<T>> loadPendingTags(ResourceManager pResourceManager, Registry<T> pRegistry) static List<Registry.PendingTags<?>> loadTagsForExistingRegistries(ResourceManager pResourceManager, RegistryAccess pRegistryAccess) static <T> voidloadTagsForRegistry(ResourceManager pResourceManager, WritableRegistry<T> pRegistry) static <T> voidloadTagsFromNetwork(TagNetworkSerialization.NetworkPayload pPayload, WritableRegistry<T> pRegistry) private com.mojang.datafixers.util.Either<List<TagLoader.EntryWithSource>, List<T>> tryBuildTag(TagEntry.Lookup<T> pLookup, List<TagLoader.EntryWithSource> pEntries) wrapTags(ResourceKey<? extends Registry<T>> pRegistryKey, Map<ResourceLocation, List<Holder<T>>> pTags)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
elementLookup
-
directory
-
-
Constructor Details
-
TagLoader
-
-
Method Details
-
load
-
tryBuildTag
private com.mojang.datafixers.util.Either<List<TagLoader.EntryWithSource>,List<T>> tryBuildTag(TagEntry.Lookup<T> pLookup, List<TagLoader.EntryWithSource> pEntries) -
build
public Map<ResourceLocation,List<T>> build(Map<ResourceLocation, List<TagLoader.EntryWithSource>> pBuilders) -
loadTagsFromNetwork
public static <T> void loadTagsFromNetwork(TagNetworkSerialization.NetworkPayload pPayload, WritableRegistry<T> pRegistry) -
loadTagsForExistingRegistries
public static List<Registry.PendingTags<?>> loadTagsForExistingRegistries(ResourceManager pResourceManager, RegistryAccess pRegistryAccess) -
loadTagsForRegistry
public static <T> void loadTagsForRegistry(ResourceManager pResourceManager, WritableRegistry<T> pRegistry) -
wrapTags
private static <T> Map<TagKey<T>,List<Holder<T>>> wrapTags(ResourceKey<? extends Registry<T>> pRegistryKey, Map<ResourceLocation, List<Holder<T>>> pTags) -
loadPendingTags
private static <T> Optional<Registry.PendingTags<T>> loadPendingTags(ResourceManager pResourceManager, Registry<T> pRegistry) -
buildUpdatedLookups
public static List<HolderLookup.RegistryLookup<?>> buildUpdatedLookups(RegistryAccess.Frozen pRegistry, List<Registry.PendingTags<?>> pTags) -
findTagsForRegistry
@Nullable private static Registry.PendingTags<?> findTagsForRegistry(List<Registry.PendingTags<?>> pTags, ResourceKey<? extends Registry<?>> pRegistryKey)
-