Tabnine Logo
ComponentInventorySlots.addSlot
Code IndexAdd Tabnine to your IDE (free)

How to use
addSlot
method
in
binnie.core.machines.inventory.ComponentInventorySlots

Best Java code snippets using binnie.core.machines.inventory.ComponentInventorySlots.addSlot (Showing top 20 results out of 315)

origin: ForestryMC/Binnie

public final InventorySlot[] addSlotArray(final int[] indexes, final ResourceLocation unlocalizedName) {
  return Arrays.stream(indexes)
    .mapToObj(index -> addSlot(index, unlocalizedName))
    .toArray(InventorySlot[]::new);
}
origin: ForestryMC/Binnie

@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);
}
origin: ForestryMC/Binnie

@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);
}
origin: ForestryMC/Binnie

/**
 * @deprecated use {@link #addSlotArray(int[], ResourceLocation)}
 */
@Deprecated
public final InventorySlot[] addSlotArray(final int[] indexes, final String unlocalizedName) {
  return Arrays.stream(indexes)
    .mapToObj(index -> addSlot(index, unlocalizedName))
    .toArray(InventorySlot[]::new);
}
origin: ForestryMC/Binnie

@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);
}
origin: ForestryMC/Binnie

/**
 * @deprecated use {@link #addSlot(int, ResourceLocation)}
 */
@Deprecated
public final InventorySlot addSlot(final int index, final String unlocName) {
  ResourceLocation unlocLocation = new ResourceLocation(Constants.CORE_MOD_ID, "gui.slot." + unlocName);
  return addSlot(index, unlocLocation);
}
origin: ForestryMC/Binnie

@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);
}
origin: ForestryMC/Binnie

@Override
public void createMachine(final Machine machine) {
  final ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
  inventory.addSlot(Nursery.SLOT_CATERPILLAR, getSlotRL("caterpillar"));
}
origin: ForestryMC/Binnie

@Override
public void createMachine(final Machine machine) {
  new ExtraTreeMachine.ComponentExtraTreeGUI(machine, ExtraTreesGUID.BREWERY);
  final ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
  for (final InventorySlot slot : inventory.addSlotArray(SLOT_RECIPE_GRAINS, new ResourceLocation(Constants.CORE_MOD_ID, "gui.slot.grain"))) {
    slot.setValidator(new SlotValidatorBreweryGrain());
    slot.setType(InventorySlot.Type.Recipe);
  }
  for (final InventorySlot slot : inventory.addSlotArray(SLOTS_INVENTORY, new ResourceLocation(Constants.CORE_MOD_ID, "gui.slot.inventory"))) {
    slot.forbidExtraction();
  }
  final InventorySlot yeast = inventory.addSlot(SLOT_YEAST, getSlotRL("yeast"));
  yeast.setValidator(new SlotValidatorBreweryYeast());
  yeast.setType(InventorySlot.Type.Recipe);
  final InventorySlot ingredient = inventory.addSlot(SLOT_RECIPE_INPUT, getSlotRL("ingredient"));
  ingredient.setValidator(new SlotValidatorBreweryIngredient());
  ingredient.setType(InventorySlot.Type.Recipe);
  final ComponentTankContainer tanks = new ComponentTankContainer(machine);
  TankSlot input = tanks.addTank(TANK_INPUT, "input", 5000);
  input.setValidator(new TankValidatorFermentInput());
  input.forbidExtraction();
  final TankSlot output = tanks.addTank(TANK_OUTPUT, "output", 5000);
  output.setValidator(new TankValidatorFermentOutput());
  output.setReadOnly();
  new ComponentPowerReceptor(machine);
  new BreweryLogic(machine);
}
origin: ForestryMC/Binnie

@Override
public void createMachine(final Machine machine) {
  new ExtraTreeMachine.ComponentExtraTreeGUI(machine, ExtraTreesGUID.WOODWORKER);
  final ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
  inventory.addSlot(DesignerSlots.ADHESIVE_SLOT, getSlotRL("polish")).setValidator(new SlotValidatorDesignAdhesive(this.type));
  inventory.addSlot(DesignerSlots.DESIGN_SLOT_1, getSlotRL("wood")).setValidator(new SlotValidatorDesignMaterial(this.type));
  inventory.addSlot(DesignerSlots.DESIGN_SLOT_2, getSlotRL("wood")).setValidator(new SlotValidatorDesignMaterial(this.type));
  new ComponentDesignerRecipe(machine, this.type);
}
origin: ForestryMC/Binnie

