Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-264657

Absorption gold heart refilling is determined by whether the low level and the high level have the same hideParticles parameter


    • Confirmed
    • Commands
    • Low
    • Platform

      The bug

      Applying multiple levels (amplifiers) of absorption influences the current number of gold hearts differently depending on the hideParticles parameter of the effect command. If you alternate the hideParticles parameter, gold hearts are accumulated. If you keep the hideParticles parameter the same, the number of gold hearts stays the same.

      To reproduce

      1. Give yourself absoprtion with a high amplifier:
        /effect give @s minecraft:absorption 1000 14 true
      2. Take damage to lose most, but not all, of the gold hearts:
        /damage @s 52
      3. Give yourself absorption with a low amplifier and the same value of the hideParticles parameter as the high amplifier effect:
        /effect give @s minecraft:absorption 2000 0 true

        Note: Due to MC-169964, you will see red text that claims the command failed, but the low amplifier effect was indeed applied. Optionally, if you want to check that the low amplifier effect was applied, you can run the following command and see that there is a "HiddenEffect" in the NBT:

        /data get entity @s ActiveEffects[{Id:22}]
        /data get entity @s active_effects[{id:"minecraft:absorption"}]
      4. Observe that the number of gold hearts stayed the same.
      5. Run the command again, but this time alternate the hideParticles parameter:
        /effect give @s minecraft:absorption 2000 0 false
      6. Observe that you gained 2 gold hearts.
      7. Repeatedly run the command, alternating the hideParticles parameter between true and false each time you run it:
        /effect give @s minecraft:absorption 2000 0 true
        /effect give @s minecraft:absorption 2000 0 false
      8. Observe that you continue to accumulate gold hearts until you obtain the number of gold hearts that you initially had from the high amplifier effect. After obtaining this number of gold hearts, continuing to run the command with the alternating hideParticles parameter does not further increase the number of gold hearts.

      Observed behavior

      Unintuitively, the choice of the hideParticles parameter determines whether the number of gold hearts increases or stays the same.

      Expected behavior

      Running two commands that are identical except for the hideParticles parameter should have identical results except for the presence of particles and the effect icon on the screen. The hideParticles parameter shouldn't determine unrelated things.

      Extra Information

      You can also encounter this bug by using custom potions that directly specify the Ambient, ShowParticles, or ShowIcon NBT tags instead of by using the effect command with the hideParticles parameter. If you would like to test that, there is a test world uploaded as an attachment to MC-88694 that conveniently contains command blocks that give you custom potions. (However, that world was created before the mob effect changes in 23w32a, so the commands in the command blocks use the old format. This test world is only useful in versions 23w31a or earlier.)

            SystemInvecklare [Mojang] SystemInvecklare
            pine1needle [Helper] pine1needle
            4 Vote for this issue
            3 Start watching this issue