Class TranslationUtils
java.lang.Object
fr.pacdu.pacpackquests.client.util.TranslationUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic StringgetModName(String namespace) Resolves human-readable mod name for a given namespace.static net.minecraft.network.chat.ComponentgetRewardText(QuestReward reward, boolean isClaimed) Formats the visual display text of a reward with appropriate styling and color.static intgetTagSize(net.minecraft.resources.ResourceLocation tagId, RegistryType type) Returns the number of elements contained in a tag for any given RegistryType.static StringgetTranslatedName(String entryId, RegistryType type) Translate an id (e.g.static StringgetTranslatedName(String entryId, RegistryType type, boolean isReward) static StringgetTranslatedRewardName(String entryId, RegistryType type) Translate an id specifically for a reward into a readable name (e.g.
-
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
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
Translate an id specifically for a reward into a readable name (e.g. "Random Logs" instead of "Any Logs"). -
getTranslatedName
-
formatDisplayString
-
getModName
Resolves human-readable mod name for a given namespace. -
getTagSize
Returns the number of elements contained in a tag for any given RegistryType.
-