Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7731

Damageable#setMaxDamage (or setDamage) does not work on spawn eggs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Doesn't matter I think

    • 4184-Spigot-fcd94e2-16c9767 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT)
    • developing my own plugin
    • Yes

      When max damage or damage is set, instead of getting durability, the spawn egg either turns into a different type, disapears completely, or remains the same but no durability is actually present (when viewed with F3 + H, and no bar appears).

       

      The time such an item is created the message "Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!" appears.

       

      to recreate, create a new ItemStack, set the material to a Creeper spawn egg for example, and then set the max durability on the item meta. Then when changing the damage on the item the bug is visible.

       

      Using minimal plugin attached, I added a command with syntax /egg item_name max_dmg dmg.

      for example /egg bat_spawn_egg 600 3 gives me nothing and /egg bat_spawn_egg 600 4 gives me elder guardian spawn egg.

            Unassigned Unassigned
            Steaf23 Steven van der Werf
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: