Package org.spongepowered.api.tag
Interface Tag<T>
- All Superinterfaces:
Keyed,ResourceKeyed
- All Known Subinterfaces:
DefaultedTag<T>
A
resource keyed collection of Taggable values
(of type T).
While any number of tags may exist and the values each tag contains is arbitrary, vanilla Minecraft generally uses pre-defined tags for one of the following reasons:
- To define a common material that
blocksare made of, for example,BlockTypeTags.ACACIA_LOGS - To define a common behavior that the
engineshould apply to a block, such as specifying a block as a log that can burn viaBlockTypeTags.LOGS_THAT_BURN
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionasDefaultedTag(Supplier<RegistryHolder> holder) static <T> Tag<T> of(RegistryType<T> registryType, ResourceKey key) registry()Gets thelocationdefining the parent registry.Methods inherited from interface org.spongepowered.api.ResourceKeyed
key
-
Method Details
-
of
-
registry
RegistryType<T> registry()Gets thelocationdefining the parent registry.- Returns:
- The location
-
asDefaultedTag
-
asScopedTag
DefaultedTag<T> asScopedTag()
-