Search in sources :

Example 16 with InventorySlot

use of binnie.core.machines.inventory.InventorySlot in project Binnie by ForestryMC.

the class LumbermillMachine method createMachine.

@Override
public void createMachine(final Machine machine) {
    new ExtraTreeMachine.ComponentExtraTreeGUI(machine, ExtraTreesGUID.LUMBERMILL);
    final ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
    InventorySlot slotLog = inventory.addSlot(SLOT_LOG, getSlotRL("input"));
    slotLog.setValidator(new SlotValidatorLog(machine.getWorld()));
    slotLog.forbidExtraction();
    inventory.addSlot(SLOT_PLANKS, getSlotRL("output")).setReadOnly();
    inventory.addSlot(SLOT_BARK, getSlotRL("byproduct")).setReadOnly();
    inventory.addSlot(SLOT_SAWDUST, getSlotRL("byproduct")).setReadOnly();
    final ComponentTankContainer tanks = new ComponentTankContainer(machine);
    TankSlot tankWater = tanks.addTank(TANK_WATER, "input", TANK_WATER_CAPACITY);
    tankWater.setValidator(new TankValidator.Basic(ManagerLiquid.WATER));
    new ComponentPowerReceptor(machine);
    new LumbermillLogic(machine);
}
Also used : ComponentInventorySlots(binnie.core.machines.inventory.ComponentInventorySlots) ComponentTankContainer(binnie.core.machines.inventory.ComponentTankContainer) TankSlot(binnie.core.machines.inventory.TankSlot) InventorySlot(binnie.core.machines.inventory.InventorySlot) TankValidator(binnie.core.machines.inventory.TankValidator) SlotValidatorLog(binnie.extratrees.machines.lumbermill.window.SlotValidatorLog) ComponentPowerReceptor(binnie.core.machines.power.ComponentPowerReceptor)

Example 17 with InventorySlot

use of binnie.core.machines.inventory.InventorySlot in project Binnie by ForestryMC.

the class FruitPressMachine method createMachine.

@Override
public void createMachine(final Machine machine) {
    new ExtraTreeMachine.ComponentExtraTreeGUI(machine, ExtraTreesGUID.PRESS);
    final ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
    final InventorySlot input = inventory.addSlot(SLOT_FRUIT, getSlotRL("input"));
    input.setValidator(new SlotValidatorSqueezable());
    input.forbidExtraction();
    final InventorySlot process = inventory.addSlot(SLOT_CURRENT, getSlotRL("process"));
    process.setValidator(new SlotValidatorSqueezable());
    process.forbidInteraction();
    final ComponentTankContainer tanks = new ComponentTankContainer(machine);
    tanks.addTank(TANK_OUTPUT, "output", TANK_OUTPUT_CAPACITY).setReadOnly();
    new ComponentPowerReceptor(machine);
    new ComponentInventoryTransfer(machine).addRestock(new int[] { SLOT_FRUIT }, SLOT_CURRENT, 1);
    new FruitPressLogic(machine);
}
Also used : ComponentInventorySlots(binnie.core.machines.inventory.ComponentInventorySlots) ComponentTankContainer(binnie.core.machines.inventory.ComponentTankContainer) SlotValidatorSqueezable(binnie.extratrees.machines.fruitpress.window.SlotValidatorSqueezable) InventorySlot(binnie.core.machines.inventory.InventorySlot) ComponentInventoryTransfer(binnie.core.machines.inventory.ComponentInventoryTransfer) ComponentPowerReceptor(binnie.core.machines.power.ComponentPowerReceptor)

Aggregations

InventorySlot (binnie.core.machines.inventory.InventorySlot)17 ComponentInventorySlots (binnie.core.machines.inventory.ComponentInventorySlots)13 ComponentPowerReceptor (binnie.core.machines.power.ComponentPowerReceptor)12 SlotValidator (binnie.core.machines.inventory.SlotValidator)10 ComponentInventoryTransfer (binnie.core.machines.inventory.ComponentInventoryTransfer)9 ComponentGeneticGUI (binnie.genetics.machine.ComponentGeneticGUI)9 ComponentTankContainer (binnie.core.machines.inventory.ComponentTankContainer)8 ComponentChargedSlots (binnie.core.machines.inventory.ComponentChargedSlots)5 TankSlot (binnie.core.machines.inventory.TankSlot)3 ItemStack (net.minecraft.item.ItemStack)3 IMachine (binnie.core.machines.IMachine)2 MachineUtil (binnie.core.machines.MachineUtil)2 EthanolTankValidator (binnie.genetics.machine.EthanolTankValidator)2 ResourceLocation (net.minecraft.util.ResourceLocation)2 ComponentBotanyGUI (binnie.botany.machines.ComponentBotanyGUI)1 ManagerGenetics (binnie.core.genetics.ManagerGenetics)1 Point (binnie.core.gui.geometry.Point)1 CustomSlot (binnie.core.gui.minecraft.CustomSlot)1 WindowInventory (binnie.core.gui.minecraft.WindowInventory)1 IInventorySlots (binnie.core.machines.inventory.IInventorySlots)1