Class Location

java.lang.Object
fr.hytale.loader.api.Location

public class Location extends Object
Represents a 3D location in a Hytale world.
Since:
1.0.4
Version:
1.0.4
Author:
HytaleLoader
  • Constructor Details

    • Location

      public Location(World world, double x, double y, double z)
      Constructs a new Location.
      Parameters:
      world - the world
      x - the X coordinate
      y - the Y coordinate
      z - the Z coordinate
    • Location

      public Location(World world, double x, double y, double z, float yaw, float pitch)
      Constructs a new Location with rotation.
      Parameters:
      world - the world
      x - the X coordinate
      y - the Y coordinate
      z - the Z coordinate
      yaw - the yaw rotation
      pitch - the pitch rotation
    • Location

      public Location(com.hypixel.hytale.server.core.universe.world.World nativeWorld, double x, double y, double z)
      Constructs from native world.
      Parameters:
      nativeWorld - the native world
      x - the X coordinate
      y - the Y coordinate
      z - the Z coordinate
    • Location

      public Location(com.hypixel.hytale.server.core.universe.world.World nativeWorld, double x, double y, double z, float yaw, float pitch)
      Constructs from native world with rotation.
      Parameters:
      nativeWorld - the native world
      x - the X coordinate
      y - the Y coordinate
      z - the Z coordinate
      yaw - the yaw rotation
      pitch - the pitch rotation
  • Method Details

    • getX

      public double getX()
    • setX

      public void setX(double x)
    • getY

      public double getY()
    • setY

      public void setY(double y)
    • getZ

      public double getZ()
    • setZ

      public void setZ(double z)
    • getYaw

      public float getYaw()
    • setYaw

      public void setYaw(float yaw)
    • getPitch

      public float getPitch()
    • setPitch

      public void setPitch(float pitch)
    • getWorld

      public World getWorld()
    • setWorld

      public void setWorld(World world)
    • getBlockX

      public int getBlockX()
    • getBlockY

      public int getBlockY()
    • getBlockZ

      public int getBlockZ()
    • add

      public Location add(double x, double y, double z)
    • subtract

      public Location subtract(double x, double y, double z)
    • distance

      public double distance(Location other)
    • distanceSquared

      public double distanceSquared(Location other)
    • clone

      public Location clone()
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object