Class InventoryHelper
java.lang.Object
com.hypixel.hytale.server.npc.util.InventoryHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final short -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckHotbarSlot(Inventory inventory, byte slot) static booleancheckOffHandSlot(Inventory inventory, byte slot) static booleanclearItemInHand(Inventory inventory, byte slotHint) static booleancontainsItem(Inventory inventory, String name) static booleancontainsItem(Inventory inventory, List<String> name) static intcountFreeSlots(ItemContainer container) static intcountItems(ItemContainer container, List<String> name) static ItemStackcreateItem(String name) static bytefindHotbarEmptySlot(Inventory inventory) static bytefindHotbarSlotWithItem(Inventory inventory, String name) static shortfindHotbarSlotWithItem(Inventory inventory, List<String> name) static shortfindInventorySlotWithItem(Inventory inventory, String name) static shortfindInventorySlotWithItem(Inventory inventory, List<String> name) static booleanstatic booleanhotbarContainsItem(Inventory inventory, String name) static booleanhotbarContainsItem(Inventory inventory, List<String> name) static booleanitemDropListKeyExists(String name) static booleanitemKeyExists(String name) static booleanitemKeyIsBlockType(String name) static booleanmatchesItem(String pattern, ItemStack itemStack) static booleanmatchesItem(List<String> patterns, ItemStack itemStack) protected static booleanmatchesPatterns(List<String> patterns, String name) static voidremoveItemInHand(Inventory inventory) static booleansetHotbarItem(Inventory inventory, String name, byte slot) static voidsetHotbarSlot(Inventory inventory, byte slot) static booleansetOffHandItem(Inventory inventory, String name, byte slot) static voidsetOffHandSlot(Inventory inventory, byte slot) static booleanuseArmor(ItemContainer armorInventory, ItemStack itemStack) static booleanuseArmor(ItemContainer armorInventory, String armorItem) static booleanstatic boolean
-
Field Details
-
DEFAULT_NPC_HOTBAR_SLOTS
public static final short DEFAULT_NPC_HOTBAR_SLOTS- See Also:
-
MAX_NPC_HOTBAR_SLOTS
public static final short MAX_NPC_HOTBAR_SLOTS- See Also:
-
DEFAULT_NPC_INVENTORY_SLOTS
public static final short DEFAULT_NPC_INVENTORY_SLOTS- See Also:
-
DEFAULT_NPC_UTILITY_SLOTS
public static final short DEFAULT_NPC_UTILITY_SLOTS- See Also:
-
MAX_NPC_UTILITY_SLOTS
public static final short MAX_NPC_UTILITY_SLOTS- See Also:
-
DEFAULT_NPC_TOOL_SLOTS
public static final short DEFAULT_NPC_TOOL_SLOTS- See Also:
-
MAX_NPC_INVENTORY_SLOTS
public static final short MAX_NPC_INVENTORY_SLOTS- See Also:
-
-
Constructor Details
-
InventoryHelper
private InventoryHelper()
-
-
Method Details
-
matchesItem
-
matchesItem
-
matchesPatterns
-
itemKeyExists
-
itemKeyIsBlockType
-
itemDropListKeyExists
-
findHotbarSlotWithItem
-
findHotbarSlotWithItem
-
findHotbarEmptySlot
-
findInventorySlotWithItem
-
findInventorySlotWithItem
-
countItems
-
countFreeSlots
-
hotbarContainsItem
-
hotbarContainsItem
-
holdsItem
-
containsItem
-
containsItem
-
clearItemInHand
-
removeItemInHand
-
checkHotbarSlot
-
checkOffHandSlot
-
setHotbarSlot
-
setOffHandSlot
-
setHotbarItem
-
setOffHandItem
-
useItem
-
createItem
-
useItem
-
useArmor
-
useArmor
public static boolean useArmor(@Nonnull ItemContainer armorInventory, @Nullable ItemStack itemStack)
-