mojira.dev
MC-69348

give enchanted book with a invalid enchant crashes the game

i used the command /give @a minecraft:enchanted_book 1 0 {StoredEnchantments:[{id:300,lvl:1}]}

and after i hover the book on my invetory the game crashes, crash log here

Attachments

Comments 3

Cannot Reproduce
But I don't think that you are supposed to use that many JVM Arguments, unless you know what they do.

Not surprised if the game crashes. It tries to take the number stored in NBT and convert that to the enchantment name to display on the item, by picking it from a list of all the enchantments. If you give it an invalid number, say 300, there is no 300th enchantment in that list, so the game is then trying to display something that doesn't exist, as shown in "java.lang.NullPointerException: Rendering screen".

maybe Conor is right, i was just looking at what would happens if i give an item with a invalid enchant and this happens

Maxwell Souza Carvalho

(Unassigned)

Unconfirmed

Minecraft 1.8-pre1

Retrieved