Search in sources :

Example 1 with CraftingGridInventoryLens

use of org.spongepowered.common.item.inventory.lens.comp.CraftingGridInventoryLens in project SpongeCommon by SpongePowered.

the class InventoryUtil method toSpongeInventory.

public static CraftingGridInventory toSpongeInventory(InventoryCrafting inv) {
    IInventoryFabric fabric = new IInventoryFabric(inv);
    CraftingGridInventoryLens lens = new CraftingGridInventoryLensImpl(0, inv.getWidth(), inv.getHeight(), inv.getWidth(), SlotLensImpl::new);
    return new CraftingGridInventoryAdapter(fabric, lens);
}
Also used : CraftingGridInventoryLens(org.spongepowered.common.item.inventory.lens.comp.CraftingGridInventoryLens) IInventoryFabric(org.spongepowered.common.item.inventory.lens.impl.fabric.IInventoryFabric) SlotLensImpl(org.spongepowered.common.item.inventory.lens.impl.slots.SlotLensImpl) CraftingGridInventoryAdapter(org.spongepowered.common.item.inventory.adapter.impl.comp.CraftingGridInventoryAdapter) CraftingGridInventoryLensImpl(org.spongepowered.common.item.inventory.lens.impl.comp.CraftingGridInventoryLensImpl)

Aggregations

CraftingGridInventoryAdapter (org.spongepowered.common.item.inventory.adapter.impl.comp.CraftingGridInventoryAdapter)1 CraftingGridInventoryLens (org.spongepowered.common.item.inventory.lens.comp.CraftingGridInventoryLens)1 CraftingGridInventoryLensImpl (org.spongepowered.common.item.inventory.lens.impl.comp.CraftingGridInventoryLensImpl)1 IInventoryFabric (org.spongepowered.common.item.inventory.lens.impl.fabric.IInventoryFabric)1 SlotLensImpl (org.spongepowered.common.item.inventory.lens.impl.slots.SlotLensImpl)1