Search in sources :

Example 1 with BLAZE_POWDER

use of org.spongepowered.api.item.ItemTypes.BLAZE_POWDER in project SpongeCommon by SpongePowered.

the class BrewingStandInventoryLens method init.

@Override
protected void init(SlotProvider<IInventory, ItemStack> slots) {
    this.potions = new OrderedInventoryLensImpl(0, 3, 1, OutputSlot.class, slots);
    // TODO filter PotionIngredients
    this.ingredient = new InputSlotLensImpl(3, (i) -> true, (i) -> true);
    this.fuel = new FuelSlotLensImpl(4, (i) -> BLAZE_POWDER.equals(i.getType()), BLAZE_POWDER::equals);
    this.addSpanningChild(this.potions);
    this.addSpanningChild(this.ingredient);
    this.addSpanningChild(this.fuel);
}
Also used : ItemStack(net.minecraft.item.ItemStack) InventoryAdapter(org.spongepowered.common.item.inventory.adapter.InventoryAdapter) SlotProvider(org.spongepowered.common.item.inventory.lens.SlotProvider) BLAZE_POWDER(org.spongepowered.api.item.ItemTypes.BLAZE_POWDER) 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) RealLens(org.spongepowered.common.item.inventory.lens.impl.RealLens) OutputSlot(org.spongepowered.api.item.inventory.slot.OutputSlot) OrderedInventoryLensImpl(org.spongepowered.common.item.inventory.lens.impl.comp.OrderedInventoryLensImpl) InputSlotLensImpl(org.spongepowered.common.item.inventory.lens.impl.slots.InputSlotLensImpl) FuelSlotLensImpl(org.spongepowered.common.item.inventory.lens.impl.slots.FuelSlotLensImpl) OutputSlot(org.spongepowered.api.item.inventory.slot.OutputSlot)

Aggregations

IInventory (net.minecraft.inventory.IInventory)1 ItemStack (net.minecraft.item.ItemStack)1 BLAZE_POWDER (org.spongepowered.api.item.ItemTypes.BLAZE_POWDER)1 OutputSlot (org.spongepowered.api.item.inventory.slot.OutputSlot)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