Package net.minecraft.tags
Class StaticTagHelper<T>
java.lang.Object
net.minecraft.tags.StaticTagHelper<T>
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
(package private) static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate String
private ResourceKey<? extends Registry<T>>
private TagCollection<T>
private static Map<ResourceLocation,List<StaticTagHelper.Wrapper<?>>>
private List<StaticTagHelper.Wrapper<T>>
-
Constructor Summary
ConstructorDescriptionStaticTagHelper(ResourceKey<? extends Registry<T>> p_144329_, String p_144330_)
-
Method Summary
Modifier and TypeMethodDescriptionprivate <R extends StaticTagHelper.Wrapper<T>>
Radd(R namedtag)
protected void
addToCollection(TagContainer.Builder p_144337_)
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> Tag.Named<T>
createDelayedTag(ResourceLocation tagRegistry, ResourceLocation name)
Call via ForgeTagHandler#makeWrapperTag to avoid any exceptions due to calling this after it is safe to callbind(String)
createOptional(ResourceLocation key, Set<Supplier<T>> defaults)
private static <T, R extends StaticTagHelper.Wrapper<T>>
RdelayedAdd(ResourceLocation tagRegistry, R tag)
ResourceKey<? extends Registry<T>>
getKey()
getMissingTags(TagContainer p_13248_)
static void
reinjectOptionalTags(TagCollection<T> tagCollection)
void
reset(TagContainer p_13243_)
void
-
Field Details
-
key
-
directory
-
source
-
wrappers
-
toAdd
-
-
Constructor Details
-
StaticTagHelper
-
-
Method Details
-
bind
-
createOptional
public Tags.IOptionalNamedTag<T> createOptional(ResourceLocation key, @Nullable Set<Supplier<T>> defaults) -
createDelayedTag
public static <T> Tag.Named<T> createDelayedTag(ResourceLocation tagRegistry, ResourceLocation name)Call via ForgeTagHandler#makeWrapperTag to avoid any exceptions due to calling this after it is safe to callbind(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 StaticTagHelper.Wrapper<T>> R delayedAdd(ResourceLocation tagRegistry, R tag) -
performDelayedAdd
public static void performDelayedAdd() -
add
-
reinjectOptionalTags
-
resetToEmpty
public void resetToEmpty() -
reset
-
getAllTags
-
getMissingTags
-
getKey
-
getDirectory
-
addToCollection
-