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

When drinking a potion, Witches' movement speed modifier is -0.25 instead of -100%

    XMLWordPrintable

Details

    • Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Minecraft 18w05a, Minecraft 1.13.2, 1.15.2, 1.17.1, 1.18.1
    • None
    • None
    • Confirmed
    • (Unassigned)

    Description

      When drinking a potion, witches are given an attribute modifier that affects generic.movementSpeed with a value of -0.25 and an Operation of 0. As Witches' default value for generic.movementSpeed is 0.25, this effectively sets their generic.movementSpeed to 0. However, if a Witch is summoned with a custom generic.movementSpeed value over 0.25, it will be able to move while drinking a potion. If the custom value is under 0.25, then the witch will be able to move whilst under a slowness effect with amplifier 7 or greater, as 7 gives -105% movement speed. At negative movement speeds, that will become a positive movement speed.

      The fix for these strange cases is to just make the attribute modifier for drinking potions be -1 with Operation 2, as this will set the witch's generic.movementSpeed attribute to 0, even if it has drunk a speed potion.

      Steps To Reproduce: (from ampolive)

      1. Run the command
        /summon witch ~ ~ ~ {Attributes:[{Name:"generic.movement_speed",Base: 1.0d}]}
        
      2. Shoot the witch with a Flame bow.
      3. Observe how the witch still moves while drinking a Fire Resistance potion.

      Attachments

        Activity

          People

            Unassigned Unassigned
            avantir_yihn Avantir_Yihn
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              CHK: