aboutsummaryrefslogtreecommitdiff
path: root/neoforge/src
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2023-12-10 00:12:42 +0800
committershedaniel <daniel@shedaniel.me>2023-12-10 00:12:42 +0800
commita5f690f551216ee6203ab22c8d0328b3a0a2fbe4 (patch)
treee3cdc6d9cc2460b84a7c0161665d4e2d776bc8fc /neoforge/src
parent7bc877f7af1564090ec21535f77aff9e2940d9df (diff)
downloadRoughlyEnoughItems-a5f690f551216ee6203ab22c8d0328b3a0a2fbe4.tar.gz
RoughlyEnoughItems-a5f690f551216ee6203ab22c8d0328b3a0a2fbe4.tar.bz2
RoughlyEnoughItems-a5f690f551216ee6203ab22c8d0328b3a0a2fbe4.zip
Update NeoForge and Architectury API
Diffstat (limited to 'neoforge/src')
-rw-r--r--neoforge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java21
1 files changed, 10 insertions, 11 deletions
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);
}
}