Class DelegateItemContainer<T extends ItemContainer>
java.lang.Object
com.hypixel.hytale.server.core.inventory.container.ItemContainer
com.hypixel.hytale.server.core.inventory.container.DelegateItemContainer<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hypixel.hytale.server.core.inventory.container.ItemContainer
ItemContainer.ItemContainerChangeEvent, ItemContainer.TempItemData -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Tprivate FilterTypeprivate final Map<FilterActionType, com.hypixel.fastutil.ints.Int2ObjectConcurrentHashMap<SlotFilter>> Fields inherited from class com.hypixel.hytale.server.core.inventory.container.ItemContainer
CODEC, DEFAULT_ADD_ALL_OR_NOTHING, DEFAULT_EXACT_AMOUNT, DEFAULT_FILTER, DEFAULT_FULL_STACKS, DEFAULT_REMOVE_ALL_OR_NOTHING, externalChangeEventRegistry, internalChangeEventRegistry, LOGGER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancantAddToSlot(short slot, ItemStack itemStack, ItemStack slotItemStack) protected booleancantDropFromSlot(short slot) protected booleancantMoveToSlot(ItemContainer fromContainer, short slotFrom) protected booleancantRemoveFromSlot(short slot) clear()clone()booleanshortinthashCode()protected ClearTransactionprotected ItemStackinternal_getSlot(short slot) protected ItemStackinternal_removeSlot(short slot) protected ItemStackinternal_setSlot(short slot, ItemStack itemStack) booleanisEmpty()protected <X,V> V readAction(Function<X, V> action, X x) protected <V> VreadAction(Supplier<V> action) registerChangeEvent(short priority, Consumer<ItemContainer.ItemContainerChangeEvent> consumer) protected voidsendUpdate(Transaction transaction) voidsetGlobalFilter(FilterType globalFilter) voidsetSlotFilter(FilterActionType actionType, short slot, SlotFilter filter) private booleantestFilter(FilterActionType actionType, short slot, ItemStack itemStack) protected <X,V> V writeAction(Function<X, V> action, X x) protected <V> VwriteAction(Supplier<V> action) Methods inherited from class com.hypixel.hytale.server.core.inventory.container.ItemContainer
addItemStack, addItemStack, addItemStacks, addItemStacks, addItemStacksOrdered, addItemStacksOrdered, addItemStacksOrdered, addItemStacksOrdered, addItemStackToSlot, addItemStackToSlot, canAddItemStack, canAddItemStack, canAddItemStacks, canAddItemStacks, canAddItemStackToSlot, canRemoveItemStack, canRemoveItemStack, canRemoveItemStacks, canRemoveItemStacks, canRemoveMaterial, canRemoveMaterial, canRemoveMaterials, canRemoveMaterials, canRemoveResource, canRemoveResource, canRemoveResources, canRemoveResources, canRemoveTag, canRemoveTag, combineItemStacksIntoSlot, containsContainer, containsItemStacksStackableWith, copy, countItemStacks, doMigration, dropAllItemStacks, dropAllItemStacks, ensureContainerCapacity, forEach, forEachWithMeta, getItemStack, getMatchingResourceType, getNewContainer, getSlotMaterialsToRemove, internal_combineItemStacksIntoSlot, internal_moveAllItemStacksTo, internal_moveItemStackFromSlot, internal_moveItemStackFromSlot, internal_moveItemStackFromSlot, internal_removeItemStack, internal_replaceItemStack, internal_sortItems, internal_swapItems, internal_swapItems, moveAllItemStacksTo, moveAllItemStacksTo, moveItemStackFromSlot, moveItemStackFromSlot, moveItemStackFromSlot, moveItemStackFromSlot, moveItemStackFromSlot, moveItemStackFromSlot, moveItemStackFromSlot, moveItemStackFromSlot, moveItemStackFromSlot, moveItemStackFromSlotToSlot, moveItemStackFromSlotToSlot, quickStackTo, registerChangeEvent, registerChangeEvent, removeAllItemStacks, removeItemStack, removeItemStack, removeItemStackFromSlot, removeItemStackFromSlot, removeItemStackFromSlot, removeItemStackFromSlot, removeItemStackFromSlot, removeItemStackFromSlot, removeItemStacks, removeItemStacks, removeMaterial, removeMaterial, removeMaterialFromSlot, removeMaterialFromSlot, removeMaterials, removeMaterials, removeMaterialsOrdered, removeMaterialsOrdered, removeMaterialsOrdered, removeResource, removeResource, removeResourceFromSlot, removeResourceFromSlot, removeResources, removeResources, removeTag, removeTag, removeTagFromSlot, removeTagFromSlot, replaceAll, replaceItemStackInSlot, setItemStackForSlot, setItemStackForSlot, sortItems, swapItems, toPacket, toProtocolMap, validateQuantity, validateSlotIndex
-
Field Details
-
delegate
-
slotFilters
private final Map<FilterActionType,com.hypixel.fastutil.ints.Int2ObjectConcurrentHashMap<SlotFilter>> slotFilters -
globalFilter
-
-
Constructor Details
-
DelegateItemContainer
-
-
Method Details
-
getDelegate
-
readAction
- Specified by:
readActionin classItemContainer
-
readAction
- Specified by:
readActionin classItemContainer
-
writeAction
- Specified by:
writeActionin classItemContainer
-
writeAction
- Specified by:
writeActionin classItemContainer
-
internal_clear
- Specified by:
internal_clearin classItemContainer
-
internal_getSlot
- Specified by:
internal_getSlotin classItemContainer
-
internal_setSlot
- Specified by:
internal_setSlotin classItemContainer
-
internal_removeSlot
- Specified by:
internal_removeSlotin classItemContainer
-
cantAddToSlot
- Specified by:
cantAddToSlotin classItemContainer
-
cantRemoveFromSlot
protected boolean cantRemoveFromSlot(short slot) - Specified by:
cantRemoveFromSlotin classItemContainer
-
cantDropFromSlot
protected boolean cantDropFromSlot(short slot) - Specified by:
cantDropFromSlotin classItemContainer
-
cantMoveToSlot
- Specified by:
cantMoveToSlotin classItemContainer
-
testFilter
-
getCapacity
public short getCapacity()- Specified by:
getCapacityin classItemContainer
-
clear
- Overrides:
clearin classItemContainer
-
clone
- Specified by:
clonein classItemContainer
-
isEmpty
public boolean isEmpty()- Overrides:
isEmptyin classItemContainer
-
setGlobalFilter
- Specified by:
setGlobalFilterin classItemContainer
-
setSlotFilter
- Specified by:
setSlotFilterin classItemContainer
-
registerChangeEvent
@Nonnull public EventRegistration registerChangeEvent(short priority, @Nonnull Consumer<ItemContainer.ItemContainerChangeEvent> consumer) - Overrides:
registerChangeEventin classItemContainer
-
sendUpdate
- Overrides:
sendUpdatein classItemContainer
-
equals
-
hashCode
public int hashCode()
-