use of binnie.genetics.machine.EthanolTankValidator 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);
}
use of binnie.genetics.machine.EthanolTankValidator 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);
}
Aggregations