aboutsummaryrefslogtreecommitdiff
path: root/forge/src/main/java/me/shedaniel/rei/plugin
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-08-02 19:54:29 +0800
committershedaniel <daniel@shedaniel.me>2021-08-02 19:58:20 +0800
commitb866becfb620c02a74fb990915001e154b5d2b0b (patch)
tree904a3cb692af8a8ec059852d6b450e2a00c58621 /forge/src/main/java/me/shedaniel/rei/plugin
parent9f29770195319484f534de09fb221c66f31e0247 (diff)
downloadRoughlyEnoughItems-b866becfb620c02a74fb990915001e154b5d2b0b.tar.gz
RoughlyEnoughItems-b866becfb620c02a74fb990915001e154b5d2b0b.tar.bz2
RoughlyEnoughItems-b866becfb620c02a74fb990915001e154b5d2b0b.zip
Welcome, Forge 1.17
Diffstat (limited to 'forge/src/main/java/me/shedaniel/rei/plugin')
-rw-r--r--forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java8
-rw-r--r--forge/src/main/java/me/shedaniel/rei/plugin/common/forge/DefaultPluginImpl.java8
2 files changed, 8 insertions, 8 deletions
diff --git a/forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java b/forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java
index 7c47d1c84..9ad85f452 100644
--- a/forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java
+++ b/forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java
@@ -42,9 +42,9 @@ public class DefaultClientPluginImpl {
Set<Potion> potions = Sets.newLinkedHashSet();
for (Ingredient container : PotionBrewing.ALLOWED_CONTAINERS) {
for (PotionBrewing.Mix<Potion> mix : PotionBrewing.POTION_MIXES) {
- IRegistryDelegate<Potion> from = mix.from;
+ IRegistryDelegate<Potion> from = mix.f_43532_;
Ingredient ingredient = mix.ingredient;
- IRegistryDelegate<Potion> to = mix.to;
+ IRegistryDelegate<Potion> to = mix.f_43534_;
Ingredient base = Ingredient.of(Arrays.stream(container.getItems())
.map(ItemStack::copy)
.map(stack -> PotionUtils.setPotion(stack, from.get())));
@@ -59,9 +59,9 @@ public class DefaultClientPluginImpl {
}
for (Potion potion : potions) {
for (PotionBrewing.Mix<Item> mix : PotionBrewing.CONTAINER_MIXES) {
- IRegistryDelegate<Item> from = mix.from;
+ IRegistryDelegate<Item> from = mix.f_43532_;
Ingredient ingredient = mix.ingredient;
- IRegistryDelegate<Item> to = mix.to;
+ IRegistryDelegate<Item> to = mix.f_43534_;
Ingredient base = Ingredient.of(PotionUtils.setPotion(new ItemStack(from.get()), potion));
ItemStack output = PotionUtils.setPotion(new ItemStack(to.get()), potion);
clientPlugin.registerBrewingRecipe(base, ingredient, output);
diff --git a/forge/src/main/java/me/shedaniel/rei/plugin/common/forge/DefaultPluginImpl.java b/forge/src/main/java/me/shedaniel/rei/plugin/common/forge/DefaultPluginImpl.java
index bc7780d11..cc87da5b9 100644
--- a/forge/src/main/java/me/shedaniel/rei/plugin/common/forge/DefaultPluginImpl.java
+++ b/forge/src/main/java/me/shedaniel/rei/plugin/common/forge/DefaultPluginImpl.java
@@ -24,10 +24,10 @@
package me.shedaniel.rei.plugin.common.forge;
import com.google.common.base.Predicates;
-import dev.architectury.hooks.forge.FluidStackHooksForge;
+import dev.architectury.event.CompoundEventResult;
+import dev.architectury.hooks.fluid.forge.FluidStackHooksForge;
import me.shedaniel.rei.api.common.fluid.FluidSupportProvider;
import me.shedaniel.rei.api.common.util.EntryStacks;
-import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.fluids.FluidStack;
@@ -44,7 +44,7 @@ public class DefaultPluginImpl {
if (handlerOptional.isPresent()) {
IFluidHandlerItem handler = handlerOptional.orElse(null);
if (handler.getTanks() > 0) {
- return InteractionResultHolder.success(IntStream.range(0, handler.getTanks())
+ return CompoundEventResult.interruptTrue(IntStream.range(0, handler.getTanks())
.mapToObj(handler::getFluidInTank)
.filter(Predicates.not(FluidStack::isEmpty))
.map(FluidStackHooksForge::fromForge)
@@ -52,7 +52,7 @@ public class DefaultPluginImpl {
}
}
- return InteractionResultHolder.pass(null);
+ return CompoundEventResult.pass();
});
}
}