Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-51161

Zombified piglin aggression broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.17.10, 1.15.0.51 Beta, 1.12.0, 1.16.1, 1.16.40, 1.18.12 Hotfix
    • None
    • Confirmed
    • Multiple
    • 94906

      Updated July 22, 2021 by GoldenHelmet
      When hit, zombified piglins (z.piglins for short) broadcast anger to other z.piglins. Each angered zombified piglin broadcasts in turn, forming a chain reaction that should extend across the simulation distance. However, this is defeated by the z.piglin follow_range, which limits each z.piglin to only pursuing targets within its own range. The z.piglin follow range is not set in the zombie_pigman.json entity behavior file, so it defaults to 16. Each z.piglin gets a random_spawn_bonus added to its follow range, but this makes z.piglin behavior unpredictable and still leaves many z.piglins unable to pursue the player when angered. (The short base follow range + random bonus applies to all zombie variants in Bedrock Edition and has its own general report at MCPE-50207.)

      In addition to the follow range problem, the distance that each z.piglin broadcasts anger is only 20 blocks, whereas it is between 32 and 55 blocks in Java Edition according to the wiki. (For all I know, the 32-55 block range reported for Java may due to the random spawn bonus mechanic and the fact that on Java follow range and targeting range are the same thing, and possibly that aggro range is the same as follow/targeting too. If so, then it's possible Java z.piglins just have double the base follow range of Bedrock z.piglins.)

      Note: the original report below contains a link to a video, but the video is outdated. The issue with turtle egg aggression is fixed (MCPE-36244). I cannot reproduce z.piglins not attacking when hit within 16 blocks of the player in vanilla (but see comment below). The issue with z.piglins not picking up anger if they spawn while others nearby are angry does still occur.

      Steps to reproduce

      1. Load Zombified Piglin aggro testing.mcworld. It contains a 33x33 platform at Y = 100 with marked radii and a system of command blocks. Emerald marks out a 16 block radius from the gold block, and red nether brick marks out a 20 block radius. The command blocks keep the player buffed with resistance, regeneration, and strength, facilitate switching between survival and creative modes, and provide a toggle to freeze z.piglins in place or allow them to move.
      2. Switch to creative mode and turn on the freeze toggle.
      3. Spawn z.piglins in each colored area, and one on the gold block.
      4. Switch to survival mode.
      5. Stand behind the gold block (between the command blocks) and throw a snowball at the z.piglin on the gold block.
      6. Walk around to each of the z.piglins.
      7. Stand behind the gold block (between the command blocks), kill the z.piglin on it, and turn off the toggle.
      8. If the z.piglins do not approach you in step (7), approach them.
      9. Repeat these steps, but spawn a few z.piglins as you walk around in step (6).

      Expected results

      All z.piglins attack you in step (6) and rush toward you to attack in step (7).

      Observed result

      All z.piglins attack you in step (6), but in step (7) only some of the z.piglins in the red or gray areas attack. The z.piglins that do not approach you in step (7) do approach you in step (8) when you come within their follow range.
      Sometimes they got it.mp4
      Somtimes they don't.mp4
      The extra z.piglins that you spawn in step (9) do not attack you as you repeat steps (6) - (8).


      Link to video - https://youtu.be/7J-0tpTtF-8

      The zombie pigman aggression system is completely broken in several ways.

      The way the behavior is supposed to work is when you hit a pigman, it calls out to all pigmen within a specific range (I tested up to 4 chunks worked, 5 chunks didn’t, this was with a simulation distance of 4 so this makes sense) and all of those pigmen within that range are supposed to become hostile to the player. As new pigmen come into range or spawn in, they too are supposed to be called in to attack the player, and this happen continuously until there are no pigmen within range to call out to, or a cool-down timer is met.

      What happens is hitting a pigman will cause him to call out to others, but a seemingly random number of pigmen will respond to try and attack the player. Through further testing, even going as far as hitting one of the pigmen that do not come when called still does not cause the pigman that was hit to come aggressive. It is unclear why these pigmen do not become aggressive, nor why you can then hit them directly and they still do not attempt to attack.

      Lastly, when new pigmen spawn in while you have a pigman that is showing aggression to you, it should also become aggressive towards the player. It will spawn in and stay passive towards the player even with other hostile pigmen in the area.

            Prowl8413 Prowl 8413
            Votes:
            77 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              CHK: