Class SubFixedItemInvView
java.lang.Object
alexiil.mc.lib.attributes.item.impl.AbstractPartialFixedItemInvView
alexiil.mc.lib.attributes.item.impl.SubFixedItemInvView
- All Implemented Interfaces:
- Convertible,- AbstractItemInvView,- FixedItemInvView
- Direct Known Subclasses:
- SubFixedItemInv
Default implementation for 
FixedItemInvView.getSubInv(int, int).- 
Nested Class SummaryNested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.AbstractItemInvViewAbstractItemInvView.DefaultChangeTracker
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected intThe slots that we use.protected intThe slots that we use.Fields inherited from class alexiil.mc.lib.attributes.item.impl.AbstractPartialFixedItemInvViewinv
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected intgetInternalSlot(int slot)getMappedInv(int... slots)intgetSubInv(int fIndex, int tIndex)Equivalent toList.subList(int, int).Methods inherited from class alexiil.mc.lib.attributes.item.impl.AbstractPartialFixedItemInvViewaddListener, getChangeValue, getFilterForSlot, getInvStack, getMaxAmount, isItemValidForSlotMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface alexiil.mc.lib.attributes.item.FixedItemInvViewconvertTo, getGroupedInv, getSlot, offerSelfAsAttribute, slotIterable, stackIterable
- 
Field Details- 
fromIndexprotected final int fromIndexThe slots that we use.
- 
toIndexprotected final int toIndexThe slots that we use.
 
- 
- 
Constructor Details- 
SubFixedItemInvView
 
- 
- 
Method Details- 
getInternalSlotprotected final int getInternalSlot(int slot)- Specified by:
- getInternalSlotin class- AbstractPartialFixedItemInvView
- Returns:
- The slot that the internal AbstractPartialFixedItemInvView.invshould use.
 
- 
getSlotCountpublic int getSlotCount()- Returns:
- The number of slots in this inventory.
 
- 
getFixedView- Returns:
- An object that only implements FixedItemInvView, and does not expose the modification methods thatFixedItemInvdoes. Implementations that don't expose any modification methods themselves should override this method to just return themselves.
 
- 
getSubInvDescription copied from interface:FixedItemInvViewEquivalent toList.subList(int, int).- Parameters:
- fIndex- The first slot to expose
- tIndex- The slot after the last slot to expose.
- Returns:
- a view of this inventory that only exposes the given number of slots. Might return "this" if fromIndex is
         0 and toIndex is equal to FixedItemInvView.getSlotCount().
 
- 
getMappedInv- Parameters:
- slots- The slots to expose.
- Returns:
- a view of this inventory that only exposes the given slots. Might return "this" if the slot array is just
         [0,1, ... FixedItemInvView.getSlotCount()-1]
 
 
-