The hyphen used within boss bars for raids is untranslatable
The Bug:
The "-" symbol used within boss bars for raids is untranslatable and is missing a translation key.
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 hyphen used within boss bars for raids is untranslatable.
Observed Behavior:
The hyphen used within boss bars for raids is untranslatable.
Expected Behavior:
The hyphen used within boss bars for raids would be translatable.
Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 22w24a using Mojang mappings.
net.minecraft.world.entity.raid.Raid.java
public class Raid { ... private static final Component RAID_BAR_VICTORY_COMPONENT = RAID_NAME_COMPONENT.copy().append(" - ").append(VICTORY); private static final Component RAID_BAR_DEFEAT_COMPONENT = RAID_NAME_COMPONENT.copy().append(" - ").append(DEFEAT); ... public void tick() { ... if (this.status == RaidStatus.ONGOING) { ... if (this.ticksActive % 20L == 0L) { ... if (n2 > 0) { if (n2 <= 2) { this.raidEvent.setName(RAID_NAME_COMPONENT.copy().append(" - ").append(Component.translatable(RAIDERS_REMAINING, n2))); } else { ...
If we look at the above class, we can see that the hyphen used within boss bars for raids is hardcoded, and as a result, is untranslatable. This is evident through the following pieces of code:
... append(" - ").append(VICTORY);
... append(" - ").append(DEFEAT);
... append(" - ").append(Component.translatable(RAIDERS_REMAINING, n2)));
2022-06-18, 09:54 AM
2023-09-01, 11:26 AM
2023-09-01, 11:26 AM
5
2