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>> p_203899_) static List
<HolderLookup.RegistryLookup<?>> buildUpdatedLookups
(RegistryAccess.Frozen p_363335_, List<Registry.PendingTags<?>> p_364879_) private static Registry.PendingTags
<?> findTagsForRegistry
(List<Registry.PendingTags<?>> p_360320_, ResourceKey<? extends Registry<?>> p_360369_) load
(ResourceManager p_144496_) private static <T> Optional
<Registry.PendingTags<T>> loadPendingTags
(ResourceManager p_363343_, Registry<T> p_364997_) static List
<Registry.PendingTags<?>> loadTagsForExistingRegistries
(ResourceManager p_362119_, RegistryAccess p_363563_) static <T> void
loadTagsForRegistry
(ResourceManager p_360949_, WritableRegistry<T> p_364371_) static <T> void
loadTagsFromNetwork
(TagNetworkSerialization.NetworkPayload p_362324_, WritableRegistry<T> p_363626_) 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>> p_365157_, Map<ResourceLocation, List<Holder<T>>> p_364335_)
-
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>> p_203899_) -
loadTagsFromNetwork
public static <T> void loadTagsFromNetwork(TagNetworkSerialization.NetworkPayload p_362324_, WritableRegistry<T> p_363626_) -
loadTagsForExistingRegistries
public static List<Registry.PendingTags<?>> loadTagsForExistingRegistries(ResourceManager p_362119_, RegistryAccess p_363563_) -
loadTagsForRegistry
public static <T> void loadTagsForRegistry(ResourceManager p_360949_, WritableRegistry<T> p_364371_) -
wrapTags
private static <T> Map<TagKey<T>,List<Holder<T>>> wrapTags(ResourceKey<? extends Registry<T>> p_365157_, Map<ResourceLocation, List<Holder<T>>> p_364335_) -
loadPendingTags
private static <T> Optional<Registry.PendingTags<T>> loadPendingTags(ResourceManager p_363343_, Registry<T> p_364997_) -
buildUpdatedLookups
public static List<HolderLookup.RegistryLookup<?>> buildUpdatedLookups(RegistryAccess.Frozen p_363335_, List<Registry.PendingTags<?>> p_364879_) -
findTagsForRegistry
@Nullable private static Registry.PendingTags<?> findTagsForRegistry(List<Registry.PendingTags<?>> p_360320_, ResourceKey<? extends Registry<?>> p_360369_)
-