Custom names from items can be removed by putting them in an anvil and emptying the name field.
For custom named shulker boxes that were placed down and picked up before that doesn't remove the custom name from the NBT data. This results in them taking their old name again after placing them down.
- Rename a shulker box in an anvil, for example name it "test"
- Place it down and pick it up again
- Put the shulker box in an anvil and empty the name field to rename it to its standard name
- Place the shulker box down
→ It will now be named "test" again. After picking it up the item also has its old name "test"
Based on 1.11.2 decompiled using MCP 9.35 rc1
The problem seems to be that when the shulker box is broken the name is stored in the CustomName tag of the BlockEntityTag as well, but renaming an item only changes the value of the Name tag in the display tag.
The method net.minecraft.block.BlockShulkerBox.breakBlock(World, BlockPos, IBlockState) currently removes the custom name of the shulker box tile entity to prevent it from being dropped by the method net.minecraft.block.BlockContainer.harvestBlock(World, EntityPlayer, BlockPos, IBlockState, TileEntity, ItemStack) as well.
If the custom name was removed before the NBT data is copied into the BlockEntityTag this bug could be solved too.