A Minecraft mod that provides detailed, mod-friendly information about player status and events.
[ English | 简体中文 ]
A library that provides detailed player status information and an event system for Minecraft mods. This library offers a Mod-friendly API, enabling other mods to receive and process events regarding important player status changes such as health, hunger, oxygen levels, and more.
Vital Signals is an event library designed specifically for Minecraft mod developers. It leverages the Fabric API to provide low-level event hooks and network synchronization, allowing mods to precisely track various player attribute changes.
A comprehensive damage calculation tracking system that records all detailed information when a player takes damage.
Add this library to your build.gradle:
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
modImplementation 'com.github.Rainy-day-y:Vital-Signals:v0.1.2'
}
Data structure sent over the network for damage events, using NBT format:
| Field | Type | Description |
|---|---|---|
gameVersion |
String |
Minecraft game version |
version |
Int |
Data format version number |
isDirect |
Boolean |
Whether it is direct damage |
typeId |
Int |
Damage type ID |
phase |
String |
Current damage calculation phase |
isCancelled |
Boolean |
Whether the damage is cancelled |
damageAmount |
Float |
Final damage value (actual impact on health) |
rawDamageAmount |
Float |
Raw damage value |
difficultyReduced |
Float |
Difficulty reduction amount |
shieldBlocked |
Float |
Shield block amount |
iceReduced |
Float |
Frost Walker boot reduction |
helmetReduced |
Float |
Turtle Shell / Snow Boots reduction |
armorReduced |
Float |
Armor reduction amount |
effectAndEnchantmentReduced |
Float |
Magic effects and enchantment reduction |
absorbed |
Float |
Damage absorption amount |
otherReduced |
Float |
Other reductions (calculated difference) |
{
gameVersion: "1.21.1",
version: 1,
isDirect: true,
typeId: 0,
phase: "FINAL",
isCancelled: false,
damageAmount: 5.0,
rawDamageAmount: 10.0,
difficultyReduced: 0.0,
shieldBlocked: 0.0,
iceReduced: 0.0,
helmetReduced: 0.0,
armorReduced: 2.0,
effectAndEnchantmentReduced: 0.5,
absorbed: 2.5,
otherReduced: 0.0
}
This project is licensed under the MIT License.
Issues and Pull Requests are welcome! For suggestions or questions, please contact us via GitHub Issues.
Conversation