Class MaskUtils
java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.MaskUtils
The utility class for
Mask-
Method Summary
Modifier and TypeMethodDescriptionstatic IntStreamgenerateAreaSlots(int x1, int y1, int x2, int y2) Generate the stream of slots in the area between two positionsstatic @NotNull IntStreamgenerateAreaSlots(@NotNull me.hsgamer.hscore.ui.Position2D position1, @NotNull me.hsgamer.hscore.ui.Position2D position2) Generate the stream of slots in the area between two positionsstatic @NotNull IntStreamgenerateOutlineSlots(int x1, int y1, int x2, int y2) Get the stream of slots drawing the outline of the area between 2 positionsstatic @NotNull IntStreamgenerateOutlineSlots(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 positionsstatic @NotNull me.hsgamer.hscore.ui.Position2DtoPosition(int slot) Convert the slot to the positionstatic inttoSlot(int x, int y) Get the raw slot from the positionstatic inttoSlot(@NotNull me.hsgamer.hscore.ui.Position2D position) Get the raw slot from the position
-
Method Details
-
toSlot
public static int toSlot(int x, int y) Get the raw slot from the position- Parameters:
x- the x positiony- 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
Generate the stream of slots in the area between two positions- Parameters:
x1- the x of the first positiony1- the y of the first positionx2- the x of the second positiony2- 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 positionposition2- the second position- Returns:
- the stream of slots
-
generateOutlineSlots
Get the stream of slots drawing the outline of the area between 2 positions- Parameters:
x1- the x of the first positiony1- the y of the first positionx2- the x of the second positiony2- 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 positionposition2- the second position- Returns:
- the stream of slots
-