Search in sources :

Example 1 with ComponentChargedSlots

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

the class PackageAnalyser method createMachine.

@Override
public void createMachine(final Machine machine) {
    new ComponentGeneticGUI(machine, GeneticsGUI.ANALYSER);
    ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
    for (InventorySlot slot : inventory.addSlotArray(Analyser.SLOT_RESERVE, getSlotRL("input"))) {
        slot.setValidator(new SlotValidatorUnanalysed());
        slot.forbidExtraction();
    }
    InventorySlot slotTarget = inventory.addSlot(Analyser.SLOT_TARGET, getSlotRL("analyse"));
    slotTarget.setReadOnly();
    slotTarget.forbidInteraction();
    InventorySlot slotDye = inventory.addSlot(Analyser.SLOT_DYE, getSlotRL("dye"));
    slotDye.forbidExtraction();
    slotDye.setValidator(new DyeSlotValidator());
    for (InventorySlot slot : inventory.addSlotArray(Analyser.SLOT_FINISHED, getSlotRL("output"))) {
        slot.forbidInsertion();
        slot.setReadOnly();
    }
    ComponentInventoryTransfer transfer = new ComponentInventoryTransfer(machine);
    transfer.addRestock(Analyser.SLOT_RESERVE, 6, 1);
    transfer.addStorage(6, Analyser.SLOT_FINISHED, ManagerGenetics::isAnalysed);
    new ComponentChargedSlots(machine).addCharge(13);
    new ComponentPowerReceptor(machine, 500);
    new AnalyserLogic(machine);
    new AnalyserFX(machine);
}
Also used : ComponentInventorySlots(binnie.core.machines.inventory.ComponentInventorySlots) InventorySlot(binnie.core.machines.inventory.InventorySlot) ManagerGenetics(binnie.core.genetics.ManagerGenetics) ComponentChargedSlots(binnie.core.machines.inventory.ComponentChargedSlots) ComponentGeneticGUI(binnie.genetics.machine.ComponentGeneticGUI) ComponentInventoryTransfer(binnie.core.machines.inventory.ComponentInventoryTransfer) ComponentPowerReceptor(binnie.core.machines.power.ComponentPowerReceptor)

Example 2 with ComponentChargedSlots

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

the class PackagePolymeriser method createMachine.

@Override
public void createMachine(Machine machine) {
    new ComponentGeneticGUI(machine, GeneticsGUI.POLYMERISER);
    ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
    // Slot Gold
    InventorySlot slotGold = inventory.addSlot(Polymeriser.SLOT_GOLD, getSlotRL("catalyst"));
    slotGold.setValidator(new SlotValidator.Item(new ItemStack(Items.GOLD_NUGGET, 1), ModuleMachine.getSpriteNugget()));
    slotGold.forbidExtraction();
    // Slot Serum
    InventorySlot slotSerum = inventory.addSlot(Polymeriser.SLOT_SERUM, getSlotRL("process"));
    slotSerum.setValidator(new SlotValidatorUnfilledSerum());
    slotSerum.forbidInteraction();
    slotSerum.setReadOnly();
    for (InventorySlot slot : inventory.addSlotArray(Polymeriser.SLOT_SERUM_RESERVE, getSlotRL("input"))) {
        slot.setValidator(new SlotValidatorUnfilledSerum());
        slot.forbidExtraction();
    }
    for (InventorySlot slot : inventory.addSlotArray(Polymeriser.SLOT_SERUM_FINISHED, getSlotRL("output"))) {
        slot.setReadOnly();
    }
    ComponentInventoryTransfer transfer = new ComponentInventoryTransfer(machine);
    transfer.addRestock(Polymeriser.SLOT_SERUM_RESERVE, Polymeriser.SLOT_SERUM, 1);
    transfer.addStorage(Polymeriser.SLOT_SERUM, Polymeriser.SLOT_SERUM_FINISHED, (stack) -> !stack.isItemDamaged());
    ComponentTankContainer tank = new ComponentTankContainer(machine);
    tank.addTank(Polymeriser.TANK_BACTERIA, "input", 1000).setValidator(new BacteriaTankValidator());
    tank.addTank(Polymeriser.TANK_DNA, "input", 1000).setValidator(new DnaTankValidator());
    new ComponentChargedSlots(machine).addCharge(1);
    new ComponentPowerReceptor(machine, 8000);
    new PolymeriserLogic(machine);
    new PolymeriserFX(machine);
}
Also used : ComponentInventorySlots(binnie.core.machines.inventory.ComponentInventorySlots) InventorySlot(binnie.core.machines.inventory.InventorySlot) ComponentChargedSlots(binnie.core.machines.inventory.ComponentChargedSlots) ComponentGeneticGUI(binnie.genetics.machine.ComponentGeneticGUI) ComponentInventoryTransfer(binnie.core.machines.inventory.ComponentInventoryTransfer) ComponentTankContainer(binnie.core.machines.inventory.ComponentTankContainer) ItemStack(net.minecraft.item.ItemStack) SlotValidator(binnie.core.machines.inventory.SlotValidator) ComponentPowerReceptor(binnie.core.machines.power.ComponentPowerReceptor)

