Class CombinedFixedItemInv.OfCopying<InvType extends FixedItemInv.CopyingFixedItemInv>
java.lang.Object
alexiil.mc.lib.attributes.misc.AbstractCombined<InvType>
alexiil.mc.lib.attributes.item.impl.CombinedFixedItemInvView<InvType>
alexiil.mc.lib.attributes.item.impl.CombinedFixedItemInv<InvType>
alexiil.mc.lib.attributes.item.impl.CombinedFixedItemInv.OfCopying<InvType>
- All Implemented Interfaces:
- Convertible,- AbstractItemInvView,- FixedItemInv,- FixedItemInv.CopyingFixedItemInv,- FixedItemInvView,- Combined
- Enclosing class:
- CombinedFixedItemInv<InvType extends FixedItemInv>
public static class CombinedFixedItemInv.OfCopying<InvType extends FixedItemInv.CopyingFixedItemInv>
extends CombinedFixedItemInv<InvType>
implements FixedItemInv.CopyingFixedItemInv
- 
Nested Class SummaryNested classes/interfaces inherited from class alexiil.mc.lib.attributes.item.impl.CombinedFixedItemInvCombinedFixedItemInv.OfCopying<InvType extends FixedItemInv.CopyingFixedItemInv>, CombinedFixedItemInv.OfModifiable<InvType extends FixedItemInv.ModifiableFixedItemInv>Nested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.AbstractItemInvViewAbstractItemInvView.DefaultChangeTrackerNested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.FixedItemInvFixedItemInv.CopyingFixedItemInv, FixedItemInv.ModifiableFixedItemInv
- 
Field SummaryFields inherited from class alexiil.mc.lib.attributes.item.impl.CombinedFixedItemInvViewinvSize, subSlotStartIndex, viewsFields inherited from class alexiil.mc.lib.attributes.misc.AbstractCombinedlist
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddListener(ItemInvSlotChangeListener listener, ListenerRemovalToken removalToken)Adds the given listener to this inventory, such that theItemInvSlotChangeListener.onChange(FixedItemInvView, int, ItemStack, ItemStack)will be called every time that this inventory changes.net.minecraft.item.ItemStackgetUnmodifiableInvStack(int slot)Methods inherited from class alexiil.mc.lib.attributes.item.impl.CombinedFixedItemInvcreate, getMappedInv, getSubInv, setInvStackMethods inherited from class alexiil.mc.lib.attributes.item.impl.CombinedFixedItemInvViewaddListener, createView, getChangeValue, getFilterForSlot, getInv, getInvIndex, getInvStack, getMaxAmount, getSlotCount, getSubSlot, isItemValidForSlotMethods inherited from class alexiil.mc.lib.attributes.misc.AbstractCombinedequals, getSubObject, getSubObjectCount, hashCode, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface alexiil.mc.lib.attributes.item.AbstractItemInvViewgetChangeValueMethods inherited from interface alexiil.mc.lib.attributes.item.FixedItemInvcreateLimitedFixedInv, extractStack, forceSetInvStack, getExtractable, getGroupedInv, getInsertable, getMappedInv, getSubInv, getTransferable, insertStack, isItemValidForSlot, modifySlot, setInvStack, slotIterableMethods inherited from interface alexiil.mc.lib.attributes.item.FixedItemInv.CopyingFixedItemInvaddListener, getInvStack, getSlotMethods inherited from interface alexiil.mc.lib.attributes.item.FixedItemInvViewconvertTo, getFilterForSlot, getFixedView, getMaxAmount, getSlotCount, offerSelfAsAttribute, stackIterable
- 
Constructor Details- 
OfCopying
 
- 
- 
Method Details- 
getUnmodifiableInvStackpublic net.minecraft.item.ItemStack getUnmodifiableInvStack(int slot)- Specified by:
- getUnmodifiableInvStackin interface- FixedItemInv.CopyingFixedItemInv
- Returns:
- The ItemStackthat is held by this inventory. Modifying the returnedItemStackin any way will (most likely - depending on the implementation) throw an exception (at some point).
 
- 
addListenerpublic ListenerToken addListener(ItemInvSlotChangeListener listener, ListenerRemovalToken removalToken)Description copied from interface:FixedItemInv.CopyingFixedItemInvAdds the given listener to this inventory, such that theItemInvSlotChangeListener.onChange(FixedItemInvView, int, ItemStack, ItemStack)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- FixedItemInv.CopyingFixedItemInv
- 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.
 
 
-