This article relates to a client crash that is caused by holding a bugged item in the player's hand. The client will crash as soon as the item is either placed in the active slot on the hotbar, or the item is first placed in the hotbar and then selected. When the client tries to render the item in the player's hand, it fails and crashes. When the player tries to re-join, the server remembers which hotbar slot was active and so the client will crash upon joining. The specific cause of the crash can vary so the intital lines of a stack trace in a crash report cannot be relied upon to identify the problem. However, the following lines (or similar) may appear near the top of the stack trace:
at net.minecraft.entity.player.EntityPlayer.func_70620_b(EntityPlayer.java:1843)
at net.minecraft.client.entity.EntityPlayerSP.localGetItemIcon(EntityPlayerSP.java)
at api.player.client.ClientPlayerAPI.getItemIcon(ClientPlayerAPI.java:4816)
at net.minecraft.client.entity.EntityPlayerSP.func_70620_b(EntityPlayerSP.java)
at net.minecraft.client.renderer.ItemRenderer.renderItem(ItemRenderer.java:100)
at net.minecraft.client.renderer.ItemRenderer.func_78440_a(ItemRenderer.java:486)
Fix 1:
The game will save current item slot and inventory into your player's save file located in:
/<world>/players/<player_name>.dat
or
/<world>/playerdata/<Player_UUID>.dat
You can find out a player's UUID at this website: http://mcuuid.net/
This file is in the NBT format and can be edited using the NBTExplorer tool: http://www.minecraftforum.net/topic/840677-nbtexplorer-nbt-editor-for-windows-and-mac/
You can remove the inventory item from this file as follows:
- Download and run NBTExplorer
- Download the .dat from your server: FTP Access to Download and Upload files
- Rename the .dat on your server to .dat.backup (in case you make a mistake)
- Open the .dat file: Open>File...
- Scroll down and look for the 'SelectedItemSlot' entry: Make a note of the value
- Now find the 'Inventory' node and expand it
- Expand each node in 'Inventory' until you find the one with a 'Slot' value that matches the 'SelectedItemSlot'
- Highlight that node by left clicking it. Delete it by pressing the delete key or clicking the red 'X' icon
- Save the changes: Click the save icon
- Close NBTExplorer
- Upload the .dat back to the server
Fix 2:
A quick option is to delete or rename the .dat file. This will wipe that player's progress and inventory.