BaguetteLib Mod is a lightweight library for Minecraft mods that simplifies handling player and entity events. It provides reliable systems for detecting deaths and tracking inventory changes, making it easier for developers to build advanced gameplay features.

Features:

  • Death Events
    • Detect when an entity is about to die.
    • Option to cancel the death before it happens.
    • Run custom actions after the entity dies.
    • Works with players, mobs, and other entities.
  • Inventory Events
    • Detect changes in the hotbar.
    • Track armor equipment swaps.
    • Detect when items are picked up.
    • Access both the previous item and the new item during a change.
    • Special handling for main hand and offhand items.

Basic Usage

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.1.2, 26.1.1, 26.1

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

For Minecraft 1.21.1

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]