ModsFinder

ConsumableChemicals

by pluto7073

ConsumableChemicals is a Fabric library that lets a mod attach timed chemical effects to players, such as Haste or Slowness, which tick down over time.

FabricClient and serverMIT LicenseOpen source1.20 – 1.20.6

What it does

Chemicals are tracked per player. A mod that wants a new one writes a Chemical Handler, either from scratch by extending ConsumableChemicalHandler or by picking one of the pre-made abstract handlers. The pre-made handlers need only one method implemented. The author text gives HalfLifeChemicalHandler as the example: a chemical whose amount halves every 5 minutes, or 6000 ticks, where tickPlayer handles the per-tick removal until none is left.

Once a handler class is written, it must be registered. The mod adds chemicals to the game itself, so a chemicals command can edit a player's chemical levels, which makes testing possible without playing through the game. Food can carry chemicals as well: a FoodProperties builder has a new method that takes a ResourceLocation for the chemical, the handler itself and an amount, and the player receives the chemical on consuming the item.

Food data for 1.20.5 and later lives in Item Components. Chemicals can be added to items through the ChemicalMap component type, whose ID is chemicals:chemicals, and a simple command gives a steak with 100 units of a chemical as an example. On 1.20.4 and earlier the ChemicalMap.Builder is used for registering a custom item's default chemical amount. The mod is published for Fabric only.

Key features

  1. Timed chemical effects

    Each chemical's amount decreases on a tick schedule, and a handler can apply effects such as Haste or Slowness while it lasts.

  2. Pre-made abstract handlers

    Ready-made handler classes cover common decay patterns, so a new chemical needs only one method to be implemented.

  3. Chemicals on food

    A FoodProperties builder method adds a chemical and amount to any food item, with player consumption applying it.

  4. Item component support

    Chemicals can be attached to items through the chemicals:chemicals component, with a separate builder path for older versions.

  5. In-game testing command

    A chemicals command edits a player's chemical levels, so effects can be checked without consuming items.

Compatibility

Latest build for each game version and loader.

1.20.61.20.6+1.0.5
1.20.51.20.6+1.0.5
1.20.41.20.1+1.0.5
1.20.31.20.1+1.0.5
1.20.21.20.1+1.0.5
1.20.11.20.1+2.0.2+build.36
1.201.20.1+2.0.2+build.36
ReleaseBetaAlphaNot available

Only full game releases are shown. This mod publishes no snapshot builds.

Requirements

Dependencies declared by the latest file for each loader.

Required 1

Fabric APILightweight and modular API providing common hooks and intercompatibility measures utilized by mods using the Fabric toolchain.
Required

Questions

Does ConsumableChemicals need Fabric API?

Yes. Fabric API is a required dependency, so it must be installed next to ConsumableChemicals on Fabric.

Is ConsumableChemicals needed on the server?

Installation covers the server and each player's game.

Which game versions does ConsumableChemicals support?

Files cover 1.20 – 1.20.6, with 1.20.1 as the latest Fabric file, published on 2026-04-06.

How is a chemical added to a food item?

A FoodProperties builder method takes a ResourceLocation for the chemical, its handler and an amount. The chemicals:chemicals item component handles the same job on 1.20.5 and later.

In the catalog

ConsumableChemicals is one of 3,514 Library mods on ModsFinder, and one of 2,348 Library mods for Fabric. 11,154 mods support Minecraft 1.20.6.

More from pluto7073

All projects

Similar mods

What the author says

Consumable Chemicals is a library mod that provides functionality for adding chemicals to the game that can be tracked in the player Let's say we want our chemical to have a half-life of 5 minutes, or 6000 ticks. This would get us the below code
pluto7073, on the Modrinth page

Official listing

Owner
pluto7073
Published
2024-12-08
Updated on Modrinth
2026-04-06
Facts verified
2026-10-15

Tags