diff --git a/src/main/java/blusunrize/immersiveengineering/common/crafting/PotionHelper.java b/src/main/java/blusunrize/immersiveengineering/common/crafting/PotionHelper.java index 2880bce3a8..e95e5532f2 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/crafting/PotionHelper.java +++ b/src/main/java/blusunrize/immersiveengineering/common/crafting/PotionHelper.java @@ -9,6 +9,7 @@ package blusunrize.immersiveengineering.common.crafting; +import blusunrize.immersiveengineering.ImmersiveEngineering; import blusunrize.immersiveengineering.api.IETags; import blusunrize.immersiveengineering.api.crafting.FluidTagInput; import blusunrize.immersiveengineering.api.crafting.IngredientWithSize; @@ -47,7 +48,11 @@ public static FluidTagInput getFluidTagForType(Holder type, int amount) public static void applyToAllPotionRecipes(PotionRecipeProcessor out) { - PotionBrewing brewingData = ServerLifecycleHooks.getCurrentServer().potionBrewing(); + final PotionBrewing brewingData; + if(ServerLifecycleHooks.getCurrentServer()!=null) + brewingData = ServerLifecycleHooks.getCurrentServer().potionBrewing(); + else + brewingData = ImmersiveEngineering.proxy.getClientWorld().potionBrewing(); // Vanilla for(var mixPredicate : ((PotionBrewingAccess)brewingData).getConversions()) if(mixPredicate.getTo()!=Potions.MUNDANE&&mixPredicate.getTo()!=Potions.THICK) @@ -57,7 +62,7 @@ public static void applyToAllPotionRecipes(PotionRecipeProcessor out) ); // Modded - for(IBrewingRecipe recipe : ((PotionBrewingAccess)brewingData).getRegistry().recipes()) + for(IBrewingRecipe recipe : brewingData.getRecipes()) if(recipe instanceof BrewingRecipe brewingRecipe) { IngredientWithSize ingredient = new IngredientWithSize(brewingRecipe.getIngredient()); diff --git a/src/main/java/blusunrize/immersiveengineering/mixin/accessors/PotionBrewingAccess.java b/src/main/java/blusunrize/immersiveengineering/mixin/accessors/PotionBrewingAccess.java index 46225482ff..49cd1d89ff 100644 --- a/src/main/java/blusunrize/immersiveengineering/mixin/accessors/PotionBrewingAccess.java +++ b/src/main/java/blusunrize/immersiveengineering/mixin/accessors/PotionBrewingAccess.java @@ -11,7 +11,6 @@ import net.minecraft.world.item.alchemy.Potion; import net.minecraft.world.item.alchemy.PotionBrewing; -import net.neoforged.neoforge.common.brewing.BrewingRecipeRegistry; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; @@ -22,7 +21,4 @@ public interface PotionBrewingAccess { @Accessor("potionMixes") List> getConversions(); - - @Accessor("registry") - BrewingRecipeRegistry getRegistry(); }