Search in sources :

Example 1 with OutputSlotLens

use of org.spongepowered.common.inventory.lens.impl.slot.OutputSlotLens in project SpongeCommon by SpongePowered.

the class FurnaceInventoryLens method init.

protected void init(final SlotLensProvider slots) {
    this.addSpanningChild(new DefaultIndexedLens(0, 3, slots));
    this.input = new InputSlotLens(slots.getSlotLens(0), ItemStackFilter.filterIInventory(0));
    this.fuel = new FuelSlotLens(slots.getSlotLens(1), ItemStackFilter.filterIInventory(1));
    this.output = new OutputSlotLens(slots.getSlotLens(2), ItemStackFilter.filterIInventory(2));
    this.addChild(this.input, KeyValuePair.slotIndex(0));
    this.addChild(this.fuel, KeyValuePair.slotIndex(1));
    this.addChild(this.output, KeyValuePair.slotIndex(2));
}
Also used : InputSlotLens(org.spongepowered.common.inventory.lens.impl.slot.InputSlotLens) DefaultIndexedLens(org.spongepowered.common.inventory.lens.impl.DefaultIndexedLens) FuelSlotLens(org.spongepowered.common.inventory.lens.impl.slot.FuelSlotLens) OutputSlotLens(org.spongepowered.common.inventory.lens.impl.slot.OutputSlotLens)

Aggregations

DefaultIndexedLens (org.spongepowered.common.inventory.lens.impl.DefaultIndexedLens)1 FuelSlotLens (org.spongepowered.common.inventory.lens.impl.slot.FuelSlotLens)1 InputSlotLens (org.spongepowered.common.inventory.lens.impl.slot.InputSlotLens)1 OutputSlotLens (org.spongepowered.common.inventory.lens.impl.slot.OutputSlotLens)1