mojira.dev
MCPE-244197

Zombified piglins occasionally spawn with broken attributes because of non-existent spawn event

26.0 attempted to fix a bug where some zombie variants fail to form chicken jockeys. (MCPE-223845). However, zombified piglins were not actually fixed and were only made worse since that update. 0.75% of zombified piglins that spawn are supposed to be baby jockeys that find mounts like how baby zombies do, however they actually spawn as a broken zombified piglin that is neither an adult nor a baby, with the following broken attributes.

  • They cannot be affected by Smite.

  • They aren’t attacked by iron golems or snow golems.

  • They can be affected with Poison and Regeneration effects.

  • Piglins and armadillos aren’t scared of them.

  • They don’t drop xp upon death.

  • They cannot ride anything. (See MCPE-236034).

This happens because these broken

There are multiple ways to reproduce the issue.

Steps to reproduce:

  1. Place two repeating command blocks down, not touching each other.

  2. Type /summon zombie_pigman in one, and name the command block 'Summoner'.

  3. Type /kill @e[type=zombie_pigman,family=mob] in the other, and name it 'Killer'. Note: It has to have family=mob, otherwise the issue cannot be reproduced.

  4. Place levers on the two command blocks.

  5. Flick the 'Killer' lever first, then flick the 'Summoner' lever next.

Expected results:

  • No zombified piglins survive.

Actual results:

  • A few zombified piglins survive, those being the broken ones.

Additional notes:

  • This happens because of a non-existent spawn event in zombie_pigman.json, by the name of spawn_baby_jockey. Because it doesn’t exist, no component groups are added.

  • minecraft:type_family is actually required for mobs to be able to ride anything.

The fixes:

  • Remove the minecraft:experience_reward component from minecraft:pig_zombie_baby and minecraft:pig_zombie_adult component groups and add to the base components part like this:

    "minecraft:experience_reward": {
      "on_death": "query.last_hit_by_player ? (query.is_baby ? 12 : 5) + (Math.die_roll(query.equipment_count,1,3)) : 0"
    }
  • Add the minecraft:type_family component back into the base components part like this:

    "minecraft:type_family": {
      "family": [
        "zombie_pigman",
        "undead",
        "monster",
        "mob"
      ]
    }
  • Add the non-existent spawn_baby_jockey event like this:

    "spawn_baby_jockey": {
      "add": {
         "component_groups": [
            "minecraft:pig_zombie_baby",
            "minecraft:pig_zombie_jockey",
            "minecraft:pig_zombie_calm"
         ]
      }
    }

Attachments

Comments 2

Thank you for helping us improve Minecraft! We saved your files:

[media][media][media][media][media][media][media]

CodeCorrecter

(Unassigned)

Unconfirmed

Multiple

26.70.23 Preview, 26.62 Hotfix

Retrieved