
Что это
A modular Forge-style event API for triggers!
- Тип: мод
- Загрузчик: fabric, forge, neoforge
- Версии Minecraft: 1.20.1 – 1.21.1
- Скачиваний на Modrinth: 10 999
Подробно
Triggers is a library mod that provides a unified, modular, Forge-style event API for in-game triggers and advancement criteria. It abstracts standard Minecraft triggers (such as item enchantment, block interactions, taming animals, and earning stats) into an easy-to-use event bus. This allows developers to seamlessly listen to and handle these actions across multi-loader environments (Forge, Fabric, and NeoForge) without needing to mixin to the triggers themselves.
You can easily add Triggers to your development environment using the Modrinth Maven.
First, add the Modrinth maven to your repositories block:
gradle repositories { exclusiveContent { forRepository { maven { url = "https://api.modrinth.com/maven" } } filter { includeGroup "maven.modrinth" } } }
Then, add the mod as a dependency in your dependencies block:
gradle dependencies { // Replace with the target version of Triggers implementation "maven.modrinth:triggers: " }
Triggers uses a custom event bus that functions similarly to Forge's event bus. You can register listeners to Triggers.EVENTS and listen for specific events.
java import com.evandev.triggers.Triggers; import com.evandev.triggers.event.events.TriggerEntityEvent; import com.evandev.triggers.event.events.TriggerPlayerEvent;
public class MyMod { public static void init() { // Listen for when a player enchants an item Triggers.EVENTS.addListener(TriggerPlayerEvent.Enchant.class, event -> { System.out.println(event.player.getName().getString() + " enchanted " + event.item); });
// Listen for when an animal is tamed Triggers.EVENTS.addListener(TriggerEntityEvent.TameAnimal.class, event -> { if (event.causedByPlayer != null) { System.out.println("Animal tamed by: " + event.causedByPlayer.getName().getString()); } }); } }
[](https://github.com/evanbones/Triggers/blob/1.20.1/LICENSE)
[](https://discord.com/invite/JcGRdT6Pbx) [](https://github.com/evanbones/Triggers)
Как установить
Скачайте файл на официальной странице ниже и положите его в папку mods (для модов) или plugins (для плагинов) вашего сервера или клиента. Для модов нужен совместимый загрузчик. Версия должна совпадать с версией Minecraft.
Текст подготовлен автоматически из описания на Modrinth и ждёт проверки редакцией.
Комментарии 0
Комментарии к этому материалу отключены.
Читайте также
Help Me Hardcore
Help Me Hardcore Adds All Kinds of Extra Challenges from Community Ideas to Full-Themed Updates for Your Hardcore Worlds or Even Hardcore… 05.12.2026
Better Sophisticated Upgrades
Vanillafies the Upgrade-textures from sophisticated mods 05.12.2026
Better Mob Heads
Better Mob Heads gives supported vanilla mobs without an existing vanilla head item a decorative custom head when they die. 05.12.2026
JDK's Mining Utilities 2
This mod adds mining stuff to your game, such as hammers, drills and more 05.12.2026
Grief Prevention Home
An GriefPrevention addon where you can easily teleport too your and others plots 05.12.2026
CommandGUI
Customizable Command GUI for Spigot/Paper 05.12.2026