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