Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2025-01-11 15:41:08 +01:00
Fix: Manually translated item names for block items not showing up properly (#4857)
Dieser Commit ist enthalten in:
Ursprung
b0c7ddb68d
Commit
6ab0186fc9
@ -59,6 +59,7 @@ import org.geysermc.geyser.inventory.item.StoredItemMappings;
|
||||
import org.geysermc.geyser.item.GeyserCustomMappingData;
|
||||
import org.geysermc.geyser.item.Items;
|
||||
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.registry.BlockRegistries;
|
||||
import org.geysermc.geyser.registry.Registries;
|
||||
@ -403,7 +404,7 @@ public class ItemRegistryPopulator {
|
||||
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
|
||||
// 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.");
|
||||
}
|
||||
|
||||
|
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren