Search in sources :

Example 16 with OrderedInventoryLensImpl

use of org.spongepowered.common.item.inventory.lens.impl.comp.OrderedInventoryLensImpl in project SpongeForge by SpongePowered.

the class MixinItemStackHandler method init.

private void init() {
    if (!initalized) {
        initalized = true;
        this.fabric = new IItemHandlerFabric(((ItemStackHandler) (Object) this));
        this.slots = new SlotCollection.Builder().add(this.fabric.getSize()).build();
        this.lens = new OrderedInventoryLensImpl(0, this.fabric.getSize(), 1, slots);
    }
}
Also used : SlotCollection(org.spongepowered.common.item.inventory.lens.impl.collections.SlotCollection) OrderedInventoryLensImpl(org.spongepowered.common.item.inventory.lens.impl.comp.OrderedInventoryLensImpl) IItemHandlerFabric(org.spongepowered.mod.item.inventory.fabric.IItemHandlerFabric)

Aggregations

OrderedInventoryLensImpl (org.spongepowered.common.item.inventory.lens.impl.comp.OrderedInventoryLensImpl)16 SlotCollection (org.spongepowered.common.item.inventory.lens.impl.collections.SlotCollection)9 IInventory (net.minecraft.inventory.IInventory)8 ItemStack (net.minecraft.item.ItemStack)7 SlotProvider (org.spongepowered.common.item.inventory.lens.SlotProvider)4 SlotIndex (org.spongepowered.api.item.inventory.property.SlotIndex)3 Inject (org.spongepowered.asm.mixin.injection.Inject)3 InventoryAdapter (org.spongepowered.common.item.inventory.adapter.InventoryAdapter)3 Lens (org.spongepowered.common.item.inventory.lens.Lens)3 MainPlayerInventoryLensImpl (org.spongepowered.common.item.inventory.lens.impl.comp.MainPlayerInventoryLensImpl)3 IInventoryFabric (org.spongepowered.common.item.inventory.lens.impl.fabric.IInventoryFabric)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Optional (java.util.Optional)2 EntityPlayer (net.minecraft.entity.player.EntityPlayer)2 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)2 Fabric (org.spongepowered.common.item.inventory.lens.Fabric)2 LensProvider (org.spongepowered.common.item.inventory.lens.LensProvider)2 DefaultEmptyLens (org.spongepowered.common.item.inventory.lens.impl.DefaultEmptyLens)2 ReusableLens (org.spongepowered.common.item.inventory.lens.impl.ReusableLens)2