use of org.spongepowered.common.item.inventory.adapter.impl.comp.OrderedInventoryAdapter in project SpongeCommon by SpongePowered.
the class MixinSlot method parent.
@Override
public Inventory parent() {
if (this.inventory instanceof Inventory) {
return ((Inventory) this.inventory);
}
if (this.parentAdapter == null) {
OrderedInventoryLensImpl lens = new OrderedInventoryLensImpl(0, this.fabric.getSize(), 1, new SlotCollection.Builder().add(this.fabric.getSize()).build());
this.parentAdapter = new OrderedInventoryAdapter(this.fabric, lens);
}
return this.parentAdapter;
}
Aggregations