Tags
Creators
Details
Licensed ARR
Published 2 years ago
All versions
4.1.0
Release
RPG Attribute System 4.1.04 days ago 19
Compatibility
Minecraft: Java Edition
26.2
Platform
NeoForge
Supported environments
Client and server
Required content
Any compatible version
Changes
New features
- Public read API — other mods can now query player progression and combat stats without duplicating RAS formulas.
CombatSnapshotrecord — immutable snapshot of final MC attribute values after RAS, gear, and effects.RasApi.isAvailable()— check that RAS is loaded.RasApi.getLevel(Player)— returns the player's current RPG level (server-side).RasApi.getCombatSnapshot(Player)— returns finalmaxHealth,attackDamage,armor,armorToughness,movementSpeed, andrpgLevel.- Updated API documentation —
docs/API.mdexpanded to cover read and write endpoints.
API reference
Package: tn.nightbeam.ras.api
| Method | Description |
|---|---|
isAvailable() |
Returns true when RAS classes are on the classpath |
getLevel(Player) |
Player RPG level after migration (server-side) |
getCombatSnapshot(Player) |
Final combat attribute values from MC attribute instances |
respec(Player) / respec(Player, RespecOptions) |
Reset allocated points (unchanged) |
applyTemplate(Player, String) |
Apply a build template (unchanged) |
CombatSnapshot fields: |
|
| Field | Source |
| ------- | -------- |
rpgLevel |
rpg_attribute_system:rpg_level synced attribute |
maxHealth |
Attributes.MAX_HEALTH final value |
attackDamage |
Attributes.ATTACK_DAMAGE final value |
armor |
Attributes.ARMOR final value |
armorToughness |
Attributes.ARMOR_TOUGHNESS final value |
movementSpeed |
Attributes.MOVEMENT_SPEED final value |
Integration notes
- All read/write API calls except
isAvailable()must run server-side onServerPlayer. - Other mods should call
getCombatSnapshot()for balancing — do not reimplement RAS scaling math. - RPG Mob Leveling System 2.0+ consumes this API via reflection for player-based mob scaling and combat rebalance.
Example
import tn.nightbeam.ras.api.RasApi;
import tn.nightbeam.ras.api.CombatSnapshot;
if (RasApi.isAvailable()) {
int level = RasApi.getLevel(player);
CombatSnapshot snap = RasApi.getCombatSnapshot(player);
// snap.maxHealth(), snap.attackDamage(), etc.
}
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:d85UTOuq:YrursnVT"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:d85UTOuq:YrursnVT"
}

