mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix: Manually translated item names for block items not showing up properly (#4857)
This commit is contained in:
parent
b0c7ddb68d
commit
6ab0186fc9
1 changed files with 2 additions and 1 deletions
|
@ -59,6 +59,7 @@ import org.geysermc.geyser.inventory.item.StoredItemMappings;
|
||||||
import org.geysermc.geyser.item.GeyserCustomMappingData;
|
import org.geysermc.geyser.item.GeyserCustomMappingData;
|
||||||
import org.geysermc.geyser.item.Items;
|
import org.geysermc.geyser.item.Items;
|
||||||
import org.geysermc.geyser.item.components.Rarity;
|
import org.geysermc.geyser.item.components.Rarity;
|
||||||
|
import org.geysermc.geyser.item.type.BlockItem;
|
||||||
import org.geysermc.geyser.item.type.Item;
|
import org.geysermc.geyser.item.type.Item;
|
||||||
import org.geysermc.geyser.registry.BlockRegistries;
|
import org.geysermc.geyser.registry.BlockRegistries;
|
||||||
import org.geysermc.geyser.registry.Registries;
|
import org.geysermc.geyser.registry.Registries;
|
||||||
|
@ -403,7 +404,7 @@ public class ItemRegistryPopulator {
|
||||||
if (javaOnlyItems.contains(javaItem) || javaItem.rarity() != Rarity.COMMON) {
|
if (javaOnlyItems.contains(javaItem) || javaItem.rarity() != Rarity.COMMON) {
|
||||||
// These items don't exist on Bedrock, so set up a variable that indicates they should have custom names
|
// These items don't exist on Bedrock, so set up a variable that indicates they should have custom names
|
||||||
// Or, ensure that we are translating these at all times to account for rarity colouring
|
// Or, ensure that we are translating these at all times to account for rarity colouring
|
||||||
mappingBuilder = mappingBuilder.translationString((bedrockBlock != null ? "block." : "item.") + entry.getKey().replace(":", "."));
|
mappingBuilder = mappingBuilder.translationString((javaItem instanceof BlockItem ? "block." : "item.") + entry.getKey().replace(":", "."));
|
||||||
GeyserImpl.getInstance().getLogger().debug("Adding " + entry.getKey() + " as an item that needs to be translated.");
|
GeyserImpl.getInstance().getLogger().debug("Adding " + entry.getKey() + " as an item that needs to be translated.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue