Class ResourceKey

java.lang.Object
com.comphenix.packetwrapper.wrappers.data.ResourceKey

public class ResourceKey extends Object
Since:
15.05.2023
Author:
Lukas Alt
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.comphenix.protocol.reflect.EquivalentConverter<ResourceKey>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new ResourceKey.
    ResourceKey(com.comphenix.protocol.wrappers.MinecraftKey registry, com.comphenix.protocol.wrappers.MinecraftKey location)
    Creates a new ResourceKey.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    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
     
    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')
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • CONVERTER

      public static final com.comphenix.protocol.reflect.EquivalentConverter<ResourceKey> 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 registry
      location - 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object