Class FluidMixer

java.lang.Object
com.petrolpark.core.fluid.FluidMixer

public class FluidMixer extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final Set<FluidMixer.IFluidMixer>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Optional<net.neoforged.neoforge.fluids.FluidStack>
    mix(net.minecraft.core.RegistryAccess registryAccess, int maxResultAmount, net.neoforged.neoforge.fluids.FluidStack... fluidStacks)
    Mix several Fluids into another.
    static net.neoforged.neoforge.fluids.FluidStack
    mixIn(net.minecraft.core.RegistryAccess registryAccess, net.neoforged.neoforge.fluids.FluidStack baseFluidStack, net.neoforged.neoforge.fluids.FluidStack addedFluidStack, int maxResultAmount, net.neoforged.neoforge.fluids.capability.IFluidHandler.FluidAction action)
    Mix one Fluid Stack into another.
    static void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • FluidMixer

      public FluidMixer()
  • Method Details

    • register

      public static void register(FluidMixer.IFluidMixer mixer)
    • mix

      public static Optional<net.neoforged.neoforge.fluids.FluidStack> mix(net.minecraft.core.RegistryAccess registryAccess, int maxResultAmount, net.neoforged.neoforge.fluids.FluidStack... fluidStacks)
      Mix several Fluids into another.
      Parameters:
      maxResultAmount -
      fluidStacks -
      Returns:
      An optional containing a new Fluid Stack if the Fluids can be mixed, or an empty optional if they cannot
    • mixIn

      public static net.neoforged.neoforge.fluids.FluidStack mixIn(net.minecraft.core.RegistryAccess registryAccess, net.neoforged.neoforge.fluids.FluidStack baseFluidStack, net.neoforged.neoforge.fluids.FluidStack addedFluidStack, int maxResultAmount, net.neoforged.neoforge.fluids.capability.IFluidHandler.FluidAction action)
      Mix one Fluid Stack into another.
      Parameters:
      baseFluidStack -
      addedFluidStack - The amount of this will be set to the amount which was actually added, so pass a copy
      maxResultAmount -
      Returns:
      A new Fluid Stack