TranslatableEntry

interface TranslatableEntry : Translatable, EntryKeyed

A Translatable object that uses it's EntryKeyed key to build the translation/description/prefix keys.

Author

fzzyhmstrs

Since

0.6.0

Inheritors

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun description(fallback: String?): MutableText

The translated Text description from the descriptionKey. Falls back to an empty string so no tooltip is rendered.

Link copied to clipboard
open override fun descriptionKey(): String

translation key of this Translatable description. the "description" in-game, the descriptions Enchantment Descriptions adds to enchantment tooltips are a good example.

Link copied to clipboard
open fun descriptionOrNull(fallback: String? = null): MutableText?

The translated Text description from the descriptionKey. Falls back to an empty string so no tooltip is rendered. If no translation exists when called returns null.

Link copied to clipboard
open override fun getEntryKey(): String
Link copied to clipboard

Whether this Translatable has a valid description

Link copied to clipboard
open fun hasPrefix(): Boolean

Whether this Translatable has a valid prefix

Link copied to clipboard

Whether this Translatable has a valid translation

Link copied to clipboard
open override fun prefix(fallback: String?): MutableText

The translated Text description from the descriptionKey. Falls back to an empty string so no tooltip is rendered.

Link copied to clipboard
open override fun prefixKey(): String

translation key of this Translatable inline prefix text. Unlike descriptions, which are usually displayed in-tooltips, prefixes are displayed inline in the config screen itself

Link copied to clipboard
open fun prefixOrNull(fallback: String? = null): MutableText?

The translated Text description from the descriptionKey. Falls back to an empty string so no tooltip is rendered. If no translation exists when called returns null.

Link copied to clipboard
open override fun setEntryKey(key: String)
Link copied to clipboard
open override fun translation(fallback: String?): MutableText

The translated Text name from the translationKey. Falls back to the implementing classes Simple Name (non-translated)

Link copied to clipboard
open override fun translationKey(): String

translation key of this Translatable. the "name" in-game

Link copied to clipboard
open fun translationOrNull(fallback: String? = null): MutableText?

The translated Text name from the translationKey. Falls back to the implementing classes Simple Name (non-translated). If no translation exists when called returns null.