--- a/net/minecraft/advancements/critereon/InventoryChangeTrigger.java
+++ b/net/minecraft/advancements/critereon/InventoryChangeTrigger.java
@@ -64,7 +64,7 @@
         );
 
         public static Criterion<InventoryChangeTrigger.TriggerInstance> hasItems(ItemPredicate.Builder... p_298231_) {
-            return hasItems(Stream.of(p_298231_).map(ItemPredicate.Builder::build).toArray(p_297901_ -> new ItemPredicate[p_297901_]));
+            return hasItems(Stream.of(p_298231_).map(ItemPredicate.Builder::build).<ItemPredicate>toArray(p_297901_ -> new ItemPredicate[p_297901_]));
         }
 
         public static Criterion<InventoryChangeTrigger.TriggerInstance> hasItems(ItemPredicate... p_43198_) {
