Class QueryTypes
java.lang.Object
org.spongepowered.api.item.inventory.query.QueryTypes
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DefaultedRegistryReference
<QueryType.TwoParam<Vector2i, Vector2i>> A grid query.static final DefaultedRegistryReference
<QueryType.OneParam<Class<? extends Inventory>>> Tests based on the class of the inventory.static final DefaultedRegistryReference
<QueryType.OneParam<Predicate<ItemStack>>> Allows a custom condition for the items contained within an item stack.static final DefaultedRegistryReference
<QueryType.OneParam<ItemStack>> Tests for an exact match of the item stack contained in each slot.static final DefaultedRegistryReference
<QueryType.OneParam<ItemStack>> Tests for an exact match of the item stack contained in each slot, with the exception of the quantity.static final DefaultedRegistryReference
<QueryType.OneParam<ItemType>> Tests for a match of the type of item contained in each slot.static final DefaultedRegistryReference
<QueryType.OneParam<KeyValueMatcher<?>>> Tests based on an inventory property present on the target inventory.static final DefaultedRegistryReference
<QueryType.NoParam> Query for a modified order of slots in a player inventory.static final DefaultedRegistryReference
<QueryType.NoParam> Query for a reverse order of slots.static final DefaultedRegistryReference
<QueryType.OneParam<Class<?>>> Tests based on the class of the inventory. -
Method Summary
-
Field Details
-
INVENTORY_TYPE
public static final DefaultedRegistryReference<QueryType.OneParam<Class<? extends Inventory>>> INVENTORY_TYPETests based on the class of the inventory. -
ITEM_STACK_CUSTOM
public static final DefaultedRegistryReference<QueryType.OneParam<Predicate<ItemStack>>> ITEM_STACK_CUSTOMAllows a custom condition for the items contained within an item stack. -
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_QUANTITYTests 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:
-
ITEM_TYPE
Tests for a match of the type of item contained in each slot.- See Also:
-
KEY_VALUE
Tests based on an inventory property present on the target inventory.- See Also:
-
TYPE
Tests based on the class of the inventory. -
PLAYER_PRIMARY_HOTBAR_FIRST
Query for a modified order of slots in a player inventory. Ordering theHotbar
before thePrimaryPlayerInventory
-
REVERSE
Query for a reverse order of slots. -
GRID
A grid query. Only works on grids. The first value is the offset the second value is the grid size.
-
-
Method Details
-
registry
-