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

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

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

origin: ForestryMC/Binnie

@Override
public boolean canExtractItem(final int index, final ItemStack itemstack, final EnumFacing direction) {
  InventorySlot slot = this.getSlot(index);
  return slot != null && slot.canExtract(direction);
}
origin: ForestryMC/Binnie

private boolean isReadOnly(final int slot) {
  final InventorySlot iSlot = this.getSlot(slot);
  return iSlot == null || iSlot.isReadOnly();
}
origin: ForestryMC/Binnie

@Override
public boolean canInsertItem(final int index, final ItemStack itemstack, final EnumFacing direction) {
  if (!isItemValidForSlot(index, itemstack)) {
    return false;
  }
  InventorySlot slot = this.getSlot(index);
  return slot != null && slot.canInsert(direction);
}
origin: ForestryMC/Binnie

@Override
public boolean isItemValidForSlot(final int index, final ItemStack itemStack) {
  InventorySlot slot = this.getSlot(index);
  return slot != null && (slot.isValid(itemStack) && !this.isReadOnly(index));
}
origin: ForestryMC/Binnie

  @Nullable
  @Override
  public InventorySlot getSlot(int index) {
    Machine machine = getMachine();
    if (machine == null) {
      return null;
    }
    if (!machine.hasComponent(ComponentInventorySlots.class)) {
      return null;
    }
    ComponentInventorySlots inventorySlots = machine.getComponent(ComponentInventorySlots.class);
    return inventorySlots.getSlot(index);
  }
}
binnie.core.machines.inventoryComponentInventorySlotsgetSlot

Popular methods of ComponentInventorySlots

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

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top plugins for WebStorm
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