Minecraft wiki entry for Anvil_mechanics, associated text: Stackable items can be renamed as a stack while paying a single prior work penalty and a single level for the rename. Note that renamed items, in general, do not stack with normal items, and renamed blocks which do not normally store block entity data lose their name when placed. Blocks such as chests and shulker boxes which do have associated block entity data retain their custom names.