Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 141
    • Issues 141
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Wiki
    • Items
  • Attributes

Attributes · Changes

Page history
changed layout and added TOC authored Feb 24, 2024 by Lxlp's avatar Lxlp
Hide whitespace changes
Inline Side-by-side
Showing with 28 additions and 29 deletions
+28 -29
  • Items/Attributes.md Items/Attributes.md +28 -29
  • No files found.
Items/Attributes.md
View page @ 90ef324c
The attributes section for items made with MythicMobs handles the Minecraft attribute system. The attributes section for items made with MythicMobs handles the Minecraft attribute system.
It makes it possible to apply different attributes given to the entity wearing/using the item depending on the slot. It makes it possible to apply different attributes given to the entity wearing/using the item depending on the slot.
Format [[_TOC_]]
------
## Format
```yml ```yml
Item: Item:
Id: item_id Id: item_id
...@@ -11,8 +12,30 @@ Item: ...@@ -11,8 +12,30 @@ Item:
[Attribute]: [value] <operation> [Attribute]: [value] <operation>
``` ```
Attributes
---------- ## Slots
| Slot | Description |
|----------|---------------------------------------------------------------------------|
| All | Will apply the given attributes to all slots. |
| MainHand | Attributes will only apply if item is being held in the main hand. |
| OffHand | Attributes will only apply if item is being held in the off hand. |
| Head | Attributes will only apply if item is being worn on the head slot. |
| Chest | Attributes will only apply if item is being worn on the chest/torso slot. |
| Legs | Attributes will only apply if item is being worn on the legs slot. |
| Feet | Attributes will only apply if item is being worn on the feet slot. |
## Operations
| Operation | Aliases | Description |
|---------------|--------------------|---------------------------------------------------------------------------------------------------|
| ADD | 0, ADD_NUMBER | Adds or subtracts the specified value to the base value. |
| MULTIPLY_BASE | 1, ADD_SCALAR | Multiplies the base value with the sum of all the modifier's amount. |
| MULTIPLY | 2, MULTIPLY_SCALAR | Similar to `MULTIPLY_BASE` but multiplies all the modifier's amount instead of adding all of them |
[*See MC wiki on how the game calculates the value for all modifiers*](https://minecraft.fandom.com/wiki/Attribute#Modifiers)
## Attributes
These are all the available attributes that can be put on the item. These are all the available attributes that can be put on the item.
You can use general placeholders like `<random.#to#>` or `<random.float.#to#>`. You can use general placeholders like `<random.#to#>` or `<random.float.#to#>`.
...@@ -102,32 +125,8 @@ custom_item: ...@@ -102,32 +125,8 @@ custom_item:
MovementSpeed: -0.2 MULTIPLY_BASE MovementSpeed: -0.2 MULTIPLY_BASE
``` ```
Slots
-----
| Slot | Description |
|----------|---------------------------------------------------------------------------|
| All | Will apply the given attributes to all slots. |
| MainHand | Attributes will only apply if item is being held in the main hand. |
| OffHand | Attributes will only apply if item is being held in the off hand. |
| Head | Attributes will only apply if item is being worn on the head slot. |
| Chest | Attributes will only apply if item is being worn on the chest/torso slot. |
| Legs | Attributes will only apply if item is being worn on the legs slot. |
| Feet | Attributes will only apply if item is being worn on the feet slot. |
Operations
----------
| Operation | Aliases | Description |
|---------------|--------------------|---------------------------------------------------------------------------------------------------|
| ADD | 0, ADD_NUMBER | Adds or subtracts the specified value to the base value. |
| MULTIPLY_BASE | 1, ADD_SCALAR | Multiplies the base value with the sum of all the modifier's amount. |
| MULTIPLY | 2, MULTIPLY_SCALAR | Similar to `MULTIPLY_BASE` but multiplies all the modifier's amount instead of adding all of them |
[*See MC wiki on how the game calculates the value for all modifiers*](https://minecraft.fandom.com/wiki/Attribute#Modifiers)
Examples
========
## Examples
This example item will grant +10 luck when the item is held in the main This example item will grant +10 luck when the item is held in the main
hand, but will grant +7 luck and +2 extra damage if the item is held in hand, but will grant +7 luck and +2 extra damage if the item is held in
the offhand slot: the offhand slot:
......
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
FAQ / Common Issues
Mythic Add-ons
Compatible Plugins
API Information
Packs
  • Pins
Mobs
  • Mob Options
    • Display Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Templates
  • Vanilla Overrides
  • Extra: Disguises
  • Extra: ModelEngine
Skills
  • Mechanics
  • Effects
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Metaskills
  • Placeholders
  • Variables
  • Math
Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework
Drops & DropTables
  • Drops
  • DropTables
  • FancyDrops
Spawning
  • Spawners
  • Random Spawns
Stats
  • Custom Stat Options
  • Modifiers
  • Built in Stats
Examples
Useful Tips