Skip to main content
General Mechanics adds a large library of industrial fluids, each modeled with a real chemical formula, a temperature in Kelvin, and optional acidity/basicity flags. Fluids are registered in CoreFluids and are available as fluid blocks, bucket items, and inputs for fluid-based recipes.
Acidic fluids (Sulfuric Acid, Hydrochloric Acid, Nitric Acid) are flagged with isAcidic = true. Handle them carefully in automation — future gameplay mechanics may implement corrosion or damage to machines and players that come into contact with these fluids.

Registration

Every fluid is registered with a single registerFluid() call that produces four objects:
  • A FluidType (via CoreFluidTypes)
  • A source FlowingFluid and a flowing FlowingFluid
  • A LiquidBlock for world placement
  • A BucketItem that stacks to 1 and returns an empty bucket on use
public static FluidDefinition registerFluid(
    String englishName,
    int tintColor,
    Vector3f fogColor,
    String chemicalFormula,
    boolean isAcidic,
    boolean isBasic,
    long temp  // Kelvin
) { ... }
The overload without isAcidic, isBasic, and temp defaults to false, false, 298L (room temperature, neutral).

Formula System

Each fluid’s bucket item and fluid block are registered with a Formula record that stores the chemical formula string:
public record Formula(@NotNull ItemLike itemLike, @NotNull String formula) {
    public Component getFormulaComponent(boolean colored, boolean italic) { ... }
    public Component getFormulaComponent() { ... } // colored yellow, not italic
}
Formulas are stored in CoreFormulas keyed by the item’s translation key. The formula is displayed as a tooltip on the bucket and fluid block items.

Fluid Categories

Petroleum Derivatives

Raw and refined hydrocarbon fuels. Default temperature (298 K), neutral.
FluidFormulaTint
Crude OilC₁₂H₂₃Very dark brown
Refined OilC₁₀H₂₂Dark brown
GasolineC₈H₁₈Amber orange
DieselC₁₂H₂₃Yellow
KeroseneC₁₂H₂₆Light yellow
NaphthaC₇H₁₆Sandy gold

Alcohols and Solvents

Common organic solvents, all at 298 K.
FluidFormulaBasic
MethanolCH₃OHYes
EthanolC₂H₅OHYes
AcetoneC₃H₆OYes
GlycerolC₃H₈O₃Yes

Aromatics and Hydrocarbon Feedstocks

Industrial feedstocks for polymer and chemical production. Gaseous feedstocks (Ethylene, Propylene, Butadiene) are stored at 273 K.
FluidFormula
BenzeneC₆H₆
TolueneC₇H₈
XyleneC₈H₁₀
EthyleneC₂H₄
PropyleneC₃H₆
ButadieneC₄H₆
StyreneC₈H₈

Acids and Bases

FluidFormulaAcidicBasicTemp (K)
Sulfuric AcidH₂SO₄YesNo298
Hydrochloric AcidHClYesNo298
Nitric AcidHNO₃YesNo298
AmmoniaNH₃NoYes298
Liquid AmmoniaNH₃(l)NoYes240

Elements and Gases

Pure elemental fluids stored at cryogenic temperatures reflecting real boiling points.
FluidFormulaTemp (K)
HydrogenH₂20
OxygenO₂90
NitrogenN₂77
Carbon MonoxideCO82
Carbon DioxideCO₂195

Water Variants and Cryogenics

FluidFormulaNotes
Distilled WaterH₂OPurified, 298 K
Heavy WaterD₂ODeuterium oxide, 298 K
SteamH₂O(g)373 K
Liquid NitrogenN₂(l)77 K
Liquid OxygenO₂(l)90 K

FluidDefinition Record

FluidDefinition bundles all four registered objects for a fluid:
FluidDefinition definition = new FluidDefinition(
    englishName,   // display name
    type,          // Supplier<FluidType>
    SOURCE,        // Supplier<FlowingFluid> — source fluid
    FLOWING,       // Supplier<FlowingFluid> — flowing fluid
    BLOCK,         // BlockDefinition<LiquidBlock>
    BUCKET         // ItemDefinition<BucketItem>
);
All registered fluids are accessible via CoreFluids.getFluids().

Fluid Mixing

Fluids serve as inputs in fluid-based crafting recipes. Buckets of the appropriate fluid can be placed into machine input slots, or piped in via NeoForge fluid capabilities. Specific recipe types that consume fluids will be documented alongside the machines that process them.

Build docs developers (and LLMs) love