You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @throws NullPointerException if the given instance is null.
62
-
* @throws IllegalArgumentException if the given instance is empty or an amount smaller than one; or if no types or only a single type is passed. Call via
63
-
* {@link #from(IChemicalProvider, long)} if you only have one element.
62
+
* @throws IllegalArgumentException if the given instance is empty or an amount smaller than one; or if no chemicals are passed.
thrownewIllegalArgumentException("Attempted to create an ChemicalStackIngredients with less than two chemicals. At least one chemical is required, and if you only have one use from(IChemicalProvider, long) instead.");
66
+
if (chemicals.length== 0) {
67
+
thrownewIllegalArgumentException("Attempted to create an ChemicalStackIngredients with no chemicals.");
thrownewIllegalArgumentException("Attempted to create an FluidStackIngredient with less than two fluids. At least one fluid is required, and if you only have one use from(Fluid, int) instead.");
69
+
if (fluids.length== 0) {
70
+
thrownewIllegalArgumentException("Attempted to create an FluidStackIngredient with no fluids.");
* Creates an Ingredient that matches any of the provided types.
38
38
*
39
-
* @param amount Amount needed.
40
-
* @param items Types to match.
39
+
* @param amount Amount needed.
40
+
* @param items Types to match.
41
41
*
42
42
* @throws NullPointerException if the given instance is null.
43
-
* @throws IllegalArgumentException if the given instance is empty or an amount smaller than one; or if no types or only a single type is passed. Call via
44
-
* {@link #from(Object, int)} if you only have one element.
43
+
* @throws IllegalArgumentException if the given instance is empty or an amount smaller than one; or if no types are passed.
* @param items Item providers that provides the items to match.
97
97
*
98
-
* @throws IllegalArgumentException if no items are passed, or only a single item is passed. Call via {@link #from(ItemLike)} if you only have one element.
98
+
* @throws IllegalArgumentException if no items are passed.
99
99
* @implNote This wraps via {@link #from(Ingredient)} so if there is any durability or default NBT it will <strong>NOT</strong> be included in the ingredient. If this
100
100
* is not desired, manually create the ingredients via {@link DataComponentIngredient} and call {@link #from(Ingredient)}.
* @param items Item providers that provides the items to match.
112
112
*
113
-
* @throws IllegalArgumentException if no items are passed, or only a single item is passed. Call via {@link #from(ItemLike, int)} if you only have one element.
113
+
* @throws IllegalArgumentException if no items are passed.
114
114
* @implNote This wraps via {@link #from(Ingredient, int)} so if there is any durability or default NBT it will <strong>NOT</strong> be included in the ingredient. If
115
115
* this is not desired, manually create the ingredients via {@link DataComponentIngredient} and call {@link #from(Ingredient, int)}.
thrownewIllegalArgumentException("Attempted to create an ItemStackIngredient with less than two items. At least one item is required, and if you only have one use from(ItemLike, int) instead.");
119
+
if (items.length== 0) {
120
+
thrownewIllegalArgumentException("Attempted to create an ItemStackIngredient with no items.");
0 commit comments