ShapedRecipe ingredient amount

Discussion in 'Spigot Plugin Development' started by jacklin213, May 7, 2015.

  1. I couldn't help notice the fact that a int a shapedrecipe you cant specify the amount you want of 1 ingredient where as in shapelessrecipe you can, does anyone know how to do something like that for a shapedrecipe

    - XOO
    - OXO
    - OOX

    Each X represents 2 sticks

  2. You can, what means O ? if it is air I would leave it null, so only X.

    U can specify the amount, just when you define X so : .setIngredient("X", Material.STICK, 2). 2 stands for your amount.
  3. But thats the raw data, if you see the documentation, so it doesnt work?
  4. @jacklin213 you probably will end up either writing intermediate ingredients (for example, one recipe which combines two sticks, and then one which combines three such bundles into your final recipe) or writing your own handler, using the crafting events.
  5. hmm. yeah, youre right. I don't think that it's possible then
  6. Hmm i kind of solved this with PrepareItemCraftEvent, but its a bit buggy, if anyone has a better solution please tell me