ModsFinder

Damage Function

by andrewtoaster

Damage Function is a Fabric library that lets a Minecraft datapack or command set damage to entities through a function, for a single entity or several at once.

FabricServer-side onlyMIT LicenseOpen source1.17 – 1.18.1

What it does

Damage Function adds a function-based way to deal damage to entities in Minecraft Java Edition, with builds covering 1.17 – 1.18.1. The author describes the mod as finally making damage available as a function, so a datapack can apply it without a separate mod for each use. The mod is a library, which means it provides the mechanism and leaves the content to other mods or to a pack's own functions.

The mod works with one entity at a time and with several entities at once, so a function can target a single mob or a group of them. It runs on the server alone, so players join without installing anything and the server owner is the one who installs it. The source code and issue tracker are public.

Files are published for Fabric only, across four release versions: 1.17, 1.17.1, 1.18 and 1.18.1. The latest file is damagefunction-1.1 for 1.18.1, released on 2021-12-12. The mod was first published on 2021-09-05. It is open source under the MIT License.

Key features

  1. Function-based damage

    Damage is applied through a function, so a datapack can trigger it without a separate mod for each effect.

  2. Single entity targeting

    A function can damage one entity at a time, selected like any other target in a command.

  3. Multiple entity targeting

    A single function can damage several entities in one call, useful for area effects and groups of mobs.

Compatibility

Latest build for each game version and loader.

1.18.1damagefunction-1.1
1.18damagefunction-1.1
1.17.1damagefunction-1.0.1
1.17damagefunction-1.0.1
ReleaseBetaAlphaNot available

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

Use cases

Datapack combat effects

Pack authors can write damage into their own functions, for example to hurt mobs that touch a trap block.

Server-side area damage

A server can damage a group of nearby entities at once through one function call.

Who it’s for: Datapack authors and server owners who want to deal damage through functions on Fabric for versions covered by the 1.17 – 1.18.1 builds. Players who only join a server do not need the mod.

How it compares

Full comparison

Data Overhaul is a Fabric option for 1.17.1 that is also server-side only, but it is published under a custom license and is not open source. Function Macro Backport is a server-side Fabric mod for 1.20.1 under the MIT License, so it targets a later version than Damage Function. VideoLib is client-side only on Fabric for 1.18.2 and does not run on the server.

ModLoadersGame versionsEnvironmentUpdated
Damage FunctionFabric1.17 – 1.18.1Server-side only2021-12-12
Data OverhaulFabric1.17.1Server-side only2021-07-20
Function Macro BackportFabric1.20.1Server-side only2025-06-22
VideoLibFabric1.18.2Client-side only2022-09-01

Questions

Does Damage Function need to be installed on the client?

No. Players join without it, since only the server has to run the mod.

Which loader and versions does Damage Function support?

It supports Fabric only, with files for 1.17, 1.17.1, 1.18 and 1.18.1. The latest file is damagefunction-1.1 for 1.18.1.

Is the source code available?

Yes. Public links exist for the source code and the issue tracker, and the mod is open source under the MIT License.

In the catalog

Damage Function is one of 3,514 Library mods on ModsFinder, and one of 2,348 Library mods for Fabric. 4,416 mods support Minecraft 1.18.1.

Similar mods

What the author says

Where: - = entity (can be multiple) - = float - = identifier - = entity (singular)
andrewtoaster, on the Modrinth page

Official listing

Owner
andrewtoaster
Published
2021-09-05
Updated on Modrinth
2021-12-12
Facts verified
2026-10-15

Tags