[Bug]: Incorrect armor points calculation #6
Labels
No labels
Bug
Confirmed
Crash
Documentation
Duplicate
Enhancement
High Priority
Invalid
Mod compatibility
Needs triage
Stale
Won't Fix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
LunaFox/DefaultComponents#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version information
alpha 6
Expected Behavior
Armor with changed attribute modifier stops giving armor points
Actual Behavior
Reproduction Steps
Java version
21.0.4
Additional information
No response
There is a slight difference on how Mojang named the description for modifiers for the chest slot and how the data is taken, while is says "While on Body" it expects you to set the slot as "chest"
In your gif it says "When equipped" instead of "While on Body"
I'm unsure on the difference between this two but it seems to be enough for the armor points to not apply
While I was able to get things working by changing the slot type I am noticing a weird behavior on your gif, where the armor bars drop when you equip the boots
I'm looking into that part
ok this is very weird
I'll look more into it once I wake up
found the reason, all items were using the same id for the attributes
As by the Minecraft Wiki:
for some reason there is an id for the attribute modifiers and you can override them by using another item with the same id
but it behaves really inconsistently
oops
tysm!
will wait for the update on modrinth!
that is just a change needed on the datapack, where you set
"id": "minecraft:generic.armor",and"id": "minecraft:base.movement_speed",, give a unique one for each armor pieceweirdly enough, I only found out by going to 1.21.4 where it showed me the details of the vanilla default attribute modifiers, and it didn't show me on 1.21
Seems like armor attributes was hardcoded in 1.21.1
yeah, that is what I was getting from my debug command
It seems that setting the component with the mod does override it tho, just need to have the id different for each armor slot
yeah ID works well. Thanks a lot