From ebd75d2cf158873d77e4b72fc8cbf55de81442b3 Mon Sep 17 00:00:00 2001 From: drcrazy Date: Fri, 27 Apr 2018 15:11:19 +0300 Subject: [PATCH] This is an actual CT support for fluid replicator. --- .../compat/crafttweaker/CTFluidReplicator.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/techreborn/compat/crafttweaker/CTFluidReplicator.java b/src/main/java/techreborn/compat/crafttweaker/CTFluidReplicator.java index 6f80aa55d..ce741227b 100644 --- a/src/main/java/techreborn/compat/crafttweaker/CTFluidReplicator.java +++ b/src/main/java/techreborn/compat/crafttweaker/CTFluidReplicator.java @@ -26,7 +26,7 @@ package techreborn.compat.crafttweaker; import java.util.Optional; -import net.minecraftforge.fluids.Fluid; +import crafttweaker.api.liquid.ILiquidStack; import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; import techreborn.api.fluidreplicator.FluidReplicatorRecipe; @@ -41,16 +41,18 @@ public class CTFluidReplicator { @ZenMethod @ZenDocumentation("int input, ILiquidStack output, int ticks, int euPerTick") - public static void addRecipe(int input, Fluid output, int ticks, int euPerTick) { - if(input > 0 || ticks > 0 || euPerTick > 0){ - FluidReplicatorRecipeList.addRecipe(new FluidReplicatorRecipe(input, output, ticks, euPerTick)); + public static void addRecipe(int input, ILiquidStack output, int ticks, int euPerTick) { + if (input > 0 || ticks > 0 || euPerTick > 0) { + FluidReplicatorRecipeList.addRecipe(new FluidReplicatorRecipe(input, + CraftTweakerCompat.toFluidStack(output).getFluid(), ticks, euPerTick)); } } - + @ZenMethod @ZenDocumentation("ILiquidStack fluid") - public static void removeRecipe(Fluid output) { - Optional recipe = FluidReplicatorRecipeList.getRecipeForFluid(output); + public static void removeRecipe(ILiquidStack output) { + Optional recipe = FluidReplicatorRecipeList + .getRecipeForFluid(CraftTweakerCompat.toFluidStack(output).getFluid()); if (recipe.isPresent()) { FluidReplicatorRecipeList.removeRecipe(recipe.get()); }