Class SimpleFixedItemInv

java.lang.Object
alexiil.mc.lib.attributes.item.impl.FullFixedItemInv
alexiil.mc.lib.attributes.item.impl.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
Deprecated.
You should use either 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 capabilities
  • DirectFixedItemInv if you'd rather use a more vanilla oriented approach of being able to directly modify items in an inventory.
  • Constructor Details

    • SimpleFixedItemInv

      @Deprecated public SimpleFixedItemInv​(int invSize)
      Deprecated.
      You should use either 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 capabilities
      • DirectFixedItemInv if you'd rather use a more vanilla oriented approach of being able to directly modify items in an inventory.