Effect icons and tooltip !

This commit is contained in:
2026-10-02 13:16:50 -03:00
parent e560cb3928
commit f749f6be79
22 changed files with 131 additions and 19 deletions
+9 -7
View File
@@ -17,18 +17,20 @@ game's effects are defined this way, in `mods/bworld/effects`.
"effect": {
"id": "copper_tools:swiftness",
"category": "beneficial",
"icon": "copper_tools:swiftness",
"modifiers": [{ "attribute": "bworld:movement_speed", "amount": 0.1, "operation": "add_multiplied_total" }]
}
}
```
| Field | Required | What it does |
| ------------ | -------- | ---------------------------------------------------------------------------------------------- |
| `id` | yes | The effect's id, in the mod's [namespace](../concepts/registries.md#identifiers). |
| `category` | no | `"beneficial"`, `"harmful"` or `"neutral"` (the default), like NeoForge's `MobEffectCategory`. |
| `instant` | no | `true` makes it happen once when added instead of lasting, like `bworld:instant_health`. |
| `modifiers` | no | [Attribute modifiers](players.md#attributes) while it's on. Each level adds `amount` again. |
| `components` | no | What it does over time, see below. |
| Field | Required | What it does |
| ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | yes | The effect's id, in the mod's [namespace](../concepts/registries.md#identifiers). |
| `category` | no | `"beneficial"`, `"harmful"` or `"neutral"` (the default), like NeoForge's `MobEffectCategory`. |
| `instant` | no | `true` makes it happen once when added instead of lasting, like `bworld:instant_health`. |
| `icon` | no | A texture, shown at the top of the inventory screen while the player has it, with its name, level and time left on hover. 16×16 like an item's. |
| `modifiers` | no | [Attribute modifiers](players.md#attributes) while it's on. Each level adds `amount` again. |
| `components` | no | What it does over time, see below. |
The modifiers' `operation` is `"add_value"`, `"add_multiplied_base"` or `"add_multiplied_total"`. They come off when the
effect ends.