🌐 Good news — we've translated this article into other languages!
Or pick the one you like:

BaguetteLib Mod simplifies how other mods handle events in Minecraft. It gives developers better tools to track player deaths and inventory changes, making it easier to create new gameplay features.

Features:

Death Events

  • Detects when a player or mob is about to die.
  • Allows you to cancel a death before it happens.
  • Lets you run custom actions after a mob dies.
  • Works for all mobs, including players.

Inventory Events

  • Tracks changes in the hotbar and when armor is swapped.
  • Notifies you when items are picked up from the ground.
  • Gives access to both the old and new item during a change.
  • Includes special handling for items in the main hand and offhand.

How to Use:

Add the library to your mod and register the event you want to listen for.

Example:

@SubscribeEvent method listening for a player death event.

  • Use the event PlayerDeathEvent.Pre to run code before a player dies.
  • This allows you to modify or cancel the death if needed.

Example Method Name: onPlayerPreDeath(PlayerDeathEvent.Pre event)

BaguetteLib Mod Download Links

Filter by

For Minecraft 26.2

NeoForge 102 KB Jun 18, 2026
Fabric 99 KB Jun 18, 2026

For Minecraft 26.1.2, 26.1.1, 26.1

NeoForge 88 KB Mar 26, 2026
Fabric 86 KB Mar 26, 2026

For Minecraft 1.21.1, 1.21

NeoForge 65 KB Mar 26, 2026

For Minecraft 1.20.1, 1.20

Forge 31 KB Mar 26, 2026

Click to rate this post!
[Total: 2 Average: 5]