EventsLib

⭐ — (2 endorsements) 📥 34,173 downloads 📌 v1.0.56 📅 5/22/2025
🟠 Updated over a year ago

By STS15 · library

⬇ Download Mod Source: Modrinth ↗ 📅 Updated: 5/21/2025 📅 Created: 5/22/2025
⚠️ Install Order · 2 steps
1🛠️ Forge — Minecraft Forge (mod loader) Download ↗
2🛠️ Fabric — Fabric Loader Download ↗

Install in this order, then this mod last — most mods fail to load without their framework and dependencies in place.

🔍 Analysis

  • 👍 0.0% endorsement rate
  • 🏆 #1 of 6 library mods in this game by downloads

📋 About This Mod

This library is intended to be used along side some of my mods that require more specific events for effects.  This mod adds in no items or changes the game in any way.  It has no beneficial use for players unless there is another mod that requires it and utilizes the additional events.

It adds in an event called MobEffectTickEvent which provides the modder with an interface to get the percentage left of the duration of the effect, as well as the effect instance and entity should you need any of those.

``` // Example for MobEffectTickEvent @SubscribeEvent public static void onMobEffectTick(MobEffectTickEvent event) { float percentageLeft = event.getPercentageLeft(); String entityName = event.getEntity().getName().getString(); String effectName = event.getEffectInstance().getEffect().value().toString(); System.out.println("Entity: " + entityName + " is affected by: " + effectName + " with " + percentageLeft + "% duration remaining."); if (percentageLeft == 50. 0f) { System.out.println("Effect on " + entityName + " is at 50% duration for effect: " + effectName); } if (percentageLeft == 20. 0f) { System.out.println("Effect on " + entityName + " is at 20% duration for effect: " + effectName); } } ```

It also adds in a method that is run once when the effect wears off.  In my Fargo's Talismans mod, I use this to remove the attributes that are added to the player by the pedestal, rather than by running a PlayerTick method.

``` // Example for onEffectRemoved (In a MobEffectEndEffect extended class) @Override public void onEffectRemoved(LivingEntity entity, int amplifier) { super.onEffectRemoved(entity, amplifier); if (entity instanceof Player) { System.out.println("Effect has worn off."); } } ```

🤖 AI-enhanced — based on mod data

📊 Mod Details

Game
Minecraft Mods
Author
STS15
Version
1.0.56
Downloads
34,173
Endorsements
2
Category
library
Created
5/22/2025
Updated
5/21/2025
Game Versions
1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4
Tags
library

🔧 How to Install Minecraft Mods Mods

Download from Modrinth. Use Prism Launcher or drop into your mods folder.

📖 Full step-by-step install guide for Minecraft Mods →

Visit the official mod page for specific installation instructions for this mod.

🎮 Need cheat codes or console commands? Check ur gaming wiki for Minecraft Mods commands, item IDs, and more.

❓ Frequently Asked Questions

Which Minecraft Mods versions does EventsLib support?

The author lists 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5. Other versions may work but are untested by the author.

What is the latest version of EventsLib?

Version 1.0.56, published 2025-05-21 with 34,173 downloads recorded at the source.

Keep browsing — more Minecraft Mods mods await

📋 All Minecraft Mods Mods 🏆 Top 25 📂 More library 👤 More by STS15 🔎 Similar Mods 🌐 Best library (All Games) 🔀 Check Compatibility ⚖️ Compare Mods 🆕 New Mods