Mojira Archive
MC-32284

Placing an enchanted item with a non-existent ench ID will crash when placing it in the first slot of an anvil

Steps to reproduce

  • Type
    /give <itemID> 1 0 {ench:[1:{id:45,lvl:1}]}

    (for the ID I used 45, but all other incompatible IDs work, for example, all numbers from 36 to 47) to give yourself an item with a non-existent enchantment ID

  • Place an anvil and place the item in the FIRST slot
    Minecraft will crash
java.lang.NullPointerException: Updating screen events
	at yl.e(SourceFile:276)
	at yl.a(SourceFile:425)
	at bdo.g(SourceFile:115)
	at bdo.a(SourceFile:160)
	at yj.b(SourceFile:83)
	at yj.a(SourceFile:377)
	at yl.a(SourceFile:119)
	at ym.e(SourceFile:40)
	at py.a(SourceFile:68)
	at zp.c(SourceFile:77)
	at yj.a(SourceFile:464)
	at yl.b(SourceFile:394)
	at yj.a(SourceFile:193)
	at bjz.a(SourceFile:308)
	at bdn.a(SourceFile:490)
	at bdn.a(SourceFile:318)
	at bdo.a(SourceFile:121)
	at bcl.d(SourceFile:232)
	at bcl.k(SourceFile:211)
	at azi.p(SourceFile:1308)
	at azi.ah(SourceFile:760)
	at azi.f(SourceFile:711)
	at net.minecraft.client.main.Main.main(SourceFile:152)