Example 3 with ComponentChargedSlots

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

the class PackageSequencer method createMachine.

@Override
public void createMachine(final Machine machine) {
    new ComponentGeneticGUI(machine, GeneticsGUI.SEQUENCER);
    ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
    InventorySlot slotDye = inventory.addSlot(Sequencer.SLOT_DYE, getSlotRL("dye"));
    slotDye.setValidator(new SlotValidator.Item(GeneticsItems.FluorescentDye.get(1), ModuleMachine.getSpriteDye()));
    slotDye.forbidExtraction();
    for (InventorySlot slot : inventory.addSlotArray(Sequencer.SLOT_RESERVE, getSlotRL("input"))) {
        slot.setValidator(new SlotValidatorUnsequenced());
        slot.forbidExtraction();
    }
    InventorySlot slotTarget = inventory.addSlot(Sequencer.SLOT_TARGET, getSlotRL("process"));
    slotTarget.setValidator(new SlotValidatorUnsequenced());
    slotTarget.setReadOnly();
    slotTarget.forbidInteraction();
    InventorySlot slotDone = inventory.addSlot(Sequencer.SLOT_DONE, getSlotRL("output"));
    slotDone.setReadOnly();
    ComponentInventoryTransfer transfer = new ComponentInventoryTransfer(machine);
    transfer.addRestock(Sequencer.SLOT_RESERVE, Sequencer.SLOT_TARGET, 1);
    new ComponentChargedSlots(machine).addCharge(0);
    new ComponentPowerReceptor(machine, 10000);
    new SequencerLogic(machine);
    new SequencerFX(machine);
}
Also used : ComponentInventorySlots(binnie.core.machines.inventory.ComponentInventorySlots) InventorySlot(binnie.core.machines.inventory.InventorySlot) SlotValidator(binnie.core.machines.inventory.SlotValidator) ComponentChargedSlots(binnie.core.machines.inventory.ComponentChargedSlots) ComponentGeneticGUI(binnie.genetics.machine.ComponentGeneticGUI) ComponentInventoryTransfer(binnie.core.machines.inventory.ComponentInventoryTransfer) ComponentPowerReceptor(binnie.core.machines.power.ComponentPowerReceptor)

Example 4 with ComponentChargedSlots

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

the class PackageGenepool method createMachine.

@Override
public void createMachine(final Machine machine) {
    new ComponentGeneticGUI(machine, GeneticsGUI.GENEPOOL);
    ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
    InventorySlot slotEnzyme = inventory.addSlot(Genepool.SLOT_ENZYME, getSlotRL("enzyme"));
    slotEnzyme.setValidator(new SlotValidator.Item(GeneticsItems.Enzyme.get(1), ModuleMachine.getSpriteEnzyme()));
    slotEnzyme.forbidExtraction();
    InventorySlot slotProcess = inventory.addSlot(Genepool.SLOT_BEE, getSlotRL("process"));
    slotProcess.setValidator(new SlotValidator.Individual());
    slotProcess.setReadOnly();
    slotProcess.forbidExtraction();
    for (InventorySlot slot : inventory.addSlotArray(Genepool.SLOT_RESERVE, getSlotRL("input"))) {
        slot.setValidator(new SlotValidator.Individual());
        slot.forbidExtraction();
    }
    ComponentTankContainer tanks = new ComponentTankContainer(machine);
    TankSlot tankDNA = tanks.addTank(Genepool.TANK_DNA, "output", 2000);
    tankDNA.setReadOnly();
    TankSlot tankEthanol = tanks.addTank(Genepool.TANK_ETHANOL, "input", 1000);
    tankEthanol.forbidExtraction();
    tankEthanol.setValidator(new EthanolTankValidator());
    ComponentInventoryTransfer transfer = new ComponentInventoryTransfer(machine);
    transfer.addRestock(Genepool.SLOT_RESERVE, Genepool.SLOT_BEE, 1);
    new ComponentPowerReceptor(machine, 1600);
    new GenepoolLogic(machine);
    ComponentChargedSlots chargedSlots = new ComponentChargedSlots(machine);
    chargedSlots.addCharge(Genepool.SLOT_ENZYME);
    new GenepoolFX(machine);
}
Also used : EthanolTankValidator(binnie.genetics.machine.EthanolTankValidator) ComponentInventorySlots(binnie.core.machines.inventory.ComponentInventorySlots) InventorySlot(binnie.core.machines.inventory.InventorySlot) ComponentChargedSlots(binnie.core.machines.inventory.ComponentChargedSlots) ComponentGeneticGUI(binnie.genetics.machine.ComponentGeneticGUI) ComponentInventoryTransfer(binnie.core.machines.inventory.ComponentInventoryTransfer) ComponentTankContainer(binnie.core.machines.inventory.ComponentTankContainer) TankSlot(binnie.core.machines.inventory.TankSlot) SlotValidator(binnie.core.machines.inventory.SlotValidator) ComponentPowerReceptor(binnie.core.machines.power.ComponentPowerReceptor)

