Class SimpleFixedItemInv
- All Implemented Interfaces:
Convertible,AbstractItemInvView,FixedItemInv,FixedItemInv.CopyingFixedItemInv,FixedItemInvView,ItemExtractable,ItemInsertable,ItemTransferable,LimitedConsumer<net.minecraft.item.ItemStack>,Saveable
@Deprecated public class SimpleFixedItemInv extends FullFixedItemInv
DirectFixedItemInv or FullFixedItemInv instead of this!
Full explanation: As of LBA 0.5.0 there's been a large change to how inventories work to be much closer
to vanilla - inventories no longer return immutable stacks from
FixedItemInvView.getInvStack(int), and 2 new sub-interfaces have been created to handle the
different ways of using this, either FixedItemInv.ModifiableFixedItemInv (which exposes a markDirty() method
just like vanilla Inventory does), or FixedItemInv.CopyingFixedItemInv (which returns copies of the
internal ItemStack and supports complete filtering and listener capabilities).
You should replace this class with either:
FullFixedItemInvif you either need exact per-slot listening or the full filtration capabilitiesDirectFixedItemInvif you'd rather use a more vanilla oriented approach of being able to directly modify items in an inventory.
-
Nested Class Summary
Nested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.AbstractItemInvView
AbstractItemInvView.DefaultChangeTrackerNested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.FixedItemInv
FixedItemInv.CopyingFixedItemInv, FixedItemInv.ModifiableFixedItemInv -
Field Summary
-
Constructor Summary
Constructors Constructor Description SimpleFixedItemInv(int invSize)Deprecated.You should use eitherDirectFixedItemInvorFullFixedItemInvinstead of this! -
Method Summary
Methods inherited from class alexiil.mc.lib.attributes.item.impl.FullFixedItemInv
addListener, attemptAnyExtraction, attemptExtraction, attemptInsertion, fireSlotChange, fromTag, getChangeValue, getFilterForSlot, getGroupedInv, getInsertionFilter, getSlotCount, getUnmodifiableInvStack, invalidateListeners, isItemValidForSlot, setInvStack, setOwnerListener, toTag, toTagMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface alexiil.mc.lib.attributes.item.FixedItemInv
createLimitedFixedInv, extractStack, forceSetInvStack, getExtractable, getInsertable, getMappedInv, getSubInv, getTransferable, insertStack, modifySlot, slotIterableMethods inherited from interface alexiil.mc.lib.attributes.item.FixedItemInv.CopyingFixedItemInv
addListener, getInvStack, getSlotMethods inherited from interface alexiil.mc.lib.attributes.item.FixedItemInvView
convertTo, getFixedView, getMaxAmount, offerSelfAsAttribute, stackIterableMethods inherited from interface alexiil.mc.lib.attributes.item.ItemExtractable
couldExtractAnything, extract, extract, extract, getPureExtractableMethods inherited from interface alexiil.mc.lib.attributes.item.ItemInsertable
getPureInsertable, insert, offer, offer, wouldAccept, wouldPartiallyAccept
-
Constructor Details
-
SimpleFixedItemInv
@Deprecated public SimpleFixedItemInv(int invSize)Deprecated.You should use eitherDirectFixedItemInvorFullFixedItemInvinstead of this!Full explanation: As of LBA 0.5.0 there's been a large change to how inventories work to be much closer to vanilla - inventories no longer return immutable stacks from
FixedItemInvView.getInvStack(int), and 2 new sub-interfaces have been created to handle the different ways of using this, eitherFixedItemInv.ModifiableFixedItemInv(which exposes a markDirty() method just like vanillaInventorydoes), orFixedItemInv.CopyingFixedItemInv(which returns copies of the internalItemStackand supports complete filtering and listener capabilities).You should replace this class with either:
FullFixedItemInvif you either need exact per-slot listening or the full filtration capabilitiesDirectFixedItemInvif you'd rather use a more vanilla oriented approach of being able to directly modify items in an inventory.
-