diff options
| author | shedaniel <daniel@shedaniel.me> | 2023-12-10 00:12:42 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2023-12-10 00:12:42 +0800 |
| commit | a5f690f551216ee6203ab22c8d0328b3a0a2fbe4 (patch) | |
| tree | e3cdc6d9cc2460b84a7c0161665d4e2d776bc8fc | |
| parent | 7bc877f7af1564090ec21535f77aff9e2940d9df (diff) | |
| download | RoughlyEnoughItems-a5f690f551216ee6203ab22c8d0328b3a0a2fbe4.tar.gz RoughlyEnoughItems-a5f690f551216ee6203ab22c8d0328b3a0a2fbe4.tar.bz2 RoughlyEnoughItems-a5f690f551216ee6203ab22c8d0328b3a0a2fbe4.zip | |
Update NeoForge and Architectury API
| -rw-r--r-- | gradle.properties | 6 | ||||
| -rw-r--r-- | neoforge/src/main/java/me/shedaniel/rei/plugin/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<Potion> potions = Sets.newLinkedHashSet(); for (Ingredient container : PotionBrewing.ALLOWED_CONTAINERS) { for (PotionBrewing.Mix<Potion> mix : PotionBrewing.POTION_MIXES) { - Holder.Reference<Potion> from = mix.from; + Potion from = mix.from; Ingredient ingredient = mix.ingredient; - Holder.Reference<Potion> 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<Item> mix : PotionBrewing.CONTAINER_MIXES) { - Holder.Reference<Item> from = mix.from; + Item from = mix.from; Ingredient ingredient = mix.ingredient; - Holder.Reference<Item> 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); } } |
