Back to mods
Fabric Flux project artwork

CurseForge · Minecraft mod

Fabric Flux

Simple energy API for Fabric mods

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Fabric Flux release should I use?

Updated 5 years ago
Latest stable file fabricflux-1.4.0.jar
Game version 1.16.5
Loader fabric

Fabric Flux fabricflux-1.4.0.jar targets 1.16.5. The project page does not say whether this file belongs on the client, dedicated server, or both. All 1 required mods have matching files.

Where it goes

Is Fabric Flux required on the client, server, or both?

The project page does not say whether this file belongs on the client, dedicated server, or both.

Client Source doesn’t say
Dedicated server Source doesn’t say
Loader for this release No loader listed
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source does not explicitly classify this release as client-only or server-only.

What else does Fabric Flux fabricflux-1.4.0.jar need?

fabricflux-1.4.0.jar. Change the file and its required mods may change too.

All 1 required mods have matching files

Install Fabric API first. We found matching files for this game-version and loader setup.

Fabric API Needed by Fabric Flux fabricflux-1.4.0.jar
required
Matching file found Matched file: [1.16.5] Fabric API 0.42.0

We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add Fabric Flux without breaking your instance.

Built for Fabric Flux fabricflux-1.4.0.jar. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use fabricflux-1.4.0.jar. It targets 1.16.5; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    Install Fabric API first. We found matching files for this game-version and loader setup.

  3. 03

    Put it on the correct side

    The project page does not say whether this file belongs on the client, dedicated server, or both.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside fabricflux-1.4.0.jar. It opens that exact file at the source.

About this project

What does Fabric Flux add?

Warning: This mod is not part of Fabric. It is a 3rd party library that allows developers to create energy-based mods with Fabric.

Fabric Flux

Fabric Flux (in short FF) is a mod/library aiming to provide energy implementation to Fabric mods.

Battery

Battery crafting recipe Try using this battery on entities.

How this works

There are two basic things to remember: Containers and Interfaces.

  • Flux Container is an object that provides access to interfaces. Some containers may require some data for access. For example: Item will require ItemStack to provide an interface.
  • Flux Interface is used to transfer energy from one container to another. Two interfaces are needed to complete an energy transfer.

Implementation tips for developers

  • Every Item accepting energy should implement IFluxContainer and always check in getFluxFor if object type is ItemStack. Other object types are welcome.
  • Any BlockEntity can implement both IFlux and IFluxContainer. If controller is implemented then getFluxFor method should always check if object type is Direction. Other object types are welcome.
  • If an interface simply does not accept input/output, it has to return -1 instead of energy amount (which won't be less than 0). This should be checked before calculating energy.
  • DO NOT STORE Flux Interfaces, only containers. Some interfaces can be freshly created by a controller. There are some exceptions for items like (dis)charging a battery (Item has to create a fresh interface because it can't be stored in an item stack).
  • IFlux::to should be used to transfer energy. This method can be overriden.
  • FluxBattery class is provided in the API as a basic interface.

Energy API differences

FF differs a bit from Forge Energy API. This mod has less methods to implement and it is not capability-based (it uses containers instead). There are no canExtractEnergy/canReceiveEnergy counterparts, checking with extractFlux/receiveFlux(0, true) does the same, although this is not required.

Project description from CurseForge.

Pick your setup

Fabric Flux by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

14 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Fabric Flux versions and loaders

8 of 8 releases match

Looking for an older file? The official CurseForge project page is in Resources.