From b666fd341c5a266551b20c8cc7c10a3a3a8140d4 Mon Sep 17 00:00:00 2001 From: aromaa Date: Sun, 10 Nov 2024 02:15:07 +0200 Subject: [PATCH] Fix recipe item type predicate --- .../common/item/recipe/ingredient/SpongeIngredient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/spongepowered/common/item/recipe/ingredient/SpongeIngredient.java b/src/main/java/org/spongepowered/common/item/recipe/ingredient/SpongeIngredient.java index bbb97b5c596..681ad55e969 100644 --- a/src/main/java/org/spongepowered/common/item/recipe/ingredient/SpongeIngredient.java +++ b/src/main/java/org/spongepowered/common/item/recipe/ingredient/SpongeIngredient.java @@ -98,7 +98,8 @@ public class SpongeIngredient extends Ingredient { return DataResult.success(new SpongeRawIngredient(spongeIngredient.type, stacks, Optional.empty())); } case SpongePredicateItemList.TYPE_PREDICATE -> { - return DataResult.success(new SpongeRawIngredient(spongeIngredient.type, List.of(), Optional.ofNullable(spongeIngredient.predicateId))); + final var stacks = Arrays.asList(spongeIngredient.itemList.stacks); + return DataResult.success(new SpongeRawIngredient(spongeIngredient.type, stacks, Optional.ofNullable(spongeIngredient.predicateId))); } } throw new NotImplementedException("Serializing SpongeIngredient is not implemented yet.");