Class Position

java.lang.Object
io.github.projectunified.craftux.common.Position

public class Position extends Object
The position
  • Method Details

    • of

      public static Position of(int x, int y)
      Creates a new position
      Parameters:
      x - the x coordinate
      y - the y coordinate
    • maxPosition

      public static Position maxPosition(int x1, int y1, int x2, int y2)
      Get the max position
      Parameters:
      x1 - the x of the first position
      y1 - the y of the first position
      x2 - the x of the second position
      y2 - the y of the second position
      Returns:
      the max position
    • maxPosition

      public static Position maxPosition(Position position1, Position position2)
      Get the max position
      Parameters:
      position1 - the first position
      position2 - the second position
      Returns:
      the max position
    • minPosition

      public static Position minPosition(int x1, int y1, int x2, int y2)
      Get the min position
      Parameters:
      x1 - the x of the first position
      y1 - the y of the first position
      x2 - the x of the second position
      y2 - the y of the second position
      Returns:
      the min position
    • minPosition

      public static Position minPosition(Position position1, Position position2)
      Get the min position
      Parameters:
      position1 - the first position
      position2 - the second position
      Returns:
      the min position
    • getX

      public int getX()
      Get the x coordinate
      Returns:
      the x coordinate
    • getY

      public int getY()
      Get the y coordinate
      Returns:
      the y coordinate
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object