Liquid Lab

Quick rating

Liquid Lab

No reviews yet

A fluid API to streamline the creation of custom fluids and gasses.

API/Library
Mod Loaders
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Where It Runs
Client and Server

Must be installed on both the client and the server.

About

Project Details

Type
Mod
License
MIT License
Latest Version
2.1.0

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

Description

Liquid Lab is a fluid API to streamline the creation of custom fluids, as most fluid attributes are hardcoded. Some features include setting fog color, custom mixing behavior, and the creation of gaseous fluids that flow upwards. This mod exists because fluids on fabric have limited functionality and it would be useful to have a way to create a high quality custom fluid.

Features

Base Fluid Changes

Lots of utility methods added to the base Fluid class

Fluid Mixing

  • Done through onFluidMix
  • Immediately called when your fluid touches another fluid
  • Params:
    • World the fluid is in
    • Block Positon of the calling fluid
    • Side the fluid was touched from
    • Fluid state that was interacted with

Entity Splashing

  • Done through onEntityEntry
  • Called when an entity first touches the fluid
  • Params:
    • World the entity is in
    • Entity that touched the fluid

Entity Interactions

  • Done through onEntityCollision
  • Called while an entity is within the fluid
  • Params:
    • World the entity is in
    • Block Position of the fluid
    • Entity that is within the fluid

Entity Viscosity

  • Done through getFluidMotion
  • Used for the fluid's push force and viscosity
  • Params:
    • World the entity is in
    • Returns:
      • XYZ velocity multiplier for an entity
      • Push force of the fluid
      • Movement speed for an entity actively moving

Item Viscosity

  • Done through getItemMotion
  • Used for an item entity's buoyancy and viscosity
  • Params:
    • World the entity is in
    • Returns:
      • XYZ velocity multiplier for an item
      • Maximum vertical velocity of an item
      • How fast an item rises in the fluid

Fog

  • Done through getFogProperties
  • Enables the fluid to have special fog
  • Params:
    • World the entity is in
    • Position of the cameara
    • Entity that is viewing the fog
    • Returns:
      • Fog start in blocks
      • Fog End in Blocks
      • RGB color of the fog

Rain Particles

  • Done through getRainParticle
  • Gives the fluid unique splash particles when rain falls onto it
  • Returns:
    • The particle to use when the fluid is rained on

Bucket Sounds

  • Done through getBucketEmptySound
  • Enables the fluid to not only have a custom filling sound, but also a custom emptying sound
  • Returns:
    • The sound to make when a bucket is emptied

Pathfinding

  • Done through canPathfindThrough
  • Allows a fluid to directly identify weather something should try to pathfind through it
  • Params:
    • The type of navigation an entity has
    • Returns:
      • If it is valid to pathfind through this fluid

Fluid Tags

7 fluid tags are added by the API:

  • liquid_lab:diveable
    • Defines that this fluid is swimmable and has sprint swimming
    • liquid_lab:swimmable
      • Defines if this fluid can be swum in
    • liquid_lab:drowns
      • Defines if this fluid will drown entities submerged within it
    • liquid_lab:evaporates
      • Defines if the fluid cannot be placed in the nether
    • liquid_lab:fall_damage_reducing
      • Makes the fluid affect fall damage the same way lava does
    • liquid_lab:fall_damage_resetting
      • Makes the fluid affect fall damage in the same way as water
    • liquid_lab:gaseous
      • Simply marks the fluid as a gas, does not have any other functionality

Gaseous Fluids

Additionally, the API also adds reversed fluids that flow upwards. Gas fluids are registered in the same way as regular fluids, except the block form is created with GasFluidBlock and the fluid form is created by extending FlowableGasFluid. To correctly render a gas fluid, use SimpleGasFluidRenderHandler, rather than SimpleFluidRenderHandler in your client initializer.

Utility

Some simple utility methods are added by the API to make registering certain aspects of fluids simpler.

Particle Utils

Contains methods related to registering block leak particles. The class allows for registering dripping, falling, and landing particles independently or all at once for fluids and gasses.

Screenshots

Gallery

  • Example Use of API
    Example Use of API A gaseous fluid flows nearby some lava.
  • Example Use of API
    Example Use of API Many modded fluids mixing at the same time.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works