Affects Version/s: Minecraft 1.11.2, Minecraft 17w18b, Minecraft 1.12 Pre-Release 1, Minecraft 1.12 Pre-Release 2, Minecraft 1.12 Pre-Release 3, Minecraft 1.12.2, Minecraft 17w47b, Minecraft 18w14a, Minecraft 18w14b, Minecraft 18w15a, Minecraft 18w21a
Fix Version/s: Minecraft 1.13-pre6
Minecraft crashes when you put an item with invalid enchantments in the first slot of an anvil and an item with valid enchantments in the second one.
- Give yourself an item with invalid enchantments
- Get another item with valid enchantments
- Put the item with the invalid enchantments in the first slot and the one with the valid ones in the second one
Based on 1.11.2 decompiled using MCP 9.35 rc1
The method net.minecraft.inventory.ContainerRepair.updateRepairOutput() does not skip enchantments with the id null. However, it might be better to change the method net.minecraft.enchantment.EnchantmentHelper.getEnchantments(ItemStack) to not add not existing enchantments to the map in the first place.