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

Custom mobs and normal Vexes drop equipped items with looting despite DropChances set to 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 19w37a
    • Minecraft 1.4.4, Minecraft 1.8.4, Minecraft 1.8.7, Minecraft 1.8.9, Minecraft 16w05b, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 1.10, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w35a, Minecraft 1.11, Minecraft 1.12.2, Minecraft 17w45b, Minecraft 18w03b, Minecraft 1.13-pre1, Minecraft 1.13.1, 1.14.4
    • Confirmed
    • Entities

      I'm playing around with custom spawners for a combat arena in an adventure map. I noticed that my mobs drop items they have equipped, even if their respective drop chance is set to 0.

      I've added the schematics file for a mob spawner, of which the mobs are affected by this issue.
      The mob spawned is a PigZombie wearing a pumpkin on its head and a torch with fire aspect 2 in its hand.
      They also have a healing potion in their chest slot with dropchance 0.6, which can't be seen. All the other dropchances are 0.
      Two potion effects have been applied: weakness and invisibility.
      I've seen them drop the healing potions, as intended, but the enchanted torch as well.
      I've seen them drop their pumpkin when I started messing around with the spawner, but not (yet?) in the version I've attached.

      Other info:

      • I did not notice this in the 1.4.3 PRE.

      Mob command
      /summon bat ~ ~1 ~ {NoAI:1b,ArmorItems:[{id:"stone",Count:1b},{id:"dirt",Count:1b},{id:"grass_block",Count:1b},{id:"glass",Count:1b}],HandItems:[{id:"white_wool",Count:1b},{}],ArmorDropChances:[0f,0f,0f,0f],HandDropChances:[0f,0f]}
      
      Looting command
      /give @p minecraft:stick{Enchantments:[{id:sharpness,lvl:32767},{id:looting,lvl:32767}]}
      

      Code analysis by marcono1234 can be found in this comment.

      As of 1.11, this affects Vex swords, since they have a HandDropChance of 0 on the mainhand.

            boq [Mojang] Bartosz Bok
            marcono1234 Marcono1234
            Votes:
            13 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: