Deprecate magic values
This commit is contained in:
@@ -59,7 +59,9 @@ public class ShapelessRecipe implements Recipe {
|
||||
* @param ingredient The ingredient to add.
|
||||
* @param rawdata The data value, or -1 to allow any data value.
|
||||
* @return The changed recipe, so you can chain calls.
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public ShapelessRecipe addIngredient(Material ingredient, int rawdata) {
|
||||
return addIngredient(1, ingredient, rawdata);
|
||||
}
|
||||
@@ -93,7 +95,9 @@ public class ShapelessRecipe implements Recipe {
|
||||
* @param ingredient The ingredient to add.
|
||||
* @param rawdata The data value, or -1 to allow any data value.
|
||||
* @return The changed recipe, so you can chain calls.
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public ShapelessRecipe addIngredient(int count, Material ingredient, int rawdata) {
|
||||
Validate.isTrue(ingredients.size() + count <= 9, "Shapeless recipes cannot have more than 9 ingredients");
|
||||
|
||||
@@ -166,7 +170,9 @@ public class ShapelessRecipe implements Recipe {
|
||||
* @param ingredient The ingredient to remove
|
||||
* @param rawdata The data value;
|
||||
* @return The changed recipe.
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public ShapelessRecipe removeIngredient(Material ingredient, int rawdata) {
|
||||
return removeIngredient(1, ingredient, rawdata);
|
||||
}
|
||||
@@ -180,7 +186,9 @@ public class ShapelessRecipe implements Recipe {
|
||||
* @param ingredient The ingredient to remove.
|
||||
* @param rawdata The data value.
|
||||
* @return The changed recipe.
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public ShapelessRecipe removeIngredient(int count, Material ingredient, int rawdata) {
|
||||
Iterator<ItemStack> iterator = ingredients.iterator();
|
||||
while (count > 0 && iterator.hasNext()) {
|
||||
|
||||
Reference in New Issue
Block a user