recipe amount of material

Discussion in 'Spigot Plugin Development' started by WAS, May 1, 2017.

  1. WAS

    WAS

    Is there a way to set the amount of material for a slot in a recipe or is this not possible? ShapedRecipe#setIngredient doesn't appear to handle an amount.
     
  2. Listen for the PreCraftItemEvent (i think is called like this) and there do you thing
     
    • Like Like x 1
  3. WAS

    WAS

    Oh that makes sense, while hackyish. Than again, what is most this API? lol Wonder why setIngredient doesn't handle an amount.
     
  4. If im right, with setingredient, you use itemstacks. Cant you use that to set amounts?
     
  5. WAS

    WAS

    It only takes a Material, or I believe deprecated; a MaterialData.
     
  6. use this: (recipe).setIngredient(your symbol, Material.Yourmaterial, your amount);
     
    • Like Like x 1
  7. WAS

    WAS