From 03bb4f654c35fc5fa0b5c3a846bf086c50ec79c3 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 27 Aug 2022 15:57:13 +0200 Subject: [PATCH] Fixed race descriptions --- .../minelittlepony/unicopia/command/SpeciesCommand.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/command/SpeciesCommand.java b/src/main/java/com/minelittlepony/unicopia/command/SpeciesCommand.java index b36f4a5c..bc4e04aa 100644 --- a/src/main/java/com/minelittlepony/unicopia/command/SpeciesCommand.java +++ b/src/main/java/com/minelittlepony/unicopia/command/SpeciesCommand.java @@ -13,6 +13,7 @@ import net.minecraft.server.command.ServerCommandSource; import net.minecraft.text.MutableText; import net.minecraft.text.Text; import net.minecraft.util.Formatting; +import net.minecraft.util.Identifier; import net.minecraft.world.GameRules; class SpeciesCommand { @@ -101,11 +102,11 @@ class SpeciesCommand { } static int describe(PlayerEntity player, Race species) { - String name = species.getTranslationKey(); + Identifier id = Race.REGISTRY.getId(species); - player.sendMessage(Text.translatable(String.format("commands.race.describe.%s.1", name)).styled(s -> s.withColor(Formatting.YELLOW)), false); - player.sendMessage(Text.translatable(String.format("commands.race.describe.%s.2", name)), false); - player.sendMessage(Text.translatable(String.format("commands.race.describe.%s.3", name)).styled(s -> s.withColor(Formatting.RED)), false); + player.sendMessage(Text.translatable(String.format("commands.race.describe.%s.%s.1", id.getNamespace(), id.getPath())).styled(s -> s.withColor(Formatting.YELLOW)), false); + player.sendMessage(Text.translatable(String.format("commands.race.describe.%s.%s.2", id.getNamespace(), id.getPath())), false); + player.sendMessage(Text.translatable(String.format("commands.race.describe.%s.%s.3", id.getNamespace(), id.getPath())).styled(s -> s.withColor(Formatting.RED)), false); return 0; }