Deprecate magic values

This commit is contained in:
Wesley Wolfe
2013-08-19 13:32:18 -05:00
parent 52215c6171
commit 1f83111208
108 changed files with 1194 additions and 11 deletions

View File

@@ -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()) {