Class MaskUtils

java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.MaskUtils

public class MaskUtils extends Object
The utility class for masks
  • Method Details

    • generateAreaPositions

      @NotNull public static @NotNull Stream<InventoryPosition> generateAreaPositions(@NotNull @NotNull InventoryPosition position1, @NotNull @NotNull InventoryPosition position2)
      Generate the stream of positions in the area between two positions
      Parameters:
      position1 - the first position
      position2 - the second position
      Returns:
      the stream of positions
    • generateOutlinePositions

      @NotNull public static @NotNull Stream<InventoryPosition> generateOutlinePositions(@NotNull @NotNull InventoryPosition position1, @NotNull @NotNull InventoryPosition position2)
      Get the stream of positions drawing the outline of the area between 2 positions
      Parameters:
      position1 - the first position
      position2 - the second position
      Returns:
      the stream of positions
    • createPositionSlots

      @NotNull public static @NotNull Function<InventoryContext,List<Integer>> createPositionSlots(@NotNull @NotNull List<InventoryPosition> positions)
      Create a slot function from the positions
      Parameters:
      positions - the positions
      Returns:
      the slot function
    • createPositionSlots

      @NotNull public static @NotNull Function<InventoryContext,List<Integer>> createPositionSlots(@NotNull @NotNull InventoryPosition... positions)
      Create a slot function from the positions
      Parameters:
      positions - the positions
      Returns:
      the slot function
    • createStaticSlots

      @NotNull public static @NotNull Function<InventoryContext,List<Integer>> createStaticSlots(@NotNull @NotNull List<Integer> slots)
      Create a static slot function
      Parameters:
      slots - the slots
      Returns:
      the slot function
    • createStaticSlots

      @NotNull public static @NotNull Function<InventoryContext,List<Integer>> createStaticSlots(@NotNull @NotNull Integer... slots)
      Create a static slot function
      Parameters:
      slots - the slots
      Returns:
      the slot function
    • createBackgroundSlots

      @NotNull public static @NotNull Function<InventoryContext,List<Integer>> createBackgroundSlots()
      Create a background slot function
      Returns:
      the slot function