Package net.minecraft.tags
Class TagLoader<T>
java.lang.Object
net.minecraft.tags.TagLoader<T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static final record
static 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> void
loadTagsForRegistry
(ResourceManager pResourceManager, WritableRegistry<T> pRegistry) static <T> void
loadTagsFromNetwork
(TagNetworkSerialization.NetworkPayload pPayload, WritableRegistry<T> pRegistry) private com.mojang.datafixers.util.Either
<List<TagLoader.EntryWithSource>, List<T>> tryBuildTag
(TagEntry.Lookup<T> p_215979_, List<TagLoader.EntryWithSource> p_215980_) 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> p_215979_, List<TagLoader.EntryWithSource> p_215980_) -
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)
-