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:
FullFixedItemInv
if you either need exact per-slot listening or the full filtration capabilitiesDirectFixedItemInv
if 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.DefaultChangeTracker
Nested 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 eitherDirectFixedItemInv
orFullFixedItemInv
instead 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, toTag
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface alexiil.mc.lib.attributes.item.FixedItemInv
createLimitedFixedInv, extractStack, forceSetInvStack, getExtractable, getInsertable, getMappedInv, getSubInv, getTransferable, insertStack, modifySlot, slotIterable
Methods inherited from interface alexiil.mc.lib.attributes.item.FixedItemInv.CopyingFixedItemInv
addListener, getInvStack, getSlot
Methods inherited from interface alexiil.mc.lib.attributes.item.FixedItemInvView
convertTo, getFixedView, getMaxAmount, offerSelfAsAttribute, stackIterable
Methods inherited from interface alexiil.mc.lib.attributes.item.ItemExtractable
couldExtractAnything, extract, extract, extract, getPureExtractable
Methods 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 eitherDirectFixedItemInv
orFullFixedItemInv
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, eitherFixedItemInv.ModifiableFixedItemInv
(which exposes a markDirty() method just like vanillaInventory
does), orFixedItemInv.CopyingFixedItemInv
(which returns copies of the internalItemStack
and supports complete filtering and listener capabilities).You should replace this class with either:
FullFixedItemInv
if you either need exact per-slot listening or the full filtration capabilitiesDirectFixedItemInv
if you'd rather use a more vanilla oriented approach of being able to directly modify items in an inventory.
-