13
0
geforkt von Mirrors/Paper

SPIGOT-7891: Can't remove second ingredient of MerchantRecipe

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2024-09-07 18:57:55 +10:00
Ursprung fbea3cdc0c
Commit 616ec5f700

Datei anzeigen

@ -120,6 +120,8 @@ public class CraftMerchantRecipe extends MerchantRecipe {
if (ingredients.size() > 1) { if (ingredients.size() > 1) {
net.minecraft.world.item.ItemStack costB = CraftItemStack.asNMSCopy(ingredients.get(1)); net.minecraft.world.item.ItemStack costB = CraftItemStack.asNMSCopy(ingredients.get(1));
handle.costB = Optional.of(new ItemCost(costB.getItemHolder(), costB.getCount(), DataComponentPredicate.allOf(costB.getComponents()), costB)); handle.costB = Optional.of(new ItemCost(costB.getItemHolder(), costB.getCount(), DataComponentPredicate.allOf(costB.getComponents()), costB));
} else {
handle.costB = Optional.empty();
} }
return handle; return handle;
} }