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

Arm swing animation speed does not take mining fatigue into account when player has haste

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.13, Minecraft 18w30b, Minecraft 1.13.2, Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w45a, 20w46a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w08b, 1.17.1, 1.20.4, 23w51b, 1.21
    • Confirmed
    • Player Animation

      The bug

      Mining fatigue is ignored when determining the arm animation speed of the player if they have haste as well even though when calculating how long they need to break a block both effects are considered.

      How to reproduce

      1. Place for example a log block
      2. Switch to Survival mode and break the log
      3. Place it again
      4. Apply haste and mining fatigue
        /effect give @s mining_fatigue 100 0 true
        /effect give @s haste 100 0 true
        
      5. Break the log again
        It took longer to break the log but your arm animation was faster

      Code analysis

      Based on 1.12 decompiled using MCP 9.40 PRE 1

      The method net.minecraft.entity.EntityLivingBase.getArmSwingAnimationEnd() ignores mining fatigue if the entity has haste.

        1. MC-118859.mp4
          4.77 MB
        2. MC-118859.png
          MC-118859.png
          894 kB

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            8 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: