Class TranslationUtils

java.lang.Object
fr.pacdu.pacpackquests.client.util.TranslationUtils

public class TranslationUtils extends Object
  • Method Details

    • getRewardText

      public static net.minecraft.network.chat.Component getRewardText(QuestReward reward, boolean isClaimed)
      Formats the visual display text of a reward with appropriate styling and color.
    • getTranslatedName

      public static String getTranslatedName(String entryId, RegistryType type)
      Translate an id (e.g. "minecraft:stone", "#minecraft:logs", or item with components) into a readable name.
      Parameters:
      entryId - a valid ID or tag.
      type - the taskType of the ID corresponding to a Minecraft Registry.
    • getTranslatedRewardName

      public static String getTranslatedRewardName(String entryId, RegistryType type)
      Translate an id specifically for a reward into a readable name (e.g. "Random Logs" instead of "Any Logs").
    • getTranslatedName

      public static String getTranslatedName(String entryId, RegistryType type, boolean isReward)
    • formatDisplayString

      public static String formatDisplayString(String raw)
    • getModName

      public static String getModName(String namespace)
      Resolves human-readable mod name for a given namespace.
    • getTagSize

      public static int getTagSize(net.minecraft.resources.ResourceLocation tagId, RegistryType type)
      Returns the number of elements contained in a tag for any given RegistryType.