-
Notifications
You must be signed in to change notification settings - Fork 2
List of TooltipFactories
B0IIZZ edited this page Oct 23, 2021
·
7 revisions
This is a List of valid text generators (so-called TooltipFactories) of this mod.
- Its just nothing
-
Fields:
"text"
- Behaves like the short form
""
.
-
Fields:
"key"
(Required)"arguments"
(Optional: default isempty
) - Returns a text translated to the current language of the given translation
"key"
, which are i. e. defined in theassets/minecraft/lang/en_us.json
. Many translations have arguments which can be filled in (i. e. book.pageIndicator), which can be provided by the TooltipFactory"arguments"
giving one argument on each separate line
-
Fields:
"text"
(Required)"bold"
"italic"
"strikethrough"
"underline"
"obfuscated"
"centered"
(All Optional: default false)"color"
(Optional: no default value) - Formats the given TooltipFactory
text
according to the given format specifications. Please note that thecentered
parameter just centers the lines in relation to each other not to the whole tooltip itself
-
Fields:
"condition"
"success"
"fail"
- Gives either the same output as the TooltipFactory
success
if the TooltipConditioncondition
is met or else the same output as the TooltipFactoryfail
-
Fields:
"text"
"length"
- Limits each line of the given TooltipFactory
text
to at most containlength
characters.
-
Fields:
"text"
"limit"
- Limits the given TooltipFactory
text
to at most havelimit
lines.
-
Fields:
"texts"
- Behaves like the short form
[]
-
Fields:
"texts"
(Required)"separate_lines"
(Optional: default true) - Behaves almost like
"multiple"
but instead appends the given TooltipFactoriestexts
on the same line. The additional parameter"separate_lines"
is used to control whether everything is squished on one line or if it should match lines for each of the TooltipFactories:
lineA1 lineA2 lineB1 lineB2
or
lineA1 lineB1
lineA2 lineB2
-
Fields:
"rawId"
"duration"
(Both Required)"strength"
(Optional: no default value) - For each of the lines of the TooltipFactories
rawId
,duration
andstrength
a potion effect tooltip is generated based on the given information on each line
A NbtPath is a way of specifying a path to the Nbt data of interest. The format is as follows:
- children of a parent compound are specified after a
.
(compound.child
) - elements of an array can be selected between
[]
([123]
) - to select all elements of an array omit a number between the
[]
([]
) - when multiple elements are selected, the are mostly treated individually by the TooltipFactories and put on separate lines.
-
Fields:
"tag"
(Required)"go_into_compounds"
"go_into_lists"
"colored"
(All Optional: default false) - Just returns the element at the specified
tag
. If the element is a compoundgo_into_compounds
decides if it prints the whole compound of just writes{...}
.go_into_lists
decides the same for lists and[...]
. ifcolored
is true, all values will be colored yellow while all keys are colored gray.
-
Fields:
"tag"
- Returns the size of the elements present at
tag
(length of lists, number of children for compounds, 1 for all non-null primitive values or else 0)
-
Fields:
"tag"
- Returns the JSON-Text specified at the given
tag
-
Fields:
"tag"
"text"
- All the paths of Nbt-related TooltipFactories inside of
text
will now be relative totag
. This is useful when extracting multiple things from a single Nbt-element inside of lists.