Class ResourceKey
java.lang.Object
com.comphenix.packetwrapper.wrappers.data.ResourceKey
- Since:
- 15.05.2023
- Author:
- Lukas Alt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.comphenix.protocol.reflect.EquivalentConverter<ResourceKey>
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ResourceKey.ResourceKey
(com.comphenix.protocol.wrappers.MinecraftKey registry, com.comphenix.protocol.wrappers.MinecraftKey location) Creates a new ResourceKey. -
Method Summary
Modifier and TypeMethodDescriptionboolean
com.comphenix.protocol.wrappers.MinecraftKey
Gets the key of the resource within the registry.com.comphenix.protocol.wrappers.MinecraftKey
Gets the minecraft key indicating the registry (e.g, 'minecraft:dimension_type')int
hashCode()
void
setLocation
(com.comphenix.protocol.wrappers.MinecraftKey location) Set the key of the resource within the registry.void
setRegistry
(com.comphenix.protocol.wrappers.MinecraftKey registry) Sets the minecraft key indicating the registry (e.g, 'minecraft:dimension_type')toString()
-
Field Details
-
CONVERTER
-
-
Constructor Details
-
ResourceKey
public ResourceKey(com.comphenix.protocol.wrappers.MinecraftKey registry, com.comphenix.protocol.wrappers.MinecraftKey location) Creates a new ResourceKey. A resource key represents a key inside a given registry of a fixed type.- Parameters:
registry
- The id of the registrylocation
- The location withing the registry
-
ResourceKey
public ResourceKey()Creates a new ResourceKey. A resource key represents a key inside a given registry of a fixed type. With this constructor, both of them initially are null.
-
-
Method Details
-
getRegistry
public com.comphenix.protocol.wrappers.MinecraftKey getRegistry()Gets the minecraft key indicating the registry (e.g, 'minecraft:dimension_type')- Returns:
- type of the registry
-
setRegistry
public void setRegistry(com.comphenix.protocol.wrappers.MinecraftKey registry) Sets the minecraft key indicating the registry (e.g, 'minecraft:dimension_type')- Parameters:
registry
- type of registry
-
getLocation
public com.comphenix.protocol.wrappers.MinecraftKey getLocation()Gets the key of the resource within the registry.- Returns:
- resource key within registry
-
setLocation
public void setLocation(com.comphenix.protocol.wrappers.MinecraftKey location) Set the key of the resource within the registry.- Parameters:
location
- the resource key within registry
-
equals
-
hashCode
public int hashCode() -
toString
-