Example 5 with ComponentChargedSlots

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

the class PackageIsolator method createMachine.

@Override
public void createMachine(final Machine machine) {
    // GUI
    new ComponentGeneticGUI(machine, GeneticsGUI.ISOLATOR);
    // Inventory
    final ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
    InventorySlot slotEnzyme = inventory.addSlot(Isolator.SLOT_ENZYME, getSlotRL("enzyme"));
    slotEnzyme.setValidator(new SlotValidator.Item(GeneticsItems.Enzyme.get(1), ModuleMachine.getSpriteEnzyme()));
    slotEnzyme.forbidExtraction();
    InventorySlot slotSequencer = inventory.addSlot(Isolator.SLOT_SEQUENCER_VIAL, getSlotRL("sequencervial"));
    slotSequencer.setValidator(new SlotValidator.Item(GeneticsItems.EmptySequencer.get(1), ModuleMachine.getSpriteSequencer()));
    slotSequencer.forbidExtraction();
    for (InventorySlot slot : inventory.addSlotArray(Isolator.SLOT_RESERVE, getSlotRL("input"))) {
        slot.setValidator(new SlotValidator.Individual());
        slot.forbidExtraction();
    }
    InventorySlot slotTarget = inventory.addSlot(Isolator.SLOT_TARGET, getSlotRL("process"));
    slotTarget.setValidator(new SlotValidator.Individual());
    slotTarget.setReadOnly();
    slotTarget.forbidInteraction();
    InventorySlot slotResult = inventory.addSlot(Isolator.SLOT_RESULUT, getSlotRL("output"));
    slotResult.setReadOnly();
    slotResult.forbidInteraction();
    for (InventorySlot slot : inventory.addSlotArray(Isolator.SLOT_FINISHED, getSlotRL("output"))) {
        slot.setReadOnly();
        slot.forbidInsertion();
    }
    // Tanks
    final ComponentTankContainer tanks = new ComponentTankContainer(machine);
    tanks.addTank(Isolator.TANK_ETHANOL, "input", 1000).setValidator(new EthanolTankValidator());
    // Charged Slots
    final ComponentChargedSlots chargedSlots = new ComponentChargedSlots(machine);
    chargedSlots.addCharge(Isolator.SLOT_ENZYME);
    // Transfer
    final ComponentInventoryTransfer transfer = new ComponentInventoryTransfer(machine);
    transfer.addRestock(Isolator.SLOT_RESERVE, Isolator.SLOT_TARGET, 1);
    transfer.addStorage(Isolator.SLOT_RESULUT, Isolator.SLOT_FINISHED);
    // Logic
    new ComponentPowerReceptor(machine, 20000);
    new IsolatorLogic(machine);
    new IsolatorFX(machine);
}
Also used : EthanolTankValidator(binnie.genetics.machine.EthanolTankValidator) ComponentInventorySlots(binnie.core.machines.inventory.ComponentInventorySlots) InventorySlot(binnie.core.machines.inventory.InventorySlot) ComponentChargedSlots(binnie.core.machines.inventory.ComponentChargedSlots) ComponentGeneticGUI(binnie.genetics.machine.ComponentGeneticGUI) ComponentInventoryTransfer(binnie.core.machines.inventory.ComponentInventoryTransfer) ComponentTankContainer(binnie.core.machines.inventory.ComponentTankContainer) SlotValidator(binnie.core.machines.inventory.SlotValidator) ComponentPowerReceptor(binnie.core.machines.power.ComponentPowerReceptor)

Aggregations

ComponentChargedSlots (binnie.core.machines.inventory.ComponentChargedSlots)5 ComponentInventorySlots (binnie.core.machines.inventory.ComponentInventorySlots)5 ComponentInventoryTransfer (binnie.core.machines.inventory.ComponentInventoryTransfer)5 InventorySlot (binnie.core.machines.inventory.InventorySlot)5 ComponentPowerReceptor (binnie.core.machines.power.ComponentPowerReceptor)5 ComponentGeneticGUI (binnie.genetics.machine.ComponentGeneticGUI)5 SlotValidator (binnie.core.machines.inventory.SlotValidator)4 ComponentTankContainer (binnie.core.machines.inventory.ComponentTankContainer)3 EthanolTankValidator (binnie.genetics.machine.EthanolTankValidator)2 ManagerGenetics (binnie.core.genetics.ManagerGenetics)1 TankSlot (binnie.core.machines.inventory.TankSlot)1 ItemStack (net.minecraft.item.ItemStack)1