From 12c2cc356d6a9e4b2b39b5fd4473ef73572b1559 Mon Sep 17 00:00:00 2001 From: Light_Quanta Date: Tue, 15 Jul 2025 01:35:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=86=B7=E6=B1=97=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/recipe/ModPotionRecipes.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/recipe/ModPotionRecipes.java b/src/main/java/com/atsuishio/superbwarfare/recipe/ModPotionRecipes.java index 43b11e6af..ed7cfc1d3 100644 --- a/src/main/java/com/atsuishio/superbwarfare/recipe/ModPotionRecipes.java +++ b/src/main/java/com/atsuishio/superbwarfare/recipe/ModPotionRecipes.java @@ -2,8 +2,8 @@ package com.atsuishio.superbwarfare.recipe; import com.atsuishio.superbwarfare.Mod; import com.atsuishio.superbwarfare.init.ModPotions; -import com.momosoftworks.coldsweat.util.item.PotionUtils; import net.minecraft.core.Holder; +import net.minecraft.core.component.DataComponents; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.item.alchemy.Potion; @@ -34,7 +34,14 @@ public class ModPotionRecipes { } private static ItemStack potion(Holder potion) { - return PotionUtils.setPotion(Items.POTION.getDefaultInstance(), potion); + var stack = Items.POTION.getDefaultInstance(); + var contents = stack.get(DataComponents.POTION_CONTENTS); + + if (contents != null) { + stack.set(DataComponents.POTION_CONTENTS, contents.withPotion(potion)); + } + + return stack; } private static IBrewingRecipe createRecipe(Ingredient input, Ingredient ingredient, ItemStack output) {