BaguetteLib
With BaguetteLib, a developer can hook into player deaths and inventory changes through one shared set of events on Fabric, Forge and NeoForge.
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
Death event hooks
Events fire before a death is processed, so a mod can cancel the death or let it happen.
Post-death handling
A separate event runs after a death, letting other code clean up or reward based on what happened.
Inventory change events
Hotbar changes, armor swaps and item pickups each raise an event carrying the old and new item.
Hand and offhand support
Changes in the main hand and offhand are reported with their own handling, not merged into generic slot events.
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.
Only full game releases are shown. This mod publishes no snapshot builds.
Requirements
Dependencies declared by the latest file for each loader.
Optional 2
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?
Which loaders does BaguetteLib support?
Does a dependent mod need Mod Menu or YACL?
More from Leclowndu93150
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 }
Official listing
- Modrinth page
- modrinth.com/mod/baguettelib
- Owner
- Leclowndu93150
- Published
- 2025-06-25
- Updated on Modrinth
- 2026-10-11
- Facts verified
- 2026-10-15
