Interface LocationAdapter<L,W>

Type Parameters:
L - the location type (platform-specific)
W - the world type (platform-specific)

public interface LocationAdapter<L,W>
Adapter for platform-specific location implementations.

This adapter provides a platform-agnostic interface for working with locations across different game platforms (Minecraft, Hytale, etc.).

  • Method Summary

    Modifier and Type
    Method
    Description
    create(W world, double x, double y, double z)
    Creates a new location from coordinates.
    getWorld(L location)
    Gets the world of a location.
    double
    getX(L location)
    Gets the X coordinate of a location.
    double
    getY(L location)
    Gets the Y coordinate of a location.
    double
    getZ(L location)
    Gets the Z coordinate of a location.
  • Method Details

    • getX

      double getX(L location)
      Gets the X coordinate of a location.
      Parameters:
      location - the location
      Returns:
      the X coordinate
    • getY

      double getY(L location)
      Gets the Y coordinate of a location.
      Parameters:
      location - the location
      Returns:
      the Y coordinate
    • getZ

      double getZ(L location)
      Gets the Z coordinate of a location.
      Parameters:
      location - the location
      Returns:
      the Z coordinate
    • getWorld

      W getWorld(L location)
      Gets the world of a location.
      Parameters:
      location - the location
      Returns:
      the world
    • create

      L create(W world, double x, double y, double z)
      Creates a new location from coordinates.
      Parameters:
      world - the world
      x - the X coordinate
      y - the Y coordinate
      z - the Z coordinate
      Returns:
      a new location instance