From a5f690f551216ee6203ab22c8d0328b3a0a2fbe4 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Sun, 10 Dec 2023 00:12:42 +0800 Subject: Update NeoForge and Architectury API --- .../client/forge/DefaultClientPluginImpl.java | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'neoforge/src/main/java') diff --git a/neoforge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java b/neoforge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java index a89bd0a1b..fe3a2aa3d 100644 --- a/neoforge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java +++ b/neoforge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java @@ -27,7 +27,6 @@ import com.google.common.collect.Sets; import me.shedaniel.rei.api.client.registry.display.DisplayRegistry; import me.shedaniel.rei.plugin.client.BuiltinClientPlugin; import me.shedaniel.rei.plugin.client.DefaultClientPlugin; -import net.minecraft.core.Holder; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.alchemy.Potion; @@ -59,28 +58,28 @@ public class DefaultClientPluginImpl extends DefaultClientPlugin { Set potions = Sets.newLinkedHashSet(); for (Ingredient container : PotionBrewing.ALLOWED_CONTAINERS) { for (PotionBrewing.Mix mix : PotionBrewing.POTION_MIXES) { - Holder.Reference from = mix.from; + Potion from = mix.from; Ingredient ingredient = mix.ingredient; - Holder.Reference to = mix.to; + Potion to = mix.to; Ingredient base = Ingredient.of(Arrays.stream(container.getItems()) .map(ItemStack::copy) - .map(stack -> PotionUtils.setPotion(stack, from.get()))); + .map(stack -> PotionUtils.setPotion(stack, from))); ItemStack output = Arrays.stream(container.getItems()) .map(ItemStack::copy) - .map(stack -> PotionUtils.setPotion(stack, to.get())) + .map(stack -> PotionUtils.setPotion(stack, to)) .findFirst().orElse(ItemStack.EMPTY); clientPlugin.registerBrewingRecipe(base, ingredient, output); - potions.add(from.get()); - potions.add(to.get()); + potions.add(from); + potions.add(to); } } for (Potion potion : potions) { for (PotionBrewing.Mix mix : PotionBrewing.CONTAINER_MIXES) { - Holder.Reference from = mix.from; + Item from = mix.from; Ingredient ingredient = mix.ingredient; - Holder.Reference to = mix.to; - Ingredient base = Ingredient.of(PotionUtils.setPotion(new ItemStack(from.get()), potion)); - ItemStack output = PotionUtils.setPotion(new ItemStack(to.get()), potion); + Item to = mix.to; + Ingredient base = Ingredient.of(PotionUtils.setPotion(new ItemStack(from), potion)); + ItemStack output = PotionUtils.setPotion(new ItemStack(to), potion); clientPlugin.registerBrewingRecipe(base, ingredient, output); } } -- cgit