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

Items with invalid enchantment IDs crash the client when placed in an anvil

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 1.5.1
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Unconfirmed

      Description

      If an item has an invalid enchantment ID (between 0-255, but not one that is in use), the item will cause the client to crash when placed into an anvil.

      Any other actions involving the enchantment (such as using the item, or hovering over it) do not cause a crash, as the validity of the enchantment is checked ('if Enchantment != null'). This sanity check is not performed in the anvil GUI.

      Steps to reproduce:

      1. Put any kind of item in your inventory
      2. Use an NBT editor to put an enchantment on the item using an ID not used by any existing enchantment (i.e 200)
      3. Go back ingame, the item will have an enchanted glow, but not list any enchantments (as expected)
      4. Place the item in an anvil
      5. The game crashes

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              lrns123 Lourens Elzinga
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: