Class MaskUtils

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

public class MaskUtils extends Object
The utility class for Mask
  • Method Summary

    Modifier and Type
    Method
    Description
    static IntStream
    generateAreaSlots(int x1, int y1, int x2, int y2)
    Generate the stream of slots in the area between two positions
    static @NotNull IntStream
    generateAreaSlots(@NotNull me.hsgamer.hscore.ui.Position2D position1, @NotNull me.hsgamer.hscore.ui.Position2D position2)
    Generate the stream of slots in the area between two positions
    static @NotNull IntStream
    generateOutlineSlots(int x1, int y1, int x2, int y2)
    Get the stream of slots drawing the outline of the area between 2 positions
    static @NotNull IntStream
    generateOutlineSlots(me.hsgamer.hscore.ui.Position2D position1, me.hsgamer.hscore.ui.Position2D position2)
    Get the stream of slots drawing the outline of the area between 2 positions
    static @NotNull me.hsgamer.hscore.ui.Position2D
    toPosition(int slot)
    Convert the slot to the position
    static int
    toSlot(int x, int y)
    Get the raw slot from the position
    static int
    toSlot(@NotNull me.hsgamer.hscore.ui.Position2D position)
    Get the raw slot from the position

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • toSlot

      public static int toSlot(int x, int y)
      Get the raw slot from the position
      Parameters:
      x - the x position
      y - the y position
      Returns:
      the raw slot
    • toPosition

      @NotNull public static @NotNull me.hsgamer.hscore.ui.Position2D toPosition(int slot)
      Convert the slot to the position
      Parameters:
      slot - the slot
      Returns:
      the position
    • toSlot

      public static int toSlot(@NotNull @NotNull me.hsgamer.hscore.ui.Position2D position)
      Get the raw slot from the position
      Parameters:
      position - the pair value for the position
      Returns:
      the raw slot
    • generateAreaSlots

      public static IntStream generateAreaSlots(int x1, int y1, int x2, int y2)
      Generate the stream of slots in the area between two positions
      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 stream of slots
    • generateAreaSlots

      @NotNull public static @NotNull IntStream generateAreaSlots(@NotNull @NotNull me.hsgamer.hscore.ui.Position2D position1, @NotNull @NotNull me.hsgamer.hscore.ui.Position2D position2)
      Generate the stream of slots in the area between two positions
      Parameters:
      position1 - the first position
      position2 - the second position
      Returns:
      the stream of slots
    • generateOutlineSlots

      @NotNull public static @NotNull IntStream generateOutlineSlots(int x1, int y1, int x2, int y2)
      Get the stream of slots drawing the outline of the area between 2 positions
      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 stream of slots
    • generateOutlineSlots

      @NotNull public static @NotNull IntStream generateOutlineSlots(me.hsgamer.hscore.ui.Position2D position1, me.hsgamer.hscore.ui.Position2D position2)
      Get the stream of slots drawing the outline of the area between 2 positions
      Parameters:
      position1 - the first position
      position2 - the second position
      Returns:
      the stream of slots