Interface TagKey
- All Superinterfaces:
Wrapper
A wrapper over Minecraft's
TagKey<T>: a named reference to a tag within a specific registry. It is
backed by a ResourceKey and the RegistryId of the registry it lives in.- Since:
- 3.1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic TagKeyblocks(ResourceKey key) Creates a block tag key from its identifier.static TagKeyCreates a block tag key from a Bukkit blockTag.key()The identifier of this tag.static TagKeyof(RegistryId registry, ResourceKey key) Creates a tag key from its identifier, resolving against the given registry.of(RegistryId registry, Tag<T> tag) Creates a tag key from a BukkitTag, resolving against the given registry.The registry this tag belongs to.static TagKeytimelines(ResourceKey key) Creates a timeline tag key from its identifier.Methods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
key
The identifier of this tag.- Returns:
- the tag identifier
- Since:
- 3.1.0
-
registryId
The registry this tag belongs to.- Returns:
- the registry discriminator
- Since:
- 3.1.0
-
blocks
Creates a block tag key from its identifier.- Parameters:
key- the tag identifier- Returns:
- a new block tag key
- Since:
- 3.1.0
-
blocks
-
timelines
Creates a timeline tag key from its identifier.- Parameters:
key- the tag identifier- Returns:
- a new timeline tag key
- Since:
- 3.2.0
-
of
Creates a tag key from a BukkitTag, resolving against the given registry.- Type Parameters:
T- the Bukkit type of the tag's elements- Parameters:
registry- the registry the tag belongs totag- the Bukkit tag- Returns:
- a new tag key
- Since:
- 3.1.0
-
of
Creates a tag key from its identifier, resolving against the given registry.- Parameters:
registry- the registry the tag belongs tokey- the tag identifier- Returns:
- a new tag key
- Since:
- 3.1.0
-