Search in sources :

Example 1 with IItemHandlerFabric

use of org.spongepowered.mod.item.inventory.fabric.IItemHandlerFabric in project SpongeForge by SpongePowered.

the class MixinInvWrapper method init.

private void init() {
    if (!initalized) {
        initalized = true;
        this.fabric = new IItemHandlerFabric(((InvWrapper) (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)

Example 2 with IItemHandlerFabric

use of org.spongepowered.mod.item.inventory.fabric.IItemHandlerFabric 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

SlotCollection (org.spongepowered.common.item.inventory.lens.impl.collections.SlotCollection)2 OrderedInventoryLensImpl (org.spongepowered.common.item.inventory.lens.impl.comp.OrderedInventoryLensImpl)2 IItemHandlerFabric (org.spongepowered.mod.item.inventory.fabric.IItemHandlerFabric)2