Package xyz.xenondevs.invui.util
Class SlotUtils
java.lang.Object
xyz.xenondevs.invui.util.SlotUtils
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Point2D
convertFromIndex
(int index, int width) static int
convertToIndex
(int x, int y, int width) static int
convertToIndex
(@NotNull Point2D point, int width) static int
getLongestLineLength
(int[] slots, int frameWidth) getSlotsBorders
(int width, int height) getSlotsColumn
(int column, int width, int height) getSlotsRect
(int x, int y, int width, int height, int frameWidth) getSlotsRect
(@NotNull SlotUtils.Order order, int x, int y, int width, int height, int frameWidth) getSlotsRow
(int row, int width) static boolean
isNeighbor
(@NotNull Point2D point1, @NotNull Point2D point2) static int
translateGuiToPlayerInv
(int slot) static int
translatePlayerInvToGui
(int slot)
-
Constructor Details
-
SlotUtils
public SlotUtils()
-
-
Method Details
-
getSlotsRow
-
getSlotsColumn
-
getSlotsBorders
-
getSlotsRect
-
getSlotsRect
@NotNull public static @NotNull Set<Integer> getSlotsRect(@NotNull @NotNull SlotUtils.Order order, int x, int y, int width, int height, int frameWidth) -
convertToIndex
-
convertToIndex
public static int convertToIndex(int x, int y, int width) -
convertFromIndex
-
translatePlayerInvToGui
public static int translatePlayerInvToGui(int slot) -
translateGuiToPlayerInv
public static int translateGuiToPlayerInv(int slot) -
getLongestLineLength
public static int getLongestLineLength(int[] slots, int frameWidth) -
isNeighbor
-