The bug
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.
Steps to reproduce
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"
Code analysis
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.
Related issues
is duplicated by
relates to
Comments


This bug is quite annoying.. The best thing you can do is rename your shulker boxes to their corresponding color and than shulker box, but it will say the color in the container gui which the un-named doesn't and also the font is tilted
Can confirm for MC 1.12.1.

Confirmed in 1.12.2

Confirmed for 1.13.1.

Confirmed for 1.13.2
This was fixed in 18w43a

Bug appears again in 1.15.2
confirmed in 1.12