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 --- gradle.properties | 6 +++--- .../client/forge/DefaultClientPluginImpl.java | 21 ++++++++++----------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/gradle.properties b/gradle.properties index ac4e980d2..d2f1209a6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,12 +4,12 @@ unstable=false supported_version=1.20.2 minecraft_version=1.20.2 platforms=fabric,forge,neoforge -forge_version=48.0.1 -neoforge_version=20.2.52-beta +forge_version=48.1.0 +neoforge_version=20.2.86 fabricloader_version=0.14.22 cloth_config_version=12.0.111 modmenu_version=7.0.0 fabric_api=0.89.2+1.20.2 -architectury_version=10.0.13 +architectury_version=10.0.17 api_exculde= #api_include=me.shedaniel.cloth:cloth-events,me.shedaniel.cloth:config-2,me.sargunvohra.mcmods:autoconfig1u,org.jetbrains:annotations,net.fabricmc.fabric-api:fabric 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