--- a/net/minecraft/data/recipes/RecipeProvider.java
+++ b/net/minecraft/data/recipes/RecipeProvider.java
@@ -693,7 +693,7 @@
     }
 
     private static Criterion<InventoryChangeTrigger.TriggerInstance> inventoryTrigger(ItemPredicate.Builder... p_299111_) {
-        return inventoryTrigger(Arrays.stream(p_299111_).map(ItemPredicate.Builder::build).toArray(p_297943_ -> new ItemPredicate[p_297943_]));
+        return inventoryTrigger(Arrays.stream(p_299111_).map(ItemPredicate.Builder::build).<ItemPredicate>toArray(p_297943_ -> new ItemPredicate[p_297943_]));
     }
 
     private static Criterion<InventoryChangeTrigger.TriggerInstance> inventoryTrigger(ItemPredicate... p_126012_) {
