Search in sources :

Example 1 with OutputSlotLensImpl

use of org.spongepowered.common.item.inventory.lens.impl.slots.OutputSlotLensImpl in project SpongeCommon by SpongePowered.

the class FurnaceInventoryLens method init.

@Override
protected void init(SlotProvider<IInventory, ItemStack> slots) {
    this.addChild(new OrderedInventoryLensImpl(0, 3, 1, slots));
    this.input = new InputSlotLensImpl(0, (i) -> true, (i) -> true);
    // TODO SlotFurnaceFuel
    this.fuel = new FuelSlotLensImpl(1, (i) -> true, (i) -> true);
    // SlotFurnaceOutput
    this.output = new OutputSlotLensImpl(2, (i) -> false, (i) -> false);
    this.addSpanningChild(this.input, new SlotIndex(0));
    this.addSpanningChild(this.fuel, new SlotIndex(1));
    this.addSpanningChild(this.output, new SlotIndex(2));
}
Also used : ItemStack(net.minecraft.item.ItemStack) InventoryAdapter(org.spongepowered.common.item.inventory.adapter.InventoryAdapter) SlotProvider(org.spongepowered.common.item.inventory.lens.SlotProvider) InputSlotLensImpl(org.spongepowered.common.item.inventory.lens.impl.slots.InputSlotLensImpl) IInventory(net.minecraft.inventory.IInventory) FuelSlotLensImpl(org.spongepowered.common.item.inventory.lens.impl.slots.FuelSlotLensImpl) OrderedInventoryLensImpl(org.spongepowered.common.item.inventory.lens.impl.comp.OrderedInventoryLensImpl) SlotIndex(org.spongepowered.api.item.inventory.property.SlotIndex) RealLens(org.spongepowered.common.item.inventory.lens.impl.RealLens) OutputSlotLensImpl(org.spongepowered.common.item.inventory.lens.impl.slots.OutputSlotLensImpl) OrderedInventoryLensImpl(org.spongepowered.common.item.inventory.lens.impl.comp.OrderedInventoryLensImpl) InputSlotLensImpl(org.spongepowered.common.item.inventory.lens.impl.slots.InputSlotLensImpl) SlotIndex(org.spongepowered.api.item.inventory.property.SlotIndex) FuelSlotLensImpl(org.spongepowered.common.item.inventory.lens.impl.slots.FuelSlotLensImpl) OutputSlotLensImpl(org.spongepowered.common.item.inventory.lens.impl.slots.OutputSlotLensImpl)

Aggregations

IInventory (net.minecraft.inventory.IInventory)1 ItemStack (net.minecraft.item.ItemStack)1 SlotIndex (org.spongepowered.api.item.inventory.property.SlotIndex)1 InventoryAdapter (org.spongepowered.common.item.inventory.adapter.InventoryAdapter)1 SlotProvider (org.spongepowered.common.item.inventory.lens.SlotProvider)1 RealLens (org.spongepowered.common.item.inventory.lens.impl.RealLens)1 OrderedInventoryLensImpl (org.spongepowered.common.item.inventory.lens.impl.comp.OrderedInventoryLensImpl)1 FuelSlotLensImpl (org.spongepowered.common.item.inventory.lens.impl.slots.FuelSlotLensImpl)1 InputSlotLensImpl (org.spongepowered.common.item.inventory.lens.impl.slots.InputSlotLensImpl)1 OutputSlotLensImpl (org.spongepowered.common.item.inventory.lens.impl.slots.OutputSlotLensImpl)1