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

Applying a nonexistent enchantment to an item through an anvil crashes the game

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 17w06a
    • None
    • Unconfirmed

      When an item with an nonexistent enchantment ID is in the left side of an anvil, and another item with which it can be combined is placed on the right, the game will crash.

      Here is an example command for an invalid enchantment:

      /give @p diamond_pickaxe 1 0 {ench:[{id:107s}]}
      

      Note that the game will only crash when the two items can be combined (i.e. a result would appear in the final box), and also does not crash if the illegally enchanted item is in the second box (the invalid enchant is simply left off the final item).

      java.lang.NullPointerException: Updating screen events
      	at aii.c(SourceFile:105)
      	at acm.e(SourceFile:251)
      	at acm.a(SourceFile:154)
      	at acm$1.x_(SourceFile:44)
      	at rr.a(SourceFile:104)
      	at adl.d(SourceFile:79)
      	at acl.a(SourceFile:246)
      	at bns.a(SourceFile:413)
      	at bij.a(SourceFile:520)
      	at bij.b(SourceFile:491)
      	at bhr.k(SourceFile:410)
      	at bhr.p(SourceFile:381)
      	at bev.t(SourceFile:1589)
      	at bev.av(SourceFile:973)
      	at bev.a(SourceFile:400)
      	at net.minecraft.client.main.Main.main(SourceFile:124)
      

            Unassigned Unassigned
            tryashtar [Mod] tryashtar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: