Class Ingredient
java.lang.Object
valorless.valorlessutils.crafting.Ingredient
Represents an ingredient used in crafting recipes.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIngredient
(String letter, org.bukkit.inventory.ItemStack item) Constructs an Ingredient object with an identification letter and an ItemStack.
The ingredient's material will also be set to the material of 'item'.Ingredient
(String letter, org.bukkit.Material material) Constructs an Ingredient object with an identification letter and a Material. -
Method Summary
-
Field Details
-
letter
public char letterThe identification letter of the ingredient. -
item
public org.bukkit.inventory.ItemStack itemThe ItemStack representing the ingredient. -
material
public org.bukkit.Material materialThe Material of the ingredient. -
amount
public int amountAmount needed when using Shapeless recipes
-
-
Constructor Details
-
Ingredient
Constructs an Ingredient object with an identification letter and an ItemStack.
The ingredient's material will also be set to the material of 'item'.- Parameters:
letter
- The identification letter.item
- The ItemStack representing the ingredient.
-
Ingredient
Constructs an Ingredient object with an identification letter and a Material.- Parameters:
letter
- The identification letter.material
- The Material of the ingredient.
-
-
Method Details
-
SetAmount
public void SetAmount(int amount) Set the amount of the Ingredient required, for Shapeless recipes.- Parameters:
amount
- The amount of the ingredient. (1 - 64)
-
toString
Returns a string representation of the Ingredient object.
-