
When Entities Die
Overview
When Entities Die mod provides a specialized solution for creating complex achievement systems in Minecraft. It adds a new trigger for datapacks and mods that activates when entities are killed using specific items.
Installation
The installation process is extremely simple: just download the latest version of the mod and place the file in the mods
folder. Fabric API is not required for operation. It's important to note that the mod only needs to be installed on the server side.
Usage in Datapacks
Within a datapack, you can create a standard achievement using the when-entities-die:killed_using_item
trigger. This trigger allows you to configure conditions under which the achievement will be activated.
Example Achievement
Here's an example achievement that triggers when a player kills a skeleton using a diamond sword:
{
"display": {
"icon": {
"item": "minecraft:apple"
},
"title": {
"text": "Test achievement"
},
"description": {
"text": "Test achievement description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"requirement": {
"trigger": "when-entities-die:killed_using_item",
"conditions": {
"item": {
"items": [
"minecraft:diamond_sword"
]
},
"entity": {
"type": "minecraft:skeleton"
}
}
}
}
}
Integration with Mods
For mod developers, integration is done in the same way as with datapacks. You can easily include When Entities Die in your project.
Repository Configuration in build.gradle
repositories {
maven {
name = "JitPack"
url = "https://jitpack.io/"
content {
includeGroup "top.offsetmonkey538"
}
}
}
Adding Dependencies
dependencies {
modImplementation include("top.offsetmonkey538:when-entities-die:v1.0+1.19")
}
Please note that this example uses a fixed version that will not automatically update to the latest available version.