Minecraft mod developers often struggle with boilerplate code for detecting player deaths and tracking inventory changes. BaguetteLib Mod solves this by offering a clean, lightweight library that handles these common event systems out of the box. Whether you're building a hardcore death mechanic or a custom gear-swap feature, BaguetteLib gives you reliable hooks for entity death events and inventory tracking — so you can focus on gameplay logic instead of reinventing the wheel.
Key Features
- Death Event System — Detect when any entity or player is about to die, cancel the death before it happens, or run custom actions afterward. Works with players, mobs, and other entities, giving developers full control over death-related logic.
- Inventory Change Detection — Track hotbar changes, armor equipment swaps, and item pickups in real time. Access both the previous item and the new item during any change, with special handling for main hand and offhand slots.
- Pre-Death Hook (PlayerDeathEvent.Pre) — Run code before a player actually dies, allowing you to modify or cancel the death event entirely. Useful for building totem-like mechanics or custom respawn systems.
- Broad Entity Support — Event listeners aren't limited to players. Mobs, NPCs, and other entities all fire the same events, making BaguetteLib useful for adventure maps and modpacks alike.
Screenshots
How to Install
- Download and install Forge (for 1.20.x) or NeoForge (for 1.21.x) matching your Minecraft version.
- Download BaguetteLib for your version from the link below.
- Place the downloaded
.jarfile into your.minecraft/modsfolder. - Launch Minecraft using the correct Forge or NeoForge profile and confirm the mod loads without errors.
Requirements
| Mod Loader | Dependencies | Minecraft Versions |
|---|---|---|
| Forge, NeoForge | Minecraft Forge, NeoForge Installer | 1.21.1, 1.21, 1.20.1, 1.20 |
Pros & Cons
Pros
- Appears to be lightweight with a focused feature set — no unnecessary bloat
- Covers two of the most commonly needed event systems (death and inventory)
- Supports both Forge and NeoForge across multiple Minecraft versions
- Pre-death cancellation hook enables creative gameplay mechanics
Cons
- Library mod — provides no standalone gameplay; requires another mod to make use of it
- Limited to death and inventory events; developers needing other event types will need additional libraries
- NeoForge support starts at 1.21, while Forge covers 1.20.x — no single loader spans all versions
Download
Always download mods from official sources to stay safe.
FAQ
Does BaguetteLib add any new items or gameplay features on its own?
No. BaguetteLib is a developer library that other mods depend on. By itself, it runs silently in the background and provides event hooks for death detection and inventory tracking that other mods can use.
Which mod loader do I need for Minecraft 1.21.1?
For Minecraft 1.21.1 and 1.21, you need NeoForge. The Forge version of BaguetteLib covers Minecraft 1.20.1 and 1.20.
Can BaguetteLib detect when a mob dies, or only players?
BaguetteLib's death event system works with players, mobs, and other entities. Developers can listen for death events on any entity type, not just players.
