mojira.dev
MC-277323

attribute modifier operation types work incorrectly

The operation type add_multiplied_base behaves as if it was add_multiplied_total.
How to recreate:
1. create a new world in the specified version and add yourself an attribute modifier like this:

/attribute @s minecraft:armor modifier add armor1 1 add_value

This will create a new attribute modifier and add it to you. Use the command

/attribute @s minecraft:armor get

to retrive the calculated attribute value. It should be 1.

2. add your self a second attribute modifier like this:

/attribute @s minecraft:armor modifier add armor2 1 add_multiplied_base

Use the command

/attribute @s minecraft:armor get

to retrive the calculated attribute value.

What should happen:
The base of the minecraft:armor attribute is 0.0d by default. This means that when adding a value that was multiplied by this base it should always add 0. Therefore result should be 1.

What actually happens:
The modifier uses the total value of the attribute which is 1.0d and multiplies it by 1. It then adds the value to the attribute resulting in a total value of 2.0d. Therefore the result is 2.

Comments 1

Thank you for your report!
After consideration, the issue is being closed as Working as Intended.

Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.

Full Version HistorySnapshot Version HistoryThe official Minecraft feedback site

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Nuclearinferno

(Unassigned)

Confirmed

(Unassigned)

24w40a

Retrieved