-
Bug
-
Resolution: Fixed
-
Minecraft 1.12.2, Minecraft 18w03b, Minecraft 18w06a, Minecraft 18w20c, Minecraft 1.13-pre3, Minecraft 1.13-pre7, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30a, Minecraft 18w31a, Minecraft 1.13.1
-
Confirmed
Beacons have code for custom names, but the GUI doesn't render the name and the custom name isn't saved to NBT
The bug
Beacons have code to store a display name (all information based off of MCP 940):
/** * Called by ItemBlocks after a block is set in the world, to allow post-place logic */ public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { super.onBlockPlacedBy(worldIn, pos, state, placer, stack); if (stack.hasDisplayName()) { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TileEntityBeacon) { ((TileEntityBeacon)tileentity).setName(stack.getDisplayName()); } } }
There also is a custom name field in the block entity (customName), but it is never saved or loaded:
public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); this.primaryEffect = isBeaconEffect(compound.getInteger("Primary")); this.secondaryEffect = isBeaconEffect(compound.getInteger("Secondary")); this.levels = compound.getInteger("Levels"); } public NBTTagCompound writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); compound.setInteger("Primary", Potion.getIdFromPotion(this.primaryEffect)); compound.setInteger("Secondary", Potion.getIdFromPotion(this.secondaryEffect)); compound.setInteger("Levels", this.levels); return compound; }
Since there is code to set the custom name when placing a block, and fields to actually store that name, it seems likely that it was intended for the name to be visible. However, the actual beacon GUI doesn't display it.
Possible fixes
- Add code to render the beacon display name in the GUI and store the custom name field
OR
- Remove the currently unused code for the custom names
- relates to
-
MC-100198 Text "Inventory" missing in beacon GUI
- Resolved
-
MC-107016 Cannot testforblock using beacon CustomName
- Resolved
-
MC-115000 CustomName tag is not saved for beacons and enchanting tables
- Resolved
-
MC-124399 Banners save CustomName, even though it is not shown
- Resolved
-
MC-116465 Default GUIs got different heights; "Inventory", "main" GUI headline, partially also (tile) entity content location are offset
- Resolved