Package org.spongepowered.api.tag
Interface Tag<T>
- All Superinterfaces:
Keyed,ResourceKeyed
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 TypeMethodDescriptionstatic <T> Tag<T> of(DefaultedRegistryType<T> registryType, ResourceKey key) 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
-
registry
RegistryType<T> registry()Gets thelocationdefining the parent registry.- Returns:
- The location
-
of
-
of
-