Class InventoryPosition

java.lang.Object
me.hsgamer.hscore.minecraft.gui.object.InventoryPosition

public class InventoryPosition extends Object
The position of the inventory
  • Method Details

    • of

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

      public static InventoryPosition 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 InventoryPosition maxPosition(InventoryPosition position1, InventoryPosition position2)
      Get the max position
      Parameters:
      position1 - the first position
      position2 - the second position
      Returns:
      the max position
    • minPosition

      public static InventoryPosition 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 InventoryPosition minPosition(InventoryPosition position1, InventoryPosition 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
    • toSlot

      public int toSlot(InventorySize size)
      Convert to slot
      Parameters:
      size - the size of the inventory
      Returns:
      the slot
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object