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

Charged creeper does not always drop skull if zombie variants are nearby

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.16.1, 20w30a, 1.16.2 Pre-release 1
    • Fix Version/s: 1.16.2 Pre-release 2
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Mob behaviour
    • Mojang Priority:
      Important

      Description

      The bug

      When a charged creeper explodes and, additionally to a mob which can drop a skull, there are zombie variants (e.g. husk) around, no skull might be dropped.

      Reproduction steps

      1. Summon a charged creeper
        /summon creeper ~ ~ ~ {powered:1b,NoAI:1b}
        
      2. First summon a zombie variant (e.g. a husk)
      3. Then summon a mob which can drop a skull (e.g. a wither skeleton) in the same chunk
        Note: The order of summoning the mobs is important (and depends on implementation details) because it determines in which order the explosion kills them.
      4. Ignite the creeper by right clicking it with a flint and steel
        No skull is dropped

      Code analysis

      Mojang names

      net.minecraft.world.entity.monster.Zombie.dropCustomDeathLoot(DamageSource, int, boolean) calls increaseDroppedSkulls() before actually making sure that the zombie variant can drop a skull.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              xilefian [Mojang] Felix Jones
              Reporter:
              marcono1234 [Mod] Marcono1234
              Votes:
              11 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                CHK: