Class ItemContainer
java.lang.Object
com.hypixel.hytale.server.core.inventory.container.ItemContainer
- Direct Known Subclasses:
CombinedItemContainer,DelegateItemContainer,EmptyItemContainer,ItemStackItemContainer,SimpleItemContainer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CodecMapCodec<ItemContainer> static final booleanstatic final booleanstatic final booleanstatic final booleanstatic final booleanprotected final com.hypixel.hytale.event.SyncEventBusRegistry<Void, ItemContainer.ItemContainerChangeEvent> protected final com.hypixel.hytale.event.SyncEventBusRegistry<Void, ItemContainer.ItemContainerChangeEvent> protected static final com.hypixel.hytale.logger.HytaleLogger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddItemStack(ItemStack itemStack) addItemStack(ItemStack itemStack, boolean allOrNothing, boolean fullStacks, boolean filter) addItemStacks(List<ItemStack> itemStacks) addItemStacks(List<ItemStack> itemStacks, boolean allOrNothing, boolean fullStacks, boolean filter) addItemStacksOrdered(short offset, List<ItemStack> itemStacks) addItemStacksOrdered(short offset, List<ItemStack> itemStacks, boolean allOrNothing, boolean filter) addItemStacksOrdered(List<ItemStack> itemStacks) addItemStacksOrdered(List<ItemStack> itemStacks, boolean allOrNothing, boolean filter) addItemStackToSlot(short slot, ItemStack itemStack) addItemStackToSlot(short slot, ItemStack itemStack, boolean allOrNothing, boolean filter) booleancanAddItemStack(ItemStack itemStack) booleancanAddItemStack(ItemStack itemStack, boolean fullStacks, boolean filter) booleancanAddItemStacks(List<ItemStack> itemStacks) booleancanAddItemStacks(List<ItemStack> itemStacks, boolean fullStacks, boolean filter) booleancanAddItemStackToSlot(short slot, ItemStack itemStack, boolean allOrNothing, boolean filter) booleancanRemoveItemStack(ItemStack itemStack) booleancanRemoveItemStack(ItemStack itemStack, boolean exactAmount, boolean filter) booleancanRemoveItemStacks(List<ItemStack> itemStacks) booleancanRemoveItemStacks(List<ItemStack> itemStacks, boolean exactAmount, boolean filter) booleancanRemoveMaterial(MaterialQuantity material) booleancanRemoveMaterial(MaterialQuantity material, boolean exactAmount, boolean filter) booleancanRemoveMaterials(List<MaterialQuantity> materials) booleancanRemoveMaterials(List<MaterialQuantity> materials, boolean exactAmount, boolean filter) booleancanRemoveResource(ResourceQuantity resource) booleancanRemoveResource(ResourceQuantity resource, boolean exactAmount, boolean filter) booleancanRemoveResources(List<ResourceQuantity> resources) booleancanRemoveResources(List<ResourceQuantity> resources, boolean exactAmount, boolean filter) booleancanRemoveTag(int tagIndex, int quantity) booleancanRemoveTag(int tagIndex, int quantity, boolean exactAmount, boolean filter) protected abstract booleancantAddToSlot(short var1, ItemStack var2, ItemStack var3) protected abstract booleancantDropFromSlot(short var1) protected abstract booleancantMoveToSlot(ItemContainer var1, short var2) protected abstract booleancantRemoveFromSlot(short var1) clear()abstract ItemContainerclone()combineItemStacksIntoSlot(ItemContainer containerTo, short slotTo) booleancontainsContainer(ItemContainer itemContainer) booleancontainsItemStacksStackableWith(ItemStack itemStack) static <T extends ItemContainer>
Tcopy(ItemContainer from, T to, List<ItemStack> remainder) intcountItemStacks(Predicate<ItemStack> itemPredicate) voiddoMigration(Function<String, String> blockMigration) dropAllItemStacks(boolean filter) static <T extends ItemContainer>
TensureContainerCapacity(T inputContainer, short capacity, com.hypixel.fastutil.shorts.Short2ObjectConcurrentHashMap.ShortFunction<T> newContainerSupplier, List<ItemStack> remainder) voidforEach(ShortObjectConsumer<ItemStack> action) <T> voidforEachWithMeta(com.hypixel.fastutil.shorts.Short2ObjectConcurrentHashMap.ShortBiObjConsumer<ItemStack, T> consumer, T meta) abstract shortgetItemStack(short slot) static ItemResourceTypegetMatchingResourceType(Item item, String resourceId) static ItemContainergetNewContainer(short capacity, com.hypixel.fastutil.shorts.Short2ObjectConcurrentHashMap.ShortFunction<ItemContainer> supplier) getSlotMaterialsToRemove(List<MaterialQuantity> materials, boolean exactAmount, boolean filter) protected abstract ClearTransactionprotected ListTransaction<MoveTransaction<SlotTransaction>> internal_combineItemStacksIntoSlot(ItemContainer containerTo, short slotTo) protected abstract ItemStackinternal_getSlot(short var1) protected ListTransaction<MoveTransaction<ItemStackTransaction>> internal_moveAllItemStacksTo(Predicate<ItemStack> itemPredicate, ItemContainer[] containerTo) internal_moveItemStackFromSlot(short slot, boolean allOrNothing, boolean filter, ItemContainer[] containerTo) internal_moveItemStackFromSlot(short slot, int quantity, boolean allOrNothing, boolean filter, ItemContainer[] containerTo) protected MoveTransaction<ItemStackTransaction> internal_moveItemStackFromSlot(short slot, int quantity, ItemContainer containerTo, boolean allOrNothing, boolean filter) protected MoveTransaction<SlotTransaction> internal_moveItemStackFromSlot(short slot, int quantity, ItemContainer containerTo, short slotTo, boolean filter) protected MoveTransaction<ItemStackTransaction> internal_moveItemStackFromSlot(short slot, ItemContainer containerTo, boolean allOrNothing, boolean filter) internal_removeItemStack(short slot, int quantityToRemove) Deprecated.protected abstract ItemStackinternal_removeSlot(short var1) protected ItemStackSlotTransactioninternal_replaceItemStack(short slot, ItemStack itemStackToRemove, ItemStack itemStack) protected abstract ItemStackinternal_setSlot(short var1, ItemStack var2) protected ListTransaction<SlotTransaction> internal_sortItems(SortType sort) protected ListTransaction<MoveTransaction<SlotTransaction>> internal_swapItems(short srcPos, ItemContainer containerTo, short destPos, short length) protected MoveTransaction<SlotTransaction> internal_swapItems(ItemContainer containerTo, short slotFrom, short slotTo) booleanisEmpty()moveAllItemStacksTo(ItemContainer... containerTo) moveAllItemStacksTo(Predicate<ItemStack> itemPredicate, ItemContainer... containerTo) moveItemStackFromSlot(short slot, boolean allOrNothing, boolean filter, ItemContainer... containerTo) moveItemStackFromSlot(short slot, int quantity, boolean allOrNothing, boolean filter, ItemContainer... containerTo) moveItemStackFromSlot(short slot, int quantity, ItemContainer containerTo) moveItemStackFromSlot(short slot, int quantity, ItemContainer... containerTo) moveItemStackFromSlot(short slot, int quantity, ItemContainer containerTo, boolean allOrNothing, boolean filter) moveItemStackFromSlot(short slot, ItemContainer containerTo) moveItemStackFromSlot(short slot, ItemContainer... containerTo) moveItemStackFromSlot(short slot, ItemContainer containerTo, boolean filter) moveItemStackFromSlot(short slot, ItemContainer containerTo, boolean allOrNothing, boolean filter) moveItemStackFromSlotToSlot(short slot, int quantity, ItemContainer containerTo, short slotTo) moveItemStackFromSlotToSlot(short slot, int quantity, ItemContainer containerTo, short slotTo, boolean filter) quickStackTo(ItemContainer... containerTo) protected abstract <X,V> V readAction(Function<X, V> var1, X var2) protected abstract <V> VreadAction(Supplier<V> var1) registerChangeEvent(short priority, Consumer<ItemContainer.ItemContainerChangeEvent> consumer) registerChangeEvent(EventPriority priority, Consumer<ItemContainer.ItemContainerChangeEvent> consumer) removeItemStack(ItemStack itemStack) removeItemStack(ItemStack itemStack, boolean allOrNothing, boolean filter) removeItemStackFromSlot(short slot) removeItemStackFromSlot(short slot, boolean filter) removeItemStackFromSlot(short slot, int quantityToRemove) removeItemStackFromSlot(short slot, int quantityToRemove, boolean allOrNothing, boolean filter) removeItemStackFromSlot(short slot, ItemStack itemStackToRemove, int quantityToRemove) removeItemStackFromSlot(short slot, ItemStack itemStackToRemove, int quantityToRemove, boolean allOrNothing, boolean filter) removeItemStacks(List<ItemStack> itemStacks) removeItemStacks(List<ItemStack> itemStacks, boolean allOrNothing, boolean filter) removeMaterial(MaterialQuantity material) removeMaterial(MaterialQuantity material, boolean allOrNothing, boolean exactAmount, boolean filter) removeMaterialFromSlot(short slot, MaterialQuantity material) removeMaterialFromSlot(short slot, MaterialQuantity material, boolean allOrNothing, boolean exactAmount, boolean filter) removeMaterials(List<MaterialQuantity> materials) removeMaterials(List<MaterialQuantity> materials, boolean allOrNothing, boolean exactAmount, boolean filter) removeMaterialsOrdered(short offset, List<MaterialQuantity> materials) removeMaterialsOrdered(short offset, List<MaterialQuantity> materials, boolean allOrNothing, boolean exactAmount, boolean filter) removeMaterialsOrdered(List<MaterialQuantity> materials, boolean allOrNothing, boolean exactAmount, boolean filter) removeResource(ResourceQuantity resource) removeResource(ResourceQuantity resource, boolean allOrNothing, boolean exactAmount, boolean filter) removeResourceFromSlot(short slot, ResourceQuantity resource) removeResourceFromSlot(short slot, ResourceQuantity resource, boolean allOrNothing, boolean exactAmount, boolean filter) removeResources(List<ResourceQuantity> resources) removeResources(List<ResourceQuantity> resources, boolean allOrNothing, boolean exactAmount, boolean filter) removeTag(int tagIndex, int quantity) removeTag(int tagIndex, int quantity, boolean allOrNothing, boolean exactAmount, boolean filter) removeTagFromSlot(short slot, int tagIndex, int quantity) removeTagFromSlot(short slot, int tagIndex, int quantity, boolean allOrNothing, boolean filter) private ListTransaction<ItemStackSlotTransaction> replaceAll(SlotReplacementFunction func, boolean ignoreEmpty) replaceItemStackInSlot(short slot, ItemStack itemStackToRemove, ItemStack itemStack) protected voidsendUpdate(Transaction transaction) abstract voidsetGlobalFilter(FilterType var1) setItemStackForSlot(short slot, ItemStack itemStack) setItemStackForSlot(short slot, ItemStack itemStack, boolean filter) abstract voidsetSlotFilter(FilterActionType var1, short var2, SlotFilter var3) swapItems(short srcPos, ItemContainer containerTo, short destPos, short length) toPacket()static voidvalidateQuantity(int quantity) static voidvalidateSlotIndex(short slot, int capacity) protected abstract <X,V> V writeAction(Function<X, V> var1, X var2) protected abstract <V> VwriteAction(Supplier<V> var1)
-
Field Details
-
CODEC
-
DEFAULT_ADD_ALL_OR_NOTHING
public static final boolean DEFAULT_ADD_ALL_OR_NOTHING- See Also:
-
DEFAULT_REMOVE_ALL_OR_NOTHING
public static final boolean DEFAULT_REMOVE_ALL_OR_NOTHING- See Also:
-
DEFAULT_FULL_STACKS
public static final boolean DEFAULT_FULL_STACKS- See Also:
-
DEFAULT_EXACT_AMOUNT
public static final boolean DEFAULT_EXACT_AMOUNT- See Also:
-
DEFAULT_FILTER
public static final boolean DEFAULT_FILTER- See Also:
-
LOGGER
protected static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
externalChangeEventRegistry
protected final com.hypixel.hytale.event.SyncEventBusRegistry<Void,ItemContainer.ItemContainerChangeEvent> externalChangeEventRegistry -
internalChangeEventRegistry
protected final com.hypixel.hytale.event.SyncEventBusRegistry<Void,ItemContainer.ItemContainerChangeEvent> internalChangeEventRegistry
-
-
Constructor Details
-
ItemContainer
public ItemContainer()
-
-
Method Details
-
getCapacity
public abstract short getCapacity() -
setGlobalFilter
-
setSlotFilter
-
clone
-
readAction
-
readAction
-
writeAction
-
writeAction
-
internal_clear
-
internal_getSlot
-
internal_setSlot
-
internal_removeSlot
-
cantAddToSlot
-
cantRemoveFromSlot
protected abstract boolean cantRemoveFromSlot(short var1) -
cantDropFromSlot
protected abstract boolean cantDropFromSlot(short var1) -
cantMoveToSlot
-
toPacket
-
toProtocolMap
-
registerChangeEvent
public EventRegistration registerChangeEvent(@Nonnull Consumer<ItemContainer.ItemContainerChangeEvent> consumer) -
registerChangeEvent
public EventRegistration registerChangeEvent(@Nonnull EventPriority priority, @Nonnull Consumer<ItemContainer.ItemContainerChangeEvent> consumer) -
registerChangeEvent
public EventRegistration registerChangeEvent(short priority, @Nonnull Consumer<ItemContainer.ItemContainerChangeEvent> consumer) -
clear
-
canAddItemStackToSlot
public boolean canAddItemStackToSlot(short slot, @Nonnull ItemStack itemStack, boolean allOrNothing, boolean filter) -
addItemStackToSlot
@Nonnull public ItemStackSlotTransaction addItemStackToSlot(short slot, @Nonnull ItemStack itemStack) -
addItemStackToSlot
@Nonnull public ItemStackSlotTransaction addItemStackToSlot(short slot, @Nonnull ItemStack itemStack, boolean allOrNothing, boolean filter) -
setItemStackForSlot
-
setItemStackForSlot
@Nonnull public ItemStackSlotTransaction setItemStackForSlot(short slot, ItemStack itemStack, boolean filter) -
getItemStack
-
replaceItemStackInSlot
@Nonnull public ItemStackSlotTransaction replaceItemStackInSlot(short slot, ItemStack itemStackToRemove, ItemStack itemStack) -
replaceAll
-
replaceAll
private ListTransaction<ItemStackSlotTransaction> replaceAll(SlotReplacementFunction func, boolean ignoreEmpty) -
internal_replaceItemStack
protected ItemStackSlotTransaction internal_replaceItemStack(short slot, @Nullable ItemStack itemStackToRemove, ItemStack itemStack) -
removeItemStackFromSlot
-
removeItemStackFromSlot
-
removeItemStackFromSlot
-
removeItemStackFromSlot
@Nonnull public ItemStackSlotTransaction removeItemStackFromSlot(short slot, int quantityToRemove, boolean allOrNothing, boolean filter) -
internal_removeItemStack
@Deprecated public ItemStackSlotTransaction internal_removeItemStack(short slot, int quantityToRemove) Deprecated. -
removeItemStackFromSlot
@Nonnull public ItemStackSlotTransaction removeItemStackFromSlot(short slot, ItemStack itemStackToRemove, int quantityToRemove) -
removeItemStackFromSlot
@Nonnull public ItemStackSlotTransaction removeItemStackFromSlot(short slot, ItemStack itemStackToRemove, int quantityToRemove, boolean allOrNothing, boolean filter) -
removeMaterialFromSlot
@Nonnull public MaterialSlotTransaction removeMaterialFromSlot(short slot, @Nonnull MaterialQuantity material) -
removeMaterialFromSlot
@Nonnull public MaterialSlotTransaction removeMaterialFromSlot(short slot, @Nonnull MaterialQuantity material, boolean allOrNothing, boolean exactAmount, boolean filter) -
removeResourceFromSlot
@Nonnull public ResourceSlotTransaction removeResourceFromSlot(short slot, @Nonnull ResourceQuantity resource) -
removeResourceFromSlot
@Nonnull public ResourceSlotTransaction removeResourceFromSlot(short slot, @Nonnull ResourceQuantity resource, boolean allOrNothing, boolean exactAmount, boolean filter) -
removeTagFromSlot
-
removeTagFromSlot
@Nonnull public TagSlotTransaction removeTagFromSlot(short slot, int tagIndex, int quantity, boolean allOrNothing, boolean filter) -
moveItemStackFromSlot
@Nonnull public MoveTransaction<ItemStackTransaction> moveItemStackFromSlot(short slot, @Nonnull ItemContainer containerTo) -
moveItemStackFromSlot
@Nonnull public MoveTransaction<ItemStackTransaction> moveItemStackFromSlot(short slot, @Nonnull ItemContainer containerTo, boolean filter) -
moveItemStackFromSlot
@Nonnull public MoveTransaction<ItemStackTransaction> moveItemStackFromSlot(short slot, @Nonnull ItemContainer containerTo, boolean allOrNothing, boolean filter) -
internal_moveItemStackFromSlot
protected MoveTransaction<ItemStackTransaction> internal_moveItemStackFromSlot(short slot, @Nonnull ItemContainer containerTo, boolean allOrNothing, boolean filter) -
moveItemStackFromSlot
@Nonnull public MoveTransaction<ItemStackTransaction> moveItemStackFromSlot(short slot, int quantity, @Nonnull ItemContainer containerTo) -
moveItemStackFromSlot
@Nonnull public MoveTransaction<ItemStackTransaction> moveItemStackFromSlot(short slot, int quantity, @Nonnull ItemContainer containerTo, boolean allOrNothing, boolean filter) -
internal_moveItemStackFromSlot
protected MoveTransaction<ItemStackTransaction> internal_moveItemStackFromSlot(short slot, int quantity, @Nonnull ItemContainer containerTo, boolean allOrNothing, boolean filter) -
moveItemStackFromSlot
@Nonnull public ListTransaction<MoveTransaction<ItemStackTransaction>> moveItemStackFromSlot(short slot, ItemContainer... containerTo) -
moveItemStackFromSlot
@Nonnull public ListTransaction<MoveTransaction<ItemStackTransaction>> moveItemStackFromSlot(short slot, boolean allOrNothing, boolean filter, ItemContainer... containerTo) -
internal_moveItemStackFromSlot
@Nonnull private ListTransaction<MoveTransaction<ItemStackTransaction>> internal_moveItemStackFromSlot(short slot, boolean allOrNothing, boolean filter, @Nonnull ItemContainer[] containerTo) -
moveItemStackFromSlot
@Nonnull public ListTransaction<MoveTransaction<ItemStackTransaction>> moveItemStackFromSlot(short slot, int quantity, ItemContainer... containerTo) -
moveItemStackFromSlot
@Nonnull public ListTransaction<MoveTransaction<ItemStackTransaction>> moveItemStackFromSlot(short slot, int quantity, boolean allOrNothing, boolean filter, ItemContainer... containerTo) -
internal_moveItemStackFromSlot
@Nonnull private ListTransaction<MoveTransaction<ItemStackTransaction>> internal_moveItemStackFromSlot(short slot, int quantity, boolean allOrNothing, boolean filter, @Nonnull ItemContainer[] containerTo) -
moveItemStackFromSlotToSlot
@Nonnull public MoveTransaction<SlotTransaction> moveItemStackFromSlotToSlot(short slot, int quantity, @Nonnull ItemContainer containerTo, short slotTo) -
moveItemStackFromSlotToSlot
@Nonnull public MoveTransaction<SlotTransaction> moveItemStackFromSlotToSlot(short slot, int quantity, @Nonnull ItemContainer containerTo, short slotTo, boolean filter) -
internal_moveItemStackFromSlot
protected MoveTransaction<SlotTransaction> internal_moveItemStackFromSlot(short slot, int quantity, @Nonnull ItemContainer containerTo, short slotTo, boolean filter) -
moveAllItemStacksTo
@Nonnull public ListTransaction<MoveTransaction<ItemStackTransaction>> moveAllItemStacksTo(ItemContainer... containerTo) -
moveAllItemStacksTo
@Nonnull public ListTransaction<MoveTransaction<ItemStackTransaction>> moveAllItemStacksTo(Predicate<ItemStack> itemPredicate, ItemContainer... containerTo) -
internal_moveAllItemStacksTo
@Nonnull protected ListTransaction<MoveTransaction<ItemStackTransaction>> internal_moveAllItemStacksTo(@Nullable Predicate<ItemStack> itemPredicate, ItemContainer[] containerTo) -
quickStackTo
@Nonnull public ListTransaction<MoveTransaction<ItemStackTransaction>> quickStackTo(ItemContainer... containerTo) -
combineItemStacksIntoSlot
@Nonnull public ListTransaction<MoveTransaction<SlotTransaction>> combineItemStacksIntoSlot(@Nonnull ItemContainer containerTo, short slotTo) -
internal_combineItemStacksIntoSlot
@Nonnull protected ListTransaction<MoveTransaction<SlotTransaction>> internal_combineItemStacksIntoSlot(@Nonnull ItemContainer containerTo, short slotTo) -
swapItems
@Nonnull public ListTransaction<MoveTransaction<SlotTransaction>> swapItems(short srcPos, @Nonnull ItemContainer containerTo, short destPos, short length) -
internal_swapItems
@Nonnull protected ListTransaction<MoveTransaction<SlotTransaction>> internal_swapItems(short srcPos, @Nonnull ItemContainer containerTo, short destPos, short length) -
internal_swapItems
@Nonnull protected MoveTransaction<SlotTransaction> internal_swapItems(@Nonnull ItemContainer containerTo, short slotFrom, short slotTo) -
canAddItemStack
-
canAddItemStack
-
addItemStack
-
addItemStack
@Nonnull public ItemStackTransaction addItemStack(@Nonnull ItemStack itemStack, boolean allOrNothing, boolean fullStacks, boolean filter) -
canAddItemStacks
-
canAddItemStacks
-
addItemStacks
-
addItemStacks
public ListTransaction<ItemStackTransaction> addItemStacks(@Nullable List<ItemStack> itemStacks, boolean allOrNothing, boolean fullStacks, boolean filter) -
addItemStacksOrdered
-
addItemStacksOrdered
public ListTransaction<ItemStackSlotTransaction> addItemStacksOrdered(short offset, List<ItemStack> itemStacks) -
addItemStacksOrdered
public ListTransaction<ItemStackSlotTransaction> addItemStacksOrdered(List<ItemStack> itemStacks, boolean allOrNothing, boolean filter) -
addItemStacksOrdered
public ListTransaction<ItemStackSlotTransaction> addItemStacksOrdered(short offset, @Nullable List<ItemStack> itemStacks, boolean allOrNothing, boolean filter) -
canRemoveItemStack
-
canRemoveItemStack
public boolean canRemoveItemStack(@Nullable ItemStack itemStack, boolean exactAmount, boolean filter) -
removeItemStack
-
removeItemStack
@Nonnull public ItemStackTransaction removeItemStack(@Nonnull ItemStack itemStack, boolean allOrNothing, boolean filter) -
canRemoveItemStacks
-
canRemoveItemStacks
-
removeItemStacks
-
removeItemStacks
public ListTransaction<ItemStackTransaction> removeItemStacks(@Nullable List<ItemStack> itemStacks, boolean allOrNothing, boolean filter) -
canRemoveTag
public boolean canRemoveTag(int tagIndex, int quantity) -
canRemoveTag
public boolean canRemoveTag(int tagIndex, int quantity, boolean exactAmount, boolean filter) -
removeTag
-
removeTag
@Nonnull public TagTransaction removeTag(int tagIndex, int quantity, boolean allOrNothing, boolean exactAmount, boolean filter) -
canRemoveResource
-
canRemoveResource
public boolean canRemoveResource(@Nullable ResourceQuantity resource, boolean exactAmount, boolean filter) -
removeResource
-
removeResource
@Nonnull public ResourceTransaction removeResource(@Nonnull ResourceQuantity resource, boolean allOrNothing, boolean exactAmount, boolean filter) -
canRemoveResources
-
canRemoveResources
public boolean canRemoveResources(@Nullable List<ResourceQuantity> resources, boolean exactAmount, boolean filter) -
removeResources
-
removeResources
public ListTransaction<ResourceTransaction> removeResources(@Nullable List<ResourceQuantity> resources, boolean allOrNothing, boolean exactAmount, boolean filter) -
canRemoveMaterial
-
canRemoveMaterial
public boolean canRemoveMaterial(@Nullable MaterialQuantity material, boolean exactAmount, boolean filter) -
removeMaterial
-
removeMaterial
@Nonnull public MaterialTransaction removeMaterial(@Nonnull MaterialQuantity material, boolean allOrNothing, boolean exactAmount, boolean filter) -
canRemoveMaterials
-
canRemoveMaterials
public boolean canRemoveMaterials(@Nullable List<MaterialQuantity> materials, boolean exactAmount, boolean filter) -
getSlotMaterialsToRemove
public List<TestRemoveItemSlotResult> getSlotMaterialsToRemove(@Nullable List<MaterialQuantity> materials, boolean exactAmount, boolean filter) -
removeMaterials
-
removeMaterials
public ListTransaction<MaterialTransaction> removeMaterials(@Nullable List<MaterialQuantity> materials, boolean allOrNothing, boolean exactAmount, boolean filter) -
removeMaterialsOrdered
public ListTransaction<MaterialSlotTransaction> removeMaterialsOrdered(short offset, List<MaterialQuantity> materials) -
removeMaterialsOrdered
public ListTransaction<MaterialSlotTransaction> removeMaterialsOrdered(List<MaterialQuantity> materials, boolean allOrNothing, boolean exactAmount, boolean filter) -
removeMaterialsOrdered
public ListTransaction<MaterialSlotTransaction> removeMaterialsOrdered(short offset, @Nullable List<MaterialQuantity> materials, boolean allOrNothing, boolean exactAmount, boolean filter) -
isEmpty
public boolean isEmpty() -
countItemStacks
-
containsItemStacksStackableWith
-
forEach
-
forEachWithMeta
public <T> void forEachWithMeta(@Nonnull com.hypixel.fastutil.shorts.Short2ObjectConcurrentHashMap.ShortBiObjConsumer<ItemStack, T> consumer, T meta) -
removeAllItemStacks
-
dropAllItemStacks
-
dropAllItemStacks
-
sortItems
-
internal_sortItems
-
sendUpdate
-
containsContainer
-
doMigration
-
getMatchingResourceType
@Nullable public static ItemResourceType getMatchingResourceType(@Nonnull Item item, @Nonnull String resourceId) -
validateQuantity
public static void validateQuantity(int quantity) -
validateSlotIndex
public static void validateSlotIndex(short slot, int capacity) -
copy
@Nonnull public static <T extends ItemContainer> T copy(@Nonnull ItemContainer from, @Nonnull T to, @Nullable List<ItemStack> remainder) -
ensureContainerCapacity
public static <T extends ItemContainer> T ensureContainerCapacity(@Nullable T inputContainer, short capacity, @Nonnull com.hypixel.fastutil.shorts.Short2ObjectConcurrentHashMap.ShortFunction<T> newContainerSupplier, List<ItemStack> remainder) -
getNewContainer
public static ItemContainer getNewContainer(short capacity, @Nonnull com.hypixel.fastutil.shorts.Short2ObjectConcurrentHashMap.ShortFunction<ItemContainer> supplier)
-