Enum Class EmptyGroupedItemInv
- All Implemented Interfaces:
- AbstractItemInvView,- GroupedItemInv,- GroupedItemInvView,- ItemExtractable,- ItemInsertable,- ItemTransferable,- LimitedConsumer<net.minecraft.item.ItemStack>,- NullVariant,- Serializable,- Comparable<EmptyGroupedItemInv>,- Constable
GroupedItemInvView for an empty inventory.- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.AbstractItemInvViewAbstractItemInvView.DefaultChangeTrackerNested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.GroupedItemInvViewGroupedItemInvView.ItemInvStatistic
- 
Enum Constant SummaryEnum Constants
- 
Method SummaryModifier and TypeMethodDescriptionaddListener(InvMarkDirtyListener listener, ListenerRemovalToken removalToken)Adds the given listener to this inventory, such thatInvMarkDirtyListener.onMarkDirty(AbstractItemInvView)will be called every time that any stored stack is changed (either fromFixedItemInv.setInvStack(int, ItemStack, Simulation)orFixedItemInv.ModifiableFixedItemInv.markDirty()).addListener(ItemInvAmountChangeListener listener, ListenerRemovalToken removalToken)Adds the given listener to this inventory, such that theItemInvAmountChangeListener.onChange(GroupedItemInvView, ItemStack, int, int)will be called every time that this inventory changes.net.minecraft.item.ItemStackattemptAnyExtraction(int maxAmount, Simulation simulation)net.minecraft.item.ItemStackattemptExtraction(ItemFilter filter, int maxAmount, Simulation simulation)net.minecraft.item.ItemStackattemptInsertion(net.minecraft.item.ItemStack stack, Simulation simulation)Inserts the given stack into this insertable, and returns the excess.intgetAmount(ItemFilter filter)intgetAmount(net.minecraft.item.ItemStack stack)intgetCapacity(net.minecraft.item.ItemStack stack)intReturns anItemFilterto determine ifItemInsertable.attemptInsertion(ItemStack, Simulation)will accept a stack.intgetSpace(net.minecraft.item.ItemStack stack)getStatistics(ItemFilter filter)Set<net.minecraft.item.ItemStack>inttoString()static EmptyGroupedItemInvReturns the enum constant of this class with the specified name.static EmptyGroupedItemInv[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enumclone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfMethods inherited from interface alexiil.mc.lib.attributes.item.GroupedItemInvcreateLimitedGroupedInv, filteredMethods inherited from interface alexiil.mc.lib.attributes.item.GroupedItemInvViewgetStatistics, isEmptyMethods inherited from interface alexiil.mc.lib.attributes.item.ItemExtractablecouldExtractAnything, extract, extract, extractMethods inherited from interface alexiil.mc.lib.attributes.item.ItemInsertableinsert, offer, offer, wouldAccept, wouldPartiallyAccept
- 
Enum Constant Details- 
INSTANCE
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
getStatistics- Specified by:
- getStatisticsin interface- GroupedItemInvView
- Parameters:
- filter- The filter to check on.
- Returns:
- Statistics about the currently stored amount, capacity, and space for everything that matches the given filter.
 
- 
getStoredStacks- Specified by:
- getStoredStacksin interface- GroupedItemInvView
- Returns:
- a set containing all of the ItemStack's that are stored in the inventory. NOTE: This must return a set using one of theHash.Strategy's inItemStackCollectionsotherwise comparison methods won't work correctly!
 
- 
getAmount- Specified by:
- getAmountin interface- GroupedItemInvView
- Returns:
- A count of all the ItemStack's that match the given filter.
 
- 
getAmountpublic int getAmount(net.minecraft.item.ItemStack stack)- Specified by:
- getAmountin interface- GroupedItemInvView
- Parameters:
- stack- The stack to check for. Cannot be- empty.
- Returns:
- The total amount of the given stack that is stored in this inventory.
 
- 
getCapacitypublic int getCapacity(net.minecraft.item.ItemStack stack)- Specified by:
- getCapacityin interface- GroupedItemInvView
- Parameters:
- stack- The stack to check for. Must not be- empty.
- Returns:
- The total space that is available (right now!) to store the given stack.
 
- 
getSpacepublic int getSpace(net.minecraft.item.ItemStack stack)- Specified by:
- getSpacein interface- GroupedItemInvView
- Returns:
- The total space that could store the given stack, not including space that is currently taken up by the
         stack (so this should change with GroupedItemInvView.getAmount(ItemFilter)).
 
- 
getTotalCapacitypublic int getTotalCapacity()- Specified by:
- getTotalCapacityin interface- GroupedItemInvView
- Returns:
- The total capacity for every ItemStackthat can be stored in this inventory.NOTE: This value might not be equal to the sum of GroupedItemInvView.getCapacity(ItemStack)overGroupedItemInvView.getStoredStacks()!
 
- 
getInsertionFilterDescription copied from interface:ItemInsertableReturns anItemFilterto determine ifItemInsertable.attemptInsertion(ItemStack, Simulation)will accept a stack. The default implementation is a call toattemptInsertion(stack,Simulation.SIMULATE), and it is only useful to override this if the resulting filter contains information that might be usable by the caller.- Specified by:
- getInsertionFilterin interface- ItemInsertable
- Returns:
- A filter to determine if ItemInsertable.attemptInsertion(ItemStack, Simulation)will accept the entirety of a given stack.
 
- 
attemptInsertionpublic net.minecraft.item.ItemStack attemptInsertion(net.minecraft.item.ItemStack stack, Simulation simulation)Description copied from interface:ItemInsertableInserts the given stack into this insertable, and returns the excess.- Specified by:
- attemptInsertionin interface- ItemInsertable
- Parameters:
- stack- The incoming stack. Must not be modified by this call.
- simulation- If- Simulation.SIMULATEthen this shouldn't modify anything.
- Returns:
- the excess ItemStackthat wasn't accepted. This will be independent of this insertable, however it might be the given stack instead of a completely new object.
 
- 
attemptAnyExtractionDescription copied from interface:ItemExtractable- Specified by:
- attemptAnyExtractionin interface- ItemExtractable
 
- 
attemptExtractionpublic net.minecraft.item.ItemStack attemptExtraction(ItemFilter filter, int maxAmount, Simulation simulation)Description copied from interface:ItemExtractable- Specified by:
- attemptExtractionin interface- ItemExtractable
- maxAmount- The maximum number of items that can be extracted. Negative numbers throw an exception.
- simulation- If- Simulation.SIMULATEthen this should return the same result that a call with- Simulation.ACTIONwould do, but without modifying anything else.
- Returns:
- A new, independent ItemStackthat was extracted.
 
- 
addListenerpublic ListenerToken addListener(ItemInvAmountChangeListener listener, ListenerRemovalToken removalToken)Description copied from interface:GroupedItemInvViewAdds the given listener to this inventory, such that theItemInvAmountChangeListener.onChange(GroupedItemInvView, ItemStack, int, int)will be called every time that this inventory changes. However if this inventory doesn't support listeners then this will return a nulltoken.The default implementation refuses to accept any listeners, but implementations are highly encouraged to override this if they are able to! - Specified by:
- addListenerin interface- GroupedItemInvView
- removalToken- A token that will be called whenever the given listener is removed from this inventory (or if this inventory itself is unloaded or otherwise invalidated).
- Returns:
- A token that represents the listener, or null if the listener could not be added.
 
- 
getChangeValuepublic int getChangeValue()- Specified by:
- getChangeValuein interface- AbstractItemInvView
- Returns:
- A value that indicates whether an inventory might have changed if it differs from the last value
         returned. This number doesn't have to start at 0, but it must change every time that the inventory is
         changed, although it can change even without any observable changes to this inventory.
         Inventories that don't support this might increment the change number every time that this is called - so you should never write a loop that depends on the returned value settling down on a particular value. Inventories that support listenershighly encouraged to support this - by definition if an inventory knows when it changed then it should be able to count the number of changes. It is also implied that any changes to this value will also invoke every registeredInvMarkDirtyListener.The default implementation returns an ever-increasing value. 
 
- 
addListenerDescription copied from interface:AbstractItemInvViewAdds the given listener to this inventory, such thatInvMarkDirtyListener.onMarkDirty(AbstractItemInvView)will be called every time that any stored stack is changed (either fromFixedItemInv.setInvStack(int, ItemStack, Simulation)orFixedItemInv.ModifiableFixedItemInv.markDirty()).If the listener is registered (and thus this returns null) then it implies that AbstractItemInvView.getChangeValue()will change every time that the given listener is invoked, always just-before it is invoked.The default implementation refuses to accept any listeners, but implementations are highly encouraged to override this if they are able to! - Specified by:
- addListenerin interface- AbstractItemInvView
- Specified by:
- addListenerin interface- GroupedItemInvView
- removalToken- A token that will be called whenever the given listener is removed from this inventory (or if this inventory itself is unloaded or otherwise invalidated).
- Returns:
- A token that represents the listener, or null if the listener could not be added.
 
- 
getGroupedView- Specified by:
- getGroupedViewin interface- GroupedItemInvView
- Returns:
- A completely unmodifiable view of this GroupedItemInvView.
 
- 
getPureInsertable- Specified by:
- getPureInsertablein interface- ItemInsertable
- Returns:
- An object that only implements ItemInsertable, and does not expose any of the other modification methods that sibling or subclasses offer (likeItemExtractableorGroupedItemInv.
 
- 
getPureExtractable- Specified by:
- getPureExtractablein interface- ItemExtractable
- Returns:
- An object that only implements ItemExtractable, and does not expose any of the other modification methods that sibling or subclasses offer (likeItemInsertableorGroupedItemInv.
 
- 
toString- Overrides:
- toStringin class- Enum<EmptyGroupedItemInv>
 
 
-