Package net.minecraft.tags
Class TagRegistry<T>
java.lang.Object
net.minecraft.tags.TagRegistry<T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Function<ITagCollectionSupplier,
ITagCollection<T>> private ITagCollection<T>
private static Map<ResourceLocation,
List<TagRegistry.NamedTag<?>>> private final List<TagRegistry.NamedTag<T>>
-
Constructor Summary
ConstructorsConstructorDescriptionTagRegistry
(Function<ITagCollectionSupplier, ITagCollection<T>> p_i241894_1_) -
Method Summary
Modifier and TypeMethodDescriptionprivate <R extends TagRegistry.NamedTag<T>>
Radd
(R namedtag) static <T> Tags.IOptionalNamedTag<T>
createDelayedOptional
(ResourceLocation tagRegistry, ResourceLocation key, Set<Supplier<T>> defaults) Call via ForgeTagHandler#createOptionalTag to avoid any exceptions due to calling this after it is safe to callcreateOptional(ResourceLocation, Set)
static <T> ITag.INamedTag<T>
createDelayedTag
(ResourceLocation tagRegistry, ResourceLocation name) Call via ForgeTagHandler#makeWrapperTag to avoid any exceptions due to calling this after it is safe to call#createTag(String)
createOptional
(ResourceLocation key, Set<Supplier<T>> defaults) private static <T,
R extends TagRegistry.NamedTag<T>>
RdelayedAdd
(ResourceLocation tagRegistry, R tag) getMissingTags
(ITagCollectionSupplier p_242189_1_) List<? extends ITag.INamedTag<T>>
static void
reinjectOptionalTags
(ITagCollection<T> tagCollection) void
reset
(ITagCollectionSupplier p_242188_1_) void
-
Field Details
-
source
-
wrappers
-
collectionGetter
-
toAdd
-
-
Constructor Details
-
TagRegistry
-
-
Method Details
-
bind
-
createOptional
public Tags.IOptionalNamedTag<T> createOptional(ResourceLocation key, @Nullable Set<Supplier<T>> defaults) -
createDelayedTag
public static <T> ITag.INamedTag<T> createDelayedTag(ResourceLocation tagRegistry, ResourceLocation name) Call via ForgeTagHandler#makeWrapperTag to avoid any exceptions due to calling this after it is safe to call#createTag(String)
-
createDelayedOptional
public static <T> Tags.IOptionalNamedTag<T> createDelayedOptional(ResourceLocation tagRegistry, ResourceLocation key, @Nullable Set<Supplier<T>> defaults) Call via ForgeTagHandler#createOptionalTag to avoid any exceptions due to calling this after it is safe to callcreateOptional(ResourceLocation, Set)
-
delayedAdd
private static <T,R extends TagRegistry.NamedTag<T>> R delayedAdd(ResourceLocation tagRegistry, R tag) -
performDelayedAdd
public static void performDelayedAdd() -
add
-
resetToEmpty
public void resetToEmpty() -
reset
-
reinjectOptionalTags
-
getAllTags
-
getWrappers
-
getMissingTags
-