Loading...
Beta Modpages Unclaimed

Fabric Flux

Simple energy API for Fabric mods

0 Likes
2677 Downloads
Created by Szeweq

Description

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.


AD Become Premium to remove Ads!

What means Verified?

  • Compatibility: The mod should be compatible with the latest version of Minecraft and be clearly labeled with its supported versions.
  • Functionality: The mod should work as advertised and not cause any game-breaking bugs or crashes.
  • Security: The mod should not contain any malicious code or attempts to steal personal information.
  • Performance: The mod should not cause a significant decrease in the game's performance, such as by causing lag or reducing frame rates.
  • Originality: The mod should be original and not a copy of someone else's work.
  • Up-to-date: The mod should be regularly updated to fix bugs, improve performance, and maintain compatibility with the latest version of Minecraft.
  • Support: The mod should have an active developer who provides support and troubleshooting assistance to users.
  • License: The mod should be released under a clear and open source license that allows others to use, modify, and redistribute the code.
  • Documentation: The mod should come with clear and detailed documentation on how to install and use it.

AD Become Premium to remove Ads!

How to Install

1

Download Forge & Java

Download Forge from the offical Site or here. If you dont have Java installed then install it now from here. After Downloading Forge you can run the file with Java.

2

Prepare

Lounch Minecraft and select your Forge istallation as Version this will create a Folder called Mods.

3

Add Mods

Type Win+R and type %appdata% and open the .minecraft Folder. There will you find your Folder called Mods. Place all Mods you want to play in this Folder

4

Enjoy

You are now Ready. Re-start your Game and start Playing.

More Mods like this

RFTools

RFTools, blocks and items to help with Redflux (dimension builder, crafter, monitor, scanner, ...)

Extreme Reactors

This is a port of the Big Reactors mod by Erogenous Beef to the current Minecraft versions

RFTools Base

RFTools Base: base mod for all McJty tech mods

Powah!

Generators, Solar panels, Energy Cells, Cables, Reactors, wireless energy ... and more!

Bigger Reactors

Official Continuation of Erogenous Beef's Big Reactors

QuantumFlux

Wireless RF and other gadgets to make gameplay fun

Wireless Chargers

Wireless Chargers adds chargers which can charge nearby blocks and players!