Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-253638

The symbols used within shulker box tooltips to show random loot table contents are untranslatable

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Resolution: Unresolved
    • 1.19, 1.19.1 Release Candidate 1, 1.19.1 Pre-release 2, 1.19.1 Pre-release 5, 1.19.1 Release Candidate 2, 1.19.1, 1.19.2
    • None
    • None
    • Confirmed
    • Internationalisation
    • Low

    Description

      The Bug:

      The "???????" symbols that are used within shulker box tooltips to show random loot table contents are missing a translation key. Every other string throughout the game that contains the "?" symbol allows it to be correctly translatable, therefore introducing an inconsistency.

      If you wish to display this string of text in-game, you can run the following command provided below and observe the tooltip of the shulker box.

      /give @s minecraft:shulker_box{BlockEntityTag:{LootTable:"minecraft:chests/simple_dungeon"}}

      Steps to Reproduce:

      • Attempt to search for the existence of this string by using this search filter on the official Minecraft crowdin project.
      • Take note as to whether or not the symbols used within shulker box tooltips to show random loot table contents are untranslatable.

      Observed Behavior:

      The symbols used within shulker box tooltips to show random loot table contents are untranslatable.

      Expected Behavior:

      The symbols used within shulker box tooltips to show random loot table contents would be translatable.

      Code Analysis:

      Code analysis by Avoma can be found below.

      The following is based on a decompiled version of Minecraft 1.19.1 Release Candidate 1 using Mojang mappings.

      net.minecraft.world.level.block.ShulkerBoxBlock.java
      public class ShulkerBoxBlock extends BaseEntityBlock {
         ...
         @Override
         public void appendHoverText(ItemStack itemStack, @Nullable BlockGetter blockGetter, List<Component> list, TooltipFlag tooltipFlag) {
            super.appendHoverText(itemStack, blockGetter, list, tooltipFlag);
            CompoundTag compoundTag = BlockItem.getBlockEntityData(itemStack);
            if (compoundTag != null) {
               if (compoundTag.contains("LootTable", 8)) {
                  list.add(Component.literal("???????"));
               }
               ...

      If we look at the above class, we can see that the symbols used within shulker box tooltips to show random loot table contents are hardcoded, and as a result, are untranslatable. This is evident through the following line of code:

      list.add(Component.literal("???????"));

      Attachments

        Activity

          People

            Unassigned Unassigned
            Avoma Avoma
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              CHK: