It would be nice if attributes, potion effects, and enchantments worked more similarly to each other, with a few necessary adjustments.
First, it would be nice if attributes, potion effects, and enchantments could all vary in magnitude by any amount rather than just integer amounts (like, jump boost 1.5 would make you jump 2.15625 blocks high).
When applied to items in commands, attributes and enchantments could easily use the same tag. The layout could be like this: {Attributes:[{ Name: "minecraft:speed", Magnitude: 2.71828183, Slot: "inventory_17"}]}
Slot 17 corresponds to the top right inventory slot. This way, you could modify a player's movement speed etc. from an item in a set inventory slot rather than force them to hold onto something or wear a certain armor piece.
This layout does away with operation, UUIDLeast, and UUIDMost which were always pretty unnecessary. Just make the default operation be add (and make sure the addition works with multiple items/effects modifying a value).
Negative magnitudes should also work. Say you have a helmet that reduces max health by 3 hearts. The tag would look like this: {Attributes:[{ Name: "minecraft:health", Magnitude: -6, Slot: "head"}]}
Now, for things that only make sense for integer values (like health boost), you could have it so numbers like 2.472 get rounded to the nearest integer.
Continued in Comments
Please sign in to leave a comment.
2 Comments