Text element
Add text in the machine gui.
Text element is used to render a text on the Machine GUI.
Text elements are defined in json with : "type": "custommachinery:text".
The text must be a single text component and can't have multiple lines (use multiple text elements for that).
You can change the size of text using width and height property.
By default all text gui elements are hidden in jei, to make them show up see the "jei" property below.
Properties
The text element has 4 mandatory properties and 7 optional properties :
Mandatory properties
"type": "custommachinery:text" //Mandatory to define a text element.Text
Name : text
textDescription :
A text component to be rendered on the GUI.
Example :
A simple line of text :
"text": "An Awesome Title For My Machine GUI !"Adding some style options :
"text": {"text": "Red and bold text", "color": "red", "bold": true}Optional properties
Priority
Name : priority
priorityDescription :
An integer property that define the priority of the Element to be rendered.
Elements with higher priority will be rendered first. If 2 elements are at the same position the first to be rendered will be under and the last will be above.
Default : 0
Example :
The element will be rendered under each element that have a priority lower than 1000.
Tooltips
Name : tooltips
tooltipsDescription :
A list of Text components that will be shown as tooltips when the player mouse cursor hover the element.
Each tooltips of the list will be a new line.
Example :
Replace the default tooltips with a single line that say "Click me !" :
Tooltips
Name : tooltips
tooltipsDescription :
A list of Text components that will be shown as tooltips when the player mouse cursor hover the element.
Each tooltips of the list will be a new line.
Example :
Replace the default tooltips with a single line that say "Click me !" :
Example
A basic text element :
Result :

Last updated