Interface ResourceKey

All Superinterfaces:
Comparable<Key>, net.kyori.examination.Examinable, Key, Keyed, Namespaced, Wrapper

@NullMarked @AsOf("2.3.0") public interface ResourceKey extends Key, Keyed, Wrapper
This interface represents a key for a biome resource in the game. It uses the @AsOf annotation to indicate the version since the interface or its methods have been present or modified.
Since:
0.0.1
  • Field Details

  • Method Details

    • namespace

      @AsOf("0.0.15") @Namespace String namespace()
      The namespace portion of this key (e.g. "minecraft", "wyck").
      Specified by:
      namespace in interface Key
      Specified by:
      namespace in interface Namespaced
    • path

      @AsOf("0.0.15") @Value String path()
      The path portion of this key.
    • resourceLocation

      @AsOf("2.0.0") Object resourceLocation()
      Underlying Minecraft Identifier.
      Returns:
      the underlying Minecraft Identifier
      Since:
      2.0.0
    • identifier

      @AsOf("2.4.1") <T> T identifier()
    • value

      @AsOf("2.2.1") @Value default String value()
      Specified by:
      value in interface Key
    • asString

      @AsOf("2.2.1") default String asString()
      Specified by:
      asString in interface Key
    • key

      @AsOf("0.0.6") default Key key()
      Specified by:
      key in interface Key
      Specified by:
      key in interface Keyed
    • toMinecraft

      @AsOf("2.3.0") default Object toMinecraft()
      Description copied from interface: Wrapper
      Convert this handle to the real Minecraft object.
      Specified by:
      toMinecraft in interface Wrapper
      Returns:
      the real Minecraft object
    • of

      @AsOf("0.0.1") static ResourceKey of(String namespace, String path)
      Creates a new ResourceKey from the given namespace and path.
      Parameters:
      namespace - the namespace for the resource location
      path - the path for the resource location
      Returns:
      a new ResourceKey with the given namespace and path
      Since:
      0.0.1
    • of

      @AsOf("2.3.0") static ResourceKey of(String string)
      Creates a new ResourceKey from the given string.
      Parameters:
      string - the string to create the ResourceKey from
      Returns:
      a new ResourceKey with the given string
      Since:
      2.3.0
    • wyck

      @AsOf("0.0.8") static ResourceKey wyck(String path)
      Creates a new ResourceKey in the "wyck" namespace with the given path.
      Parameters:
      path - the path for the resource location
      Returns:
      a new ResourceKey with the "wyck" namespace and the given path
    • minecraft

      @AsOf("2.3.0") static ResourceKey minecraft(String path)
      Creates a new ResourceKey in the "minecraft" namespace with the given path.
      Parameters:
      path - the path for the resource location
      Returns:
      a new ResourceKey with the "minecraft" namespace and the given path
      Since:
      2.3.0
    • fromString

      @AsOf("0.0.15") static ResourceKey fromString(String keyString)
      Creates a new ResourceKey from the given string representation. The string should be in the format "namespace:path".
      Parameters:
      keyString - the string representation of the ResourceKey
      Returns:
      a new ResourceKey with the given string representation
      Since:
      0.0.15