1

Need help with attributes

User5581507G 2/5/25 11:04 am history
262
3/8/2025 3:10 pm
I was trying to make low gravity boots and came up with this piece of code:
{
"function": "set_attributes",
"modifiers": [
{
"attribute": "minecraft:generic.gravity",
"amount": 0.027,
"operation": "add_value",
"slot": "feet"
}
]
}

it results in an error making entire item_modifier unusable

EDIT: I GOT ITTTT
i just had to add all the array components for it to work. Final code looks like this:
{
  "function": "set_attributes",
  "modifiers": [
    {
    "attribute"; "minecraft:generic.gravity",
    "operation": "add_value",
    "amount": -0.04,
    "operation": "add_value",
    "id": "gravity",
    "slot": "feet"
    }
]
}

  
also idk why but it must be full minecraft:genetic.gravity in "attribute", but gravity only in "id" is enough
Posted by
User5581507G
Level 1 : New Miner
0

  Have something to say?

JoinSign in

3

Cteklyaxa
03/08/2025 3:10 pm
He/Him • Level 40 : Master Cat
1. Not "attribute" but "type" instead
2. Double "operation" tag
1
User5581561G
02/05/2025 11:38 am
Level 1 : New Miner
Cant you just use smth like mcstacker and modify the code a little bit from the command to your code
1
User5581507G
02/05/2025 1:40 pm
Level 1 : New Miner
no.
1

Welcome