BaguetteLib Mod Wiki › FAQ
BaguetteLib Mod FAQ
6 questions players actually ask, answered.
What is BaguetteLib Mod?
BaguetteLib is a library mod that simplifies how other mods handle events in Minecraft, giving developers better tools to track player deaths and inventory changes. It helps modders create new gameplay features more easily.
What death-related events does BaguetteLib provide?
It detects when a player or mob is about to die, allows you to cancel a death before it happens, and lets you run custom actions after a mob dies. These work for all mobs, including players.
What inventory events does BaguetteLib track?
It tracks changes in the hotbar, armor swaps, and items picked up from the ground. It also provides access to both the old and new item during a change, with special handling for main hand and offhand items.
How do you use BaguetteLib in your mod?
You add the library to your mod and register the event you want to listen for. For example, you can use an @SubscribeEvent method listening for a player death event.
Which event do you use to run code before a player dies?
You use the PlayerDeathEvent.Pre event to run code before a player dies. This allows you to modify or cancel the death.
Can BaguetteLib cancel a death?
Yes, BaguetteLib allows you to cancel a death before it happens. This applies to all mobs, including players.