Class Position

java.lang.Object
me.hsgamer.hscore.minecraft.block.box.Position

public class Position extends Object
The immutable 3D position / location / vector
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    The x-axis
    final double
    The y-axis
    final double
    The z-axis
  • Constructor Summary

    Constructors
    Constructor
    Description
    Position(double x, double y, double z)
    Create a new Position
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    move(double x, double y, double z)
    Create a new Position that offset from this position

    Methods inherited from class java.lang.Object

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

    • x

      public final double x
      The x-axis
    • y

      public final double y
      The y-axis
    • z

      public final double z
      The z-axis
  • Constructor Details

    • Position

      public Position(double x, double y, double z)
      Create a new Position
      Parameters:
      x - the x-axis
      y - the y-axis
      z - the z-axis
  • Method Details

    • move

      public Position move(double x, double y, double z)
      Create a new Position that offset from this position
      Parameters:
      x - the x-axis offset
      y - the y-axis offset
      z - the z-axis offset
      Returns:
      the new position
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object