ModsFinder

BaguetteLib

by Leclowndu93150

With BaguetteLib, a developer can hook into player deaths and inventory changes through one shared set of events on Fabric, Forge and NeoForge.

FabricForgeNeoForgeServer-side onlyMIT License1.20.1 – 26.3

What it does

BaguetteLib is a library rather than a gameplay mod. It exposes events for death handling and inventory tracking, so other mods can catch a death before it happens and cancel it, run code after a death, and react to changes in the hotbar, armor slots or items picked up from the ground. For each change, the event supplies both the previous item and the new one.

The events apply to players, mobs and other entities, and the library gives special handling to the hands and the offhand slot. The mod is server-side only, so it is installed on the server and players join without it. Builds cover 1.20.1 – 26.3 across Fabric, Forge and NeoForge, and the code is under the MIT License, though the project is not open source.

Mod Menu and YetAnotherConfigLib (YACL) are optional and add a configuration screen when installed. Seven catalog mods depend on BaguetteLib, including Particular ✨ Reforged, Corpse x Curios API Compat, Wakes Reforged, Gravestone x Curios API Compat and Immersive Horse Riding.

Key features

  1. Death event hooks

    Events fire before a death is processed, so a mod can cancel the death or let it happen.

  2. Post-death handling

    A separate event runs after a death, letting other code clean up or reward based on what happened.

  3. Inventory change events

    Hotbar changes, armor swaps and item pickups each raise an event carrying the old and new item.

  4. Hand and offhand support

    Changes in the main hand and offhand are reported with their own handling, not merged into generic slot events.

  5. Works across entities

    The same hooks apply to players, mobs and other entities, so one integration covers many cases.

Compatibility

Latest build for each game version and loader.

26.32.0.8Not available2.0.8
26.22.0.7Not available2.0.7
26.1.22.0.7Not available2.0.7
26.12.0.2Not available2.0.2
1.21.112.0.5Not available2.0.5
1.21.12.0.5Not available2.0.7
1.20.4Not available1.0.0Not available
1.20.12.0.52.0.7Not available
ReleaseBetaAlphaNot available

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

Requirements

Dependencies declared by the latest file for each loader.

Optional 2

YetAnotherConfigLib (YACL)A builder-based configuration library for Minecraft!
Optional
Mod MenuAdds a mod menu to view the list of mods you have installed.
Optional

Required by 7 mods

Use cases

Custom death rules

A mod can keep items on death or cancel a death in specific conditions by listening to the pre-death event.

Equipment tracking

Mods that react to armor or hotbar changes can read the previous and new item without polling the inventory.

Who it’s for: Mod developers building features that depend on death handling or inventory tracking across Fabric, Forge and NeoForge. Server owners who run a dependent mod need BaguetteLib installed on the server.

Questions

Does BaguetteLib have to be installed on clients?

No. It runs on the server alone, so players need nothing extra to join.

Which loaders does BaguetteLib support?

Fabric, Forge and NeoForge builds are published for 1.20.1 – 26.3, with the latest Forge file at 2.0.7 for 1.20.1.

Does a dependent mod need Mod Menu or YACL?

Neither is required. Mod Menu and YetAnotherConfigLib (YACL) are optional and only add a configuration screen when present.

More from Leclowndu93150

All projects

What the author says

Ever tried to make a mod that needs proper death handling or inventory tracking? Yeah, NeoForge events suck for that. Support in my Discord @SubscribeEvent public static void onPlayerPreDeath(PlayerDeathEvent.Pre event) { // Do whatever you want here }
Leclowndu93150, on the Modrinth page

Official listing

Owner
Leclowndu93150
Published
2025-06-25
Updated on Modrinth
2026-10-11
Facts verified
2026-10-15