From 28d30f3c620ee15ac9c97b294b3e61cf91ac5c19 Mon Sep 17 00:00:00 2001 From: James Mitchell Date: Sun, 26 Jan 2025 13:36:17 -1000 Subject: [PATCH] Update JEI integration and add potion fluids to the ingredient list (#6934) * Update JEI integration and add potion fluids to the ingredient list This also resolves a minor issue where all virtual fluids were considered "flowing". Fixes https://github.com/mezz/JustEnoughItems/issues/3754 * Fixed JEI potion fluids registered without Bottle tag --------- Co-authored-by: goshante --- gradle.properties | 2 +- .../java/com/simibubi/create/AllFluids.java | 5 ++-- .../simibubi/create/compat/jei/CreateJEI.java | 20 ++++++++++++++ .../compat/jei/category/BasinCategory.java | 6 ++--- .../jei/category/CreateRecipeCategory.java | 26 ++++++------------- .../compat/jei/category/CrushingCategory.java | 2 +- .../jei/category/DeployingCategory.java | 2 +- .../jei/category/ItemApplicationCategory.java | 2 +- .../jei/category/ItemDrainCategory.java | 2 +- .../compat/jei/category/MillingCategory.java | 2 +- .../jei/category/PolishingCategory.java | 2 +- .../compat/jei/category/PressingCategory.java | 2 +- .../category/ProcessingViaFanCategory.java | 2 +- .../compat/jei/category/SawingCategory.java | 2 +- .../compat/jei/category/SpoutCategory.java | 2 +- .../SequencedAssemblySubCategory.java | 2 +- .../create/content/fluids/VirtualFluid.java | 24 +++++++++++++++-- .../content/fluids/potion/PotionFluid.java | 22 +++++++++++----- .../fluids/potion/PotionFluidHandler.java | 5 ++-- .../foundation/data/CreateRegistrate.java | 13 +++++----- .../foundation/data/VirtualFluidBuilder.java | 8 +++--- src/main/resources/META-INF/mods.toml | 7 +++++ 22 files changed, 105 insertions(+), 55 deletions(-) diff --git a/gradle.properties b/gradle.properties index 923699fb4..df343accb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,7 +25,7 @@ registrate_version = MC1.20-1.3.3 flywheel_minecraft_version = 1.20.1 flywheel_version = 1.0.0-beta-145 jei_minecraft_version = 1.20.1 -jei_version = 15.10.0.39 +jei_version = 15.19.0.85 curios_minecraft_version = 1.20.1 curios_version = 5.3.1 diff --git a/src/main/java/com/simibubi/create/AllFluids.java b/src/main/java/com/simibubi/create/AllFluids.java index 4e1e7f9b7..8595a404b 100644 --- a/src/main/java/com/simibubi/create/AllFluids.java +++ b/src/main/java/com/simibubi/create/AllFluids.java @@ -7,6 +7,8 @@ import java.util.function.Supplier; import javax.annotation.Nullable; +import com.simibubi.create.content.fluids.VirtualFluid; + import org.jetbrains.annotations.NotNull; import org.joml.Vector3f; @@ -14,7 +16,6 @@ import com.mojang.blaze3d.shaders.FogShape; import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.AllTags.AllFluidTags; import com.simibubi.create.content.decoration.palettes.AllPaletteStoneTypes; -import com.simibubi.create.content.fluids.VirtualFluid; import com.simibubi.create.content.fluids.potion.PotionFluid; import com.simibubi.create.content.fluids.potion.PotionFluid.PotionFluidType; import com.simibubi.create.foundation.utility.Color; @@ -46,7 +47,7 @@ public class AllFluids { } public static final FluidEntry POTION = - REGISTRATE.virtualFluid("potion", PotionFluidType::new, PotionFluid::new) + REGISTRATE.virtualFluid("potion", PotionFluidType::new, PotionFluid::createSource, PotionFluid::createFlowing) .lang("Potion") .register(); diff --git a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java index 58270c69f..56351d019 100644 --- a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java +++ b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java @@ -78,6 +78,7 @@ import mezz.jei.api.forge.ForgeTypes; import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.helpers.IPlatformFluidHelper; import mezz.jei.api.recipe.category.IRecipeCategory; +import mezz.jei.api.registration.IExtraIngredientRegistration; import mezz.jei.api.registration.IGuiHandlerRegistration; import mezz.jei.api.registration.IRecipeCatalystRegistration; import mezz.jei.api.registration.IRecipeCategoryRegistration; @@ -90,6 +91,7 @@ import net.minecraft.core.RegistryAccess; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.minecraft.world.item.alchemy.Potion; import net.minecraft.world.item.crafting.AbstractCookingRecipe; import net.minecraft.world.item.crafting.CraftingRecipe; import net.minecraft.world.item.crafting.Recipe; @@ -98,7 +100,9 @@ import net.minecraft.world.item.crafting.SmokingRecipe; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.crafting.IShapedRecipe; +import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fml.ModList; +import net.minecraftforge.registries.ForgeRegistries; @JeiPlugin @SuppressWarnings("unused") @@ -363,6 +367,22 @@ public class CreateJEI implements IModPlugin { registration.registerSubtypeInterpreter(ForgeTypes.FLUID_STACK, potionFluid.getFlowing(), interpreter); } + @Override + public void registerExtraIngredients(IExtraIngredientRegistration registration) { + Collection potions = ForgeRegistries.POTIONS.getValues(); + Collection potionFluids = new ArrayList<>(potions.size() * 3); + for (Potion potion : potions) { + // @goshante: Ingame potion fluids always have Bottle tag that specifies + // to what bottle type this potion belongs + // Potion fluid without this tag wouldn't be recognized by other mods + for (PotionFluid.BottleType bottleType : PotionFluid.BottleType.values()) { + FluidStack potionFluid = PotionFluid.of(1000, potion, bottleType); + potionFluids.add(potionFluid); + } + } + registration.addExtraIngredients(ForgeTypes.FLUID_STACK, potionFluids); + } + @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void registerGuiHandlers(IGuiHandlerRegistration registration) { diff --git a/src/main/java/com/simibubi/create/compat/jei/category/BasinCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/BasinCategory.java index 64b72748a..c07d4cec3 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/BasinCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/BasinCategory.java @@ -67,7 +67,7 @@ public class BasinCategory extends CreateRecipeCategory { .addSlot(RecipeIngredientRole.INPUT, 17 + xOffset + (i % 3) * 19, 51 - (i / 3) * 19) .setBackground(getRenderedSlot(), -1, -1) .addIngredients(ForgeTypes.FLUID_STACK, withImprovedVisibility(fluidIngredient.getMatchingFluidStacks())) - .addTooltipCallback(addFluidTooltip(fluidIngredient.getRequiredAmount())); + .addRichTooltipCallback(addFluidTooltip(fluidIngredient.getRequiredAmount())); i++; } @@ -82,7 +82,7 @@ public class BasinCategory extends CreateRecipeCategory { .addSlot(RecipeIngredientRole.OUTPUT, xPosition, yPosition) .setBackground(getRenderedSlot(result), -1, -1) .addItemStack(result.getStack()) - .addTooltipCallback(addStochasticTooltip(result)); + .addRichTooltipCallback(addStochasticTooltip(result)); i++; } @@ -94,7 +94,7 @@ public class BasinCategory extends CreateRecipeCategory { .addSlot(RecipeIngredientRole.OUTPUT, xPosition, yPosition) .setBackground(getRenderedSlot(), -1, -1) .addIngredient(ForgeTypes.FLUID_STACK, withImprovedVisibility(fluidResult)) - .addTooltipCallback(addFluidTooltip(fluidResult.getAmount())); + .addRichTooltipCallback(addFluidTooltip(fluidResult.getAmount())); i++; } diff --git a/src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java index b672341d1..6517830e1 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java @@ -8,6 +8,8 @@ import java.util.stream.Collectors; import javax.annotation.ParametersAreNonnullByDefault; +import mezz.jei.api.gui.ingredient.IRecipeSlotRichTooltipCallback; + import org.jetbrains.annotations.NotNull; import com.simibubi.create.AllFluids; @@ -108,11 +110,11 @@ public abstract class CreateRecipeCategory> implements IReci return recipe.getResultItem(level.registryAccess()); } - public static IRecipeSlotTooltipCallback addStochasticTooltip(ProcessingOutput output) { + public static IRecipeSlotRichTooltipCallback addStochasticTooltip(ProcessingOutput output) { return (view, tooltip) -> { float chance = output.getChance(); if (chance != 1) - tooltip.add(1, Lang.translateDirect("recipe.processing.chance", chance < 0.01 ? "<1" : (int) (chance * 100)) + tooltip.add(Lang.translateDirect("recipe.processing.chance", chance < 0.01 ? "<1" : (int) (chance * 100)) .withStyle(ChatFormatting.GOLD)); }; } @@ -130,11 +132,11 @@ public abstract class CreateRecipeCategory> implements IReci return display; } - public static IRecipeSlotTooltipCallback addFluidTooltip() { + public static IRecipeSlotRichTooltipCallback addFluidTooltip() { return addFluidTooltip(-1); } - public static IRecipeSlotTooltipCallback addFluidTooltip(int mbAmount) { + public static IRecipeSlotRichTooltipCallback addFluidTooltip(int mbAmount) { return (view, tooltip) -> { Optional displayed = view.getDisplayedIngredient(ForgeTypes.FLUID_STACK); if (displayed.isEmpty()) @@ -143,26 +145,14 @@ public abstract class CreateRecipeCategory> implements IReci FluidStack fluidStack = displayed.get(); if (fluidStack.getFluid().isSame(AllFluids.POTION.get())) { - Component name = fluidStack.getDisplayName(); - if (tooltip.isEmpty()) - tooltip.add(0, name); - else - tooltip.set(0, name); - ArrayList potionTooltip = new ArrayList<>(); PotionFluidHandler.addPotionTooltip(fluidStack, potionTooltip, 1); - tooltip.addAll(1, potionTooltip.stream().toList()); + tooltip.addAll(potionTooltip.stream().toList()); } int amount = mbAmount == -1 ? fluidStack.getAmount() : mbAmount; Component text = Components.literal(String.valueOf(amount)).append(Lang.translateDirect("generic.unit.millibuckets")).withStyle(ChatFormatting.GOLD); - if (tooltip.isEmpty()) - tooltip.add(0, text); - else { - List siblings = tooltip.get(0).getSiblings(); - siblings.add(Components.literal(" ")); - siblings.add(text); - } + tooltip.add(text); }; } diff --git a/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java index ec3cc2f70..e3b8279d8 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java @@ -41,7 +41,7 @@ public class CrushingCategory extends CreateRecipeCategory { .addSlot(RecipeIngredientRole.OUTPUT, 132, 8) .setBackground(getRenderedSlot(), -1, -1) .addIngredient(ForgeTypes.FLUID_STACK, withImprovedVisibility(recipe.getResultingFluid())) - .addTooltipCallback(addFluidTooltip(recipe.getResultingFluid().getAmount())); + .addRichTooltipCallback(addFluidTooltip(recipe.getResultingFluid().getAmount())); builder .addSlot(RecipeIngredientRole.OUTPUT, 132, 27) .setBackground(getRenderedSlot(), -1, -1) diff --git a/src/main/java/com/simibubi/create/compat/jei/category/MillingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/MillingCategory.java index be2f25059..0a7b4d73f 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/MillingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/MillingCategory.java @@ -42,7 +42,7 @@ public class MillingCategory extends CreateRecipeCategory { builder.addSlot(RecipeIngredientRole.OUTPUT, 131 + 19 * i, 50) .setBackground(getRenderedSlot(output), -1, -1) .addItemStack(output.getStack()) - .addTooltipCallback(addStochasticTooltip(output)); + .addRichTooltipCallback(addStochasticTooltip(output)); i++; } } diff --git a/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java index acf4604cf..a116a29e0 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java @@ -117,7 +117,7 @@ public abstract class ProcessingViaFanCategory> extends Crea .addSlot(RecipeIngredientRole.OUTPUT, 141 + xOffset, 48 + yOffset) .setBackground(getRenderedSlot(output), -1, -1) .addItemStack(output.getStack()) - .addTooltipCallback(addStochasticTooltip(output)); + .addRichTooltipCallback(addStochasticTooltip(output)); i++; } } diff --git a/src/main/java/com/simibubi/create/compat/jei/category/SawingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/SawingCategory.java index 8238a49d9..63b48c62d 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/SawingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/SawingCategory.java @@ -40,7 +40,7 @@ public class SawingCategory extends CreateRecipeCategory { .addSlot(RecipeIngredientRole.OUTPUT, 118 + xOffset, 48 + yOffset) .setBackground(getRenderedSlot(output), -1, -1) .addItemStack(output.getStack()) - .addTooltipCallback(addStochasticTooltip(output)); + .addRichTooltipCallback(addStochasticTooltip(output)); i++; } } diff --git a/src/main/java/com/simibubi/create/compat/jei/category/SpoutCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/SpoutCategory.java index cd810c034..72bca8604 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/SpoutCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/SpoutCategory.java @@ -112,7 +112,7 @@ public class SpoutCategory extends CreateRecipeCategory { .addSlot(RecipeIngredientRole.INPUT, 27, 32) .setBackground(getRenderedSlot(), -1, -1) .addIngredients(ForgeTypes.FLUID_STACK, withImprovedVisibility(recipe.getRequiredFluid().getMatchingFluidStacks())) - .addTooltipCallback(addFluidTooltip(recipe.getRequiredFluid().getRequiredAmount())); + .addRichTooltipCallback(addFluidTooltip(recipe.getRequiredFluid().getRequiredAmount())); builder .addSlot(RecipeIngredientRole.OUTPUT, 132, 51) .setBackground(getRenderedSlot(), -1, -1) diff --git a/src/main/java/com/simibubi/create/compat/jei/category/sequencedAssembly/SequencedAssemblySubCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/sequencedAssembly/SequencedAssemblySubCategory.java index 7c552a3f6..2976ba5e8 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/sequencedAssembly/SequencedAssemblySubCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/sequencedAssembly/SequencedAssemblySubCategory.java @@ -76,7 +76,7 @@ public abstract class SequencedAssemblySubCategory { .addSlot(RecipeIngredientRole.INPUT, x + 4, 15) .setBackground(CreateRecipeCategory.getRenderedSlot(), -1, -1) .addIngredients(ForgeTypes.FLUID_STACK, CreateRecipeCategory.withImprovedVisibility(fluidIngredient.getMatchingFluidStacks())) - .addTooltipCallback(CreateRecipeCategory.addFluidTooltip(fluidIngredient.getRequiredAmount())); + .addRichTooltipCallback(CreateRecipeCategory.addFluidTooltip(fluidIngredient.getRequiredAmount())); } @Override diff --git a/src/main/java/com/simibubi/create/content/fluids/VirtualFluid.java b/src/main/java/com/simibubi/create/content/fluids/VirtualFluid.java index d7c086f11..af4c358f1 100644 --- a/src/main/java/com/simibubi/create/content/fluids/VirtualFluid.java +++ b/src/main/java/com/simibubi/create/content/fluids/VirtualFluid.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.fluids; +import com.simibubi.create.content.fluids.potion.PotionFluid; + import net.minecraft.world.item.Item; import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Blocks; @@ -10,17 +12,35 @@ import net.minecraftforge.fluids.ForgeFlowingFluid; public class VirtualFluid extends ForgeFlowingFluid { - public VirtualFluid(Properties properties) { + public static VirtualFluid createSource(Properties properties) { + return new VirtualFluid(properties, true); + } + + public static VirtualFluid createFlowing(Properties properties) { + return new VirtualFluid(properties, false); + } + + + private final boolean source; + + public VirtualFluid(Properties properties, boolean source) { super(properties); + this.source = source; } @Override public Fluid getSource() { + if (source) { + return this; + } return super.getSource(); } @Override public Fluid getFlowing() { + if (source) { + return super.getFlowing(); + } return this; } @@ -36,7 +56,7 @@ public class VirtualFluid extends ForgeFlowingFluid { @Override public boolean isSource(FluidState p_207193_1_) { - return false; + return source; } @Override diff --git a/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluid.java b/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluid.java index fda2b5ea3..3bc1b75be 100644 --- a/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluid.java +++ b/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluid.java @@ -24,19 +24,29 @@ import net.minecraftforge.fluids.FluidStack; public class PotionFluid extends VirtualFluid { - public PotionFluid(Properties properties) { - super(properties); + public static PotionFluid createSource(Properties properties) { + return new PotionFluid(properties, true); } - public static FluidStack of(int amount, Potion potion) { - FluidStack fluidStack = new FluidStack(AllFluids.POTION.get() - .getSource(), amount); + public static PotionFluid createFlowing(Properties properties) { + return new PotionFluid(properties, false); + } + + public PotionFluid(Properties properties, boolean source) { + super(properties, source); + } + + public static FluidStack of(int amount, Potion potion, BottleType bottleType) { + + FluidStack fluidStack; + fluidStack = new FluidStack(AllFluids.POTION.get().getSource(), amount); addPotionToFluidStack(fluidStack, potion); + NBTHelper.writeEnum(fluidStack.getOrCreateTag(), "Bottle", bottleType); return fluidStack; } public static FluidStack withEffects(int amount, Potion potion, List customEffects) { - FluidStack fluidStack = of(amount, potion); + FluidStack fluidStack = of(amount, potion, BottleType.REGULAR); appendEffects(fluidStack, customEffects); return fluidStack; } diff --git a/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluidHandler.java b/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluidHandler.java index 19fd4411c..2c5c34b5a 100644 --- a/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluidHandler.java +++ b/src/main/java/com/simibubi/create/content/fluids/potion/PotionFluidHandler.java @@ -42,7 +42,7 @@ public class PotionFluidHandler { return stack.getItem() instanceof PotionItem && !(stack.getCraftingRemainingItem() .getItem() instanceof BucketItem); } - + public static Pair emptyPotion(ItemStack stack, boolean simulate) { FluidStack fluid = getFluidFromPotionItem(stack); if (!simulate) @@ -69,8 +69,7 @@ public class PotionFluidHandler { public static FluidStack getFluidFromPotion(Potion potion, BottleType bottleType, int amount) { if (potion == Potions.WATER && bottleType == BottleType.REGULAR) return new FluidStack(Fluids.WATER, amount); - FluidStack fluid = PotionFluid.of(amount, potion); - NBTHelper.writeEnum(fluid.getOrCreateTag(), "Bottle", bottleType); + FluidStack fluid = PotionFluid.of(amount, potion, bottleType); return fluid; } diff --git a/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java b/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java index 1eda3db41..349d60918 100644 --- a/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java +++ b/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java @@ -172,29 +172,30 @@ public class CreateRegistrate extends AbstractRegistrate { /* Fluids */ public FluidBuilder virtualFluid(String name, - FluidBuilder.FluidTypeFactory typeFactory, NonNullFunction factory) { + FluidBuilder.FluidTypeFactory typeFactory, NonNullFunction sourceFactory, + NonNullFunction flowingFactory) { return entry(name, c -> new VirtualFluidBuilder<>(self(), self(), name, c, new ResourceLocation(getModid(), "fluid/" + name + "_still"), - new ResourceLocation(getModid(), "fluid/" + name + "_flow"), typeFactory, factory)); + new ResourceLocation(getModid(), "fluid/" + name + "_flow"), typeFactory, sourceFactory, flowingFactory)); } public FluidBuilder virtualFluid(String name, ResourceLocation still, ResourceLocation flow, FluidBuilder.FluidTypeFactory typeFactory, - NonNullFunction factory) { - return entry(name, c -> new VirtualFluidBuilder<>(self(), self(), name, c, still, flow, typeFactory, factory)); + NonNullFunction sourceFactory, NonNullFunction flowingFactory) { + return entry(name, c -> new VirtualFluidBuilder<>(self(), self(), name, c, still, flow, typeFactory, sourceFactory, flowingFactory)); } public FluidBuilder virtualFluid(String name) { return entry(name, c -> new VirtualFluidBuilder(self(), self(), name, c, new ResourceLocation(getModid(), "fluid/" + name + "_still"), new ResourceLocation(getModid(), "fluid/" + name + "_flow"), - CreateRegistrate::defaultFluidType, VirtualFluid::new)); + CreateRegistrate::defaultFluidType, VirtualFluid::createSource, VirtualFluid::createFlowing)); } public FluidBuilder virtualFluid(String name, ResourceLocation still, ResourceLocation flow) { return entry(name, c -> new VirtualFluidBuilder<>(self(), self(), name, c, still, flow, - CreateRegistrate::defaultFluidType, VirtualFluid::new)); + CreateRegistrate::defaultFluidType, VirtualFluid::createSource, VirtualFluid::createFlowing)); } public FluidBuilder standardFluid(String name) { diff --git a/src/main/java/com/simibubi/create/foundation/data/VirtualFluidBuilder.java b/src/main/java/com/simibubi/create/foundation/data/VirtualFluidBuilder.java index 9b7250346..b384f59c6 100644 --- a/src/main/java/com/simibubi/create/foundation/data/VirtualFluidBuilder.java +++ b/src/main/java/com/simibubi/create/foundation/data/VirtualFluidBuilder.java @@ -17,9 +17,11 @@ public class VirtualFluidBuilder extends FluidBu public VirtualFluidBuilder(AbstractRegistrate owner, P parent, String name, BuilderCallback callback, ResourceLocation stillTexture, ResourceLocation flowingTexture, FluidBuilder.FluidTypeFactory typeFactory, - NonNullFunction factory) { - super(owner, parent, name, callback, stillTexture, flowingTexture, typeFactory, factory); - source(factory); + NonNullFunction sourceFactory, + NonNullFunction flowingFactory + ) { + super(owner, parent, name, callback, stillTexture, flowingTexture, typeFactory, flowingFactory); + source(sourceFactory); } @Override diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index b84c313c9..381b32a3d 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -36,3 +36,10 @@ Technology that empowers the player.''' versionRange="[1.0.0-alpha,2.0)" ordering="AFTER" side="CLIENT" + +[[dependencies.create]] + modId="jei" + mandatory=false + versionRange="[15.19.0,)" + ordering="NONE" + side="CLIENT"