Tabnine Logo
ItemStackList.add
Code IndexAdd Tabnine to your IDE (free)

How to use
add
method
in
slimeknights.mantle.util.ItemStackList

Best Java code snippets using slimeknights.mantle.util.ItemStackList.add (Showing top 2 results out of 315)

origin: SlimeKnights/TinkersConstruct

 @Override
 protected ItemStackList getDemoTools(ItemStack[][] inputItems) {
  if(inputItems.length == 0) {
   return ItemStackList.create();
  }

  ItemStackList demo = super.getDemoTools(inputItems);

  ItemStackList out = ItemStackList.create();

  for(int i = 0; i < inputItems[0].length; i++) {
   if(inputItems[0][i].getItem() == TinkerTools.sharpeningKit) {
    Material material = TinkerTools.sharpeningKit.getMaterial(inputItems[0][i]);
    IModifier modifier = TinkerRegistry.getModifier("fortify" + material.getIdentifier());
    if(modifier != null) {
     ItemStack stack = demo.get(i % demo.size()).copy();
     modifier.apply(stack);
     out.add(stack);
    }
   }
  }

  return out;
 }
}
origin: SlimeKnights/Mantle

/**
 * Create an ItemStackList from the given elements.
 */
public static ItemStackList of(IInventory inventory) {
 ItemStackList itemStackList = withSize(inventory.getSizeInventory());
 for(int i = 0; i < inventory.getSizeInventory(); i++) {
  itemStackList.add(inventory.getStackInSlot(i));
 }
 return itemStackList;
}
slimeknights.mantle.utilItemStackListadd

Popular methods of ItemStackList

  • create
  • get
  • set
  • size
  • withSize
    Create an empty ItemStackList with the given size
  • <init>
  • addAll
  • of
    Create an ItemStackList from the given elements.

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • BoxLayout (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best plugins for Eclipse
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