Class SlotUtils

java.lang.Object
xyz.xenondevs.invui.util.SlotUtils

public class SlotUtils extends Object
  • Constructor Details

    • SlotUtils

      public SlotUtils()
  • Method Details

    • getSlotsRow

      @NotNull public static @NotNull Set<Integer> getSlotsRow(int row, int width)
    • getSlotsColumn

      @NotNull public static @NotNull Set<Integer> getSlotsColumn(int column, int width, int height)
    • getSlotsBorders

      @NotNull public static @NotNull Set<Integer> getSlotsBorders(int width, int height)
    • getSlotsRect

      @NotNull public static @NotNull Set<Integer> getSlotsRect(int x, int y, int width, int height, int frameWidth)
    • getSlotsRect

      @NotNull public static @NotNull Set<Integer> getSlotsRect(@NotNull @NotNull SlotUtils.Order order, int x, int y, int width, int height, int frameWidth)
    • convertToIndex

      public static int convertToIndex(@NotNull @NotNull Point2D point, int width)
    • convertToIndex

      public static int convertToIndex(int x, int y, int width)
    • convertFromIndex

      @NotNull public static @NotNull Point2D convertFromIndex(int index, int width)
    • translatePlayerInvToGui

      public static int translatePlayerInvToGui(int slot)
    • translateGuiToPlayerInv

      public static int translateGuiToPlayerInv(int slot)
    • getLongestLineLength

      public static int getLongestLineLength(int[] slots, int frameWidth)
    • isNeighbor

      public static boolean isNeighbor(@NotNull @NotNull Point2D point1, @NotNull @NotNull Point2D point2)