new ComponentGeneticGUI(machine, GeneticsGUI.SPLICER);
final ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
InventorySlot slotSerumVial = inventory.addSlot(Splicer.SLOT_SERUM_VIAL, getSlotRL("serum.active"));
slotSerumVial.forbidInteraction();
slotSerumVial.setReadOnly();
  slot.setValidator(new ValidatorIndividualInoculate());
InventorySlot slotTarget = inventory.addSlot(Splicer.SLOT_TARGET, getSlotRL("process"));
slotTarget.setValidator(new ValidatorIndividualInoculate());
slotTarget.setReadOnly();
origin: ForestryMC/Binnie

@Override
public void createMachine(final Machine machine) {
  new ComponentGUIHolder(machine);
  new LabFX(machine);
  ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
  inventory.addSlot(0, new ResourceLocation(GENETICS_MOD_ID, "lab_display"));
}
origin: ForestryMC/Binnie

ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
InventorySlot slotGold = inventory.addSlot(Polymeriser.SLOT_GOLD, getSlotRL("catalyst"));
slotGold.setValidator(new SlotValidator.Item(new ItemStack(Items.GOLD_NUGGET, 1), ModuleMachine.getSpriteNugget()));
slotGold.forbidExtraction();
InventorySlot slotSerum = inventory.addSlot(Polymeriser.SLOT_SERUM, getSlotRL("process"));
slotSerum.setValidator(new SlotValidatorUnfilledSerum());
slotSerum.forbidInteraction();
origin: ForestryMC/Binnie

@Override
public void createMachine(final Machine machine) {
  new ComponentBotanyGUI(machine, BotanyGUI.TILEWORKER);
  final ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
  InventorySlot mortarSlot = inventory.addSlot(DesignerSlots.ADHESIVE_SLOT, new ResourceLocation(Constants.BOTANY_MOD_ID, "gui.slot.mortar"));
  mortarSlot.setValidator(new SlotValidatorDesignAdhesive(this.type));
  InventorySlot ceramicSlot1 = inventory.addSlot(DesignerSlots.DESIGN_SLOT_1, new ResourceLocation(Constants.BOTANY_MOD_ID, "gui.slot.ceramic"));
  ceramicSlot1.setValidator(new SlotValidatorDesignMaterial(this.type));
  InventorySlot ceramicSlot2 = inventory.addSlot(DesignerSlots.DESIGN_SLOT_2, new ResourceLocation(Constants.BOTANY_MOD_ID, "gui.slot.ceramic"));
  ceramicSlot2.setValidator(new SlotValidatorDesignMaterial(this.type));
  new ComponentDesignerRecipe(machine, this.type);
}
origin: ForestryMC/Binnie

@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);
}
origin: ForestryMC/Binnie

@Override
public void createMachine(final Machine machine) {
  new ExtraBeeMachines.ComponentExtraBeeGUI(machine, ExtraBeesGUID.ALVEARY_FRAME);
  final ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
  inventory.addSlot(AlvearyFrame.SLOT_FRAME, getSlotRL("frame")).setValidator(new SlotValidatorFrame());
  new ComponentFrameModifier(machine);
}
origin: ForestryMC/Binnie

@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);
}
origin: ForestryMC/Binnie

@Override
public void createMachine(final Machine machine) {
  new ExtraBeeMachines.ComponentExtraBeeGUI(machine, ExtraBeesGUID.ALVEARY_MUTATOR);
  final ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
  inventory.addSlot(AlvearyMutator.SLOT_MUTATOR, getSlotRL("mutator")).setValidator(new SlotValidatorMutator());
  new ComponentMutatorModifier(machine);
}
origin: ForestryMC/Binnie

  @Override
  public void createMachine(final Machine machine) {
    new ExtraBeeMachines.ComponentExtraBeeGUI(machine, ExtraBeesGUID.ALVEARY_STIMULATOR);
    final ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
    inventory.addSlot(AlvearyStimulator.SLOT_CIRCUIT, getSlotRL("circuit")).setValidator(new SlotValidatorCircuit());
    final ComponentPowerReceptor power = new ComponentPowerReceptor(machine);
    new ComponentStimulatorModifier(machine);
  }
}
origin: ForestryMC/Binnie

@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);
}
binnie.core.machines.inventoryComponentInventorySlotsaddSlot

Popular methods of ComponentInventorySlots

  • <init>
  • addSlotArray
  • getInternalSlot
  • getMachine
  • getSlot
  • isItemValidForSlot
  • isReadOnly
  • markDirty
  • readFromNBT
  • writeToNBT

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now