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

Parrots can still be sitting on shoulders, when they are burning, poisoning and withering

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.12.2, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w02a, Minecraft 18w03a, Minecraft 18w03b, Minecraft 18w05a, Minecraft 18w06a, Minecraft 18w07a, Minecraft 18w07b, Minecraft 18w07c, Minecraft 18w08a, Minecraft 18w08b, Minecraft 18w09a, Minecraft 18w10a, Minecraft 18w10b, Minecraft 18w10c, Minecraft 18w10d, Minecraft 18w11a, Minecraft 18w14a, Minecraft 18w14b, Minecraft 18w15a, Minecraft 18w16a, Minecraft 18w19b, Minecraft 18w20c, Minecraft 1.13-pre1, Minecraft 1.13-pre6, Minecraft 1.13, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1-pre2, Minecraft 1.13.1, Minecraft 1.13.2-pre1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, Minecraft 18w43a, Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14.3, 1.14.4, 19w34a, 19w39a, 19w40a, 19w45a, 19w45b, 19w46b, 1.15 Pre-release 1, 1.15, 1.15.1, 1.15.2 Pre-Release 1, 1.15.2 Pre-release 2, 1.15.2, 20w06a, 20w07a, 20w08a, 20w09a, 20w10a, 20w11a, 20w12a, 20w13b, 20w18a, 1.16 Pre-release 3, 1.16 Release Candidate 1, 1.16, 1.16.1, 1.16.2 Pre-release 1, 1.16.2 Release Candidate 1, 1.16.2 Release Candidate 2, 1.16.2, 1.16.3, 1.16.4 Pre-release 1, 1.16.4 Release Candidate 1, 1.16.4, 20w45a, 21w03a, 1.16.5, 21w05a, 21w20a, 1.17 Pre-release 2, 1.17 Pre-release 5, 1.17 Release Candidate 1, 1.17.1 Release Candidate 1, 1.17.1, 21w37a, 21w40a, 21w43a, 1.18 Pre-release 5, 1.18, 1.18.1 Release Candidate 1, 1.19, 1.19.1 Release Candidate 2, 1.19.1 Release Candidate 3, 1.19.1, 1.19.2 Release Candidate 1, 1.19.2, 22w42a, 1.19.3 Release Candidate 1, 1.19.3, 23w04a, 23w06a, 1.19.4 Release Candidate 1, 1.19.4 Release Candidate 3, 1.19.4, 23w16a, 23w17a, 23w18a, 1.20 Pre-release 1, 1.20 Pre-release 2, 1.20 Pre-release 3, 1.20 Pre-release 4, 1.20 Pre-release 5, 1.20 Pre-release 6, 1.20 Pre-release 7, 1.20 Release Candidate 1, 1.20, 1.20.1 Release Candidate 1, 1.20.1, 23w31a, 23w32a, 23w33a, 23w35a, 1.20.2 Pre-release 2, 1.20.2 Release Candidate 1, 1.20.2, 23w40a, 23w41a, 23w42a, 23w43b, 23w44a, 23w45a, 23w46a, 1.20.3 Pre-Release 2, 1.20.3 Release Candidate 1, 1.20.4, 23w51b, 24w03b, 24w04a, 24w05b, 24w06a, 24w07a, 24w09a, 24w11a, 24w12a, 24w13a, 24w14a, 1.20.5 Pre-Release 1, 1.20.5 Pre-Release 3, 1.20.5 Release Candidate 2, 1.20.5, 1.20.6 Release Candidate 1, 1.20.6, 24w18a, 24w21b, 1.21 Pre-Release 2, 1.21 Pre-Release 4, 1.21 Release Candidate 1, 1.21, 24w33a, 1.21.1, 24w34a, 24w35a, 24w36a, 24w37a, 24w38a, 24w39a, 1.21.2 Pre-Release 3, 24w44a, 1.21.3
    • Confirmed
    • Mob behaviour, Player

      The bug

      Parrots can still be sitting on shoulders, when they are burning, poisoning and withering.

      Caused the following issues:
      1. When the parrot is on the shoulder, will not have fire animation and potion particles. (This relates to MC-115111)
      2. No matter how long the parrot stays on the shoulders, when they get off the shoulders still continue to burn, poison and wither (in general, no status effects can be applied or tick down, or have any effect on a shoulder parrot).

      Code analysis

      The following is based on a decompiled version of Minecraft 1.12.2 using MCP 9.40.
      The reason for this is, because the flag boolean in the method net.minecraft.entity.ai.EntityAILandOnOwnersShoulder.shouldExecute() does not check if the entity (parrot) is burning, is poisoned or withered.

      Suggested fix
      boolean flag = entitylivingbase != null && !((EntityPlayer)entitylivingbase).isSpectator() && !((EntityPlayer)entitylivingbase).capabilities.isFlying && !entitylivingbase.isInWater() &&
      //Everything beneath is added to fix this issue
      !entity.isBurning() && !entity.isPotionActive(MobEffects.POISON) && !entity.isPotionActive(MobEffects.WITHER);
      

        1. 2017-12-28_02.17.03.png
          491 kB
          [Mod] Les3awe
        2. 2017-12-28_02.17.13.png
          550 kB
          [Mod] Les3awe
        3. 2017-12-28_02.17.18.png
          498 kB
          [Mod] Les3awe
        4. 2017-12-28_02.20.49.png
          431 kB
          [Mod] Les3awe
        5. 2017-12-28_02.21.00.png
          371 kB
          [Mod] Les3awe
        6. 2017-12-28_02.21.36.png
          474 kB
          [Mod] Les3awe
        7. 2017-12-28_02.22.07.png
          455 kB
          [Mod] Les3awe
        8. 2017-12-28_02.22.11.png
          606 kB
          [Mod] Les3awe
        9. 2017-12-28_02.22.16.png
          586 kB
          [Mod] Les3awe

            Unassigned Unassigned
            Les3awe [Mod] Les3awe
            Votes:
            12 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: