public void setType(final Type type) { this.type = type; if (type == Type.Recipe) { //this.setReadOnly(); this.forbidInteraction(); } }
@Override public void createMachine(final Machine machine) { new ComponentGeneticGUI(machine, GeneticsGUI.INCUBATOR); ComponentInventorySlots inventory = new ComponentInventorySlots(machine); for (InventorySlot slot : inventory.addSlotArray(Incubator.SLOT_QUEUE, getSlotRL("input"))) { slot.forbidExtraction(); } InventorySlot slotIncubator = inventory.addSlot(Incubator.SLOT_INCUBATOR, getSlotRL("incubator")); slotIncubator.forbidInteraction(); for (InventorySlot slot : inventory.addSlotArray(Incubator.SLOT_OUTPUT, getSlotRL("output"))) { slot.setReadOnly(); } new ComponentPowerReceptor(machine, 2000); ComponentTankContainer tanks = new ComponentTankContainer(machine); tanks.addTank(Incubator.TANK_INPUT, "input", 2000).forbidExtraction(); tanks.addTank(Incubator.TANK_OUTPUT, "output", 2000).setReadOnly(); new IncubatorLogic(machine); }
@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); }
slotTarget.setValidator(new SlotValidator.Individual()); slotTarget.setReadOnly(); slotTarget.forbidInteraction(); slotResult.forbidInteraction();
@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); }
@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); }
final ComponentInventorySlots inventory = new ComponentInventorySlots(machine); InventorySlot slotSerumVial = inventory.addSlot(Splicer.SLOT_SERUM_VIAL, getSlotRL("serum.active")); slotSerumVial.forbidInteraction(); slotSerumVial.setReadOnly(); final SlotValidator serumValid = new SerumSlotValidator(); slotTarget.setValidator(new ValidatorIndividualInoculate()); slotTarget.setReadOnly(); slotTarget.forbidInteraction(); for (InventorySlot slot : inventory.addSlotArray(Splicer.SLOT_FINISHED, getSlotRL("output"))) { slot.setReadOnly();
@Override public void createMachine(final Machine machine) { new ComponentGeneticGUI(machine, GeneticsGUI.ACCLIMATISER); final ComponentInventorySlots inventory = new ComponentInventorySlots(machine); InventorySlot slotTarget = inventory.addSlot(Acclimatiser.SLOT_TARGET, getSlotRL("process")); slotTarget.setValidator(new SlotValidator.Individual()); slotTarget.forbidInteraction(); for (final InventorySlot slot : inventory.addSlotArray(Acclimatiser.SLOT_RESERVE, getSlotRL("input"))) { slot.forbidExtraction(); slot.setValidator(new SlotValidator.Individual()); } for (final InventorySlot slot : inventory.addSlotArray(Acclimatiser.SLOT_DRONE, getSlotRL("output"))) { slot.setReadOnly(); slot.setValidator(new SlotValidator.Individual()); } for (final InventorySlot slot : inventory.addSlotArray(Acclimatiser.SLOT_ACCLIMATISER, getSlotRL("acclimatiser"))) { slot.setValidator(new ValidatorAcclimatiserItem()); } final ComponentInventoryTransfer transfer = new ComponentInventoryTransfer(machine); transfer.addRestock(Acclimatiser.SLOT_RESERVE, Acclimatiser.SLOT_TARGET, 1); transfer.addStorage(Acclimatiser.SLOT_TARGET, Acclimatiser.SLOT_DRONE, (stack) -> { NonNullList<ItemStack> stacks = machine.getMachineUtil().getNonEmptyStacks(Acclimatiser.SLOT_ACCLIMATISER); return !Acclimatiser.canAcclimatise(stack, stacks); }); new ComponentPowerReceptor(machine, 5000); new AcclimatiserLogic(machine); }
final ComponentInventorySlots inventory = new ComponentInventorySlots(machine); InventorySlot slotSerumVial = inventory.addSlot(Inoculator.SLOT_SERUM_VIAL, getSlotRL("serum.active")); slotSerumVial.forbidInteraction(); slotSerumVial.setReadOnly(); final SlotValidator serumValid = new SerumSlotValidator(); slotTarget.setValidator(new ValidatorIndividualInoculate()); slotTarget.setReadOnly(); slotTarget.forbidInteraction(); for (final InventorySlot slot : inventory.addSlotArray(Inoculator.SLOT_FINISHED, getSlotRL("output"))) { slot.setReadOnly();
slotSerum.forbidInteraction(); slotSerum.setReadOnly(); for (InventorySlot slot : inventory.addSlotArray(Polymeriser.SLOT_SERUM_RESERVE, getSlotRL("input"))) {