Class StandardDropPattern
- java.lang.Object
-
- org.dreambot.api.methods.container.impl.StandardDropPattern
-
- All Implemented Interfaces:
DropPattern
public class StandardDropPattern extends java.lang.Object implements DropPattern
This class can be used to create drop patterns based on slot position easily. If you need more control or want a drop pattern that isn't based on slot position, you can implement theDropPattern
interface on a class of your own.
-
-
Field Summary
Fields Modifier and Type Field Description static DropPattern
LEFT_TO_RIGHT_THEN_DOWN
static DropPattern
TOP_TO_BOTTOM_THEN_RIGHT
-
Constructor Summary
Constructors Constructor Description StandardDropPattern(int... inventorySlotOrder)
Creates a StandardDropPattern based on slot position
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Comparator<Item>
getComparator()
-
-
-
Field Detail
-
LEFT_TO_RIGHT_THEN_DOWN
public static final DropPattern LEFT_TO_RIGHT_THEN_DOWN
-
TOP_TO_BOTTOM_THEN_RIGHT
public static final DropPattern TOP_TO_BOTTOM_THEN_RIGHT
-
-
Constructor Detail
-
StandardDropPattern
public StandardDropPattern(int... inventorySlotOrder)
Creates a StandardDropPattern based on slot position- Parameters:
inventorySlotOrder
- Slot ID's in order from first to be dropped to last to be dropped. Any missing slots will be dropped after any listed slots in ascending order. Slot ID's start at 0 with the top left item and end with 27 at the bottom right.
-
-
Method Detail
-
getComparator
public java.util.Comparator<Item> getComparator()
- Specified by:
getComparator
in interfaceDropPattern
-
-