Class QueryTypes
- java.lang.Object
-
- org.spongepowered.api.item.inventory.query.QueryTypes
-
public final class QueryTypes extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static DefaultedRegistryReference<QueryType.TwoParam<Vector2i,Vector2i>>
GRID
A grid query.static DefaultedRegistryReference<QueryType.OneParam<Class<? extends Inventory>>>
INVENTORY_TYPE
Tests based on the class of the inventory.static DefaultedRegistryReference<QueryType.OneParam<Predicate<ItemStack>>>
ITEM_STACK_CUSTOM
Allows a custom condition for the items contained within an item stack.static DefaultedRegistryReference<QueryType.OneParam<ItemStack>>
ITEM_STACK_EXACT
Tests for an exact match of the item stack contained in each slot.static DefaultedRegistryReference<QueryType.OneParam<ItemStack>>
ITEM_STACK_IGNORE_QUANTITY
Tests for an exact match of the item stack contained in each slot, with the exception of the quantity.static DefaultedRegistryReference<QueryType.OneParam<ItemType>>
ITEM_TYPE
Tests for a match of the type of item contained in each slot.static DefaultedRegistryReference<QueryType.OneParam<KeyValueMatcher<?>>>
KEY_VALUE
Tests based on an inventory property present on the target inventory.static DefaultedRegistryReference<QueryType.NoParam>
PLAYER_PRIMARY_HOTBAR_FIRST
Query for a modified order of slots in a player inventory.static DefaultedRegistryReference<QueryType.NoParam>
REVERSE
Query for a reverse order of slots.static DefaultedRegistryReference<QueryType.OneParam<Class<?>>>
TYPE
Tests based on the class of the inventory.
-
-
-
Field Detail
-
INVENTORY_TYPE
public static final DefaultedRegistryReference<QueryType.OneParam<Class<? extends Inventory>>> INVENTORY_TYPE
Tests based on the class of the inventory.
-
ITEM_STACK_CUSTOM
public static final DefaultedRegistryReference<QueryType.OneParam<Predicate<ItemStack>>> ITEM_STACK_CUSTOM
Allows a custom condition for the items contained within an item stack.
-
ITEM_STACK_EXACT
public static final DefaultedRegistryReference<QueryType.OneParam<ItemStack>> ITEM_STACK_EXACT
Tests for an exact match of the item stack contained in each slot.Generally uses
ItemStack
's#equals
method.
-
ITEM_STACK_IGNORE_QUANTITY
public static final DefaultedRegistryReference<QueryType.OneParam<ItemStack>> ITEM_STACK_IGNORE_QUANTITY
Tests for an exact match of the item stack contained in each slot, with the exception of the quantity. This allows testing for custom data on item stacks that may be moved and stacked by players.- See Also:
ItemStack.equalTo(ItemStack)
-
ITEM_TYPE
public static final DefaultedRegistryReference<QueryType.OneParam<ItemType>> ITEM_TYPE
Tests for a match of the type of item contained in each slot.- See Also:
()
-
KEY_VALUE
public static final DefaultedRegistryReference<QueryType.OneParam<KeyValueMatcher<?>>> KEY_VALUE
Tests based on an inventory property present on the target inventory.- See Also:
Inventory.get(Inventory, Key)
-
TYPE
public static final DefaultedRegistryReference<QueryType.OneParam<Class<?>>> TYPE
Tests based on the class of the inventory.
-
PLAYER_PRIMARY_HOTBAR_FIRST
public static final DefaultedRegistryReference<QueryType.NoParam> PLAYER_PRIMARY_HOTBAR_FIRST
Query for a modified order of slots in a player inventory. Ordering theHotbar
before thePrimaryPlayerInventory
-
REVERSE
public static final DefaultedRegistryReference<QueryType.NoParam> REVERSE
Query for a reverse order of slots.
-
GRID
public static final DefaultedRegistryReference<QueryType.TwoParam<Vector2i,Vector2i>> GRID
A grid query. Only works on grids. The first value is the offset the second value is the grid size.
-
-