-
Notifications
You must be signed in to change notification settings - Fork 17
Machine GUI
The Machine GUI is the main tool to interact with the machine in-world. It will be used to display the current status of the machine as well as the differents components and their contents.
A machine GUI is not mandatory, if you don't want it just don't put it in the machine json.
A Machine GUI is composed of various GUI Elements, there is no limit of how many elements you can put.
The Machine GUI and it's Elements must be defined as such in the machine json :
"gui": [
{
"type": "my_element_1"
},
{
"type": "my_element_2"
}
]
Each Elements have various properties but all Elements have 3 common mandatory and 3 common optional properties :
Description : The Element registry name (see each element page).
Example : "type": "the_element_type"
Description : An integer value that define the x axis position of the element to be displayed on the Machine GUI.
Example : "x": _number_
Description : An integer value that define the y axis position of the element to be displayed on the Machine GUI.
Example : "y": _number_
Description : An integer value that define the width of the element on the Machine GUI.
Default : Most Elements have a texture, the default width will be the width of the Element texture.
Example : "width": 100
Description : An integer value that define the height of the element on the Machine GUI.
Default : Most Elements have a texture, the default height will be the height of the Element texture.
Example : "height": 100
Description : An integer property thet 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 : "priority": 1000
This Element will be rendered under each element that have a priority lower than 1000.
The Machine GUI is by default (and for now it can't be changed) 256px wide and 192px high.
This mean that the x property cannot be higher than 256 and the y property cannot be higher than 192.
Minecraft GUI (including the Custom Machine GUI) are rendered in 2 dimensions Axis X/Y.
X axis is the horizontal axis with 0 at the left of the screen and going to the right.
Y axis is the vertical axis with 0 at the top (no that is not an error) of the screen and going to the bottom.
I repeat because this is a very weird concept but the origin point in minecraft GUI coordinates is at the top left of the screen, not the bottom left but really the top left !!! And the Y axis is inversed so the positives values are going to the bottom of the screen.
To illustrate this concept here is an image :
(The "stage" white square is your screen)
3. Machine GUI
- Dump Element
- Energy Element
- Fluid Element
- Fuel Element
- Player Inventory Element
- Progress Bar Element
- Reset Element
- Slot Element
- Status Element
- Text Element
- Texture Element
5. Catalysts
- Biome Requirement
- Block Requirement
- Command Requirement
- Dimension Requirement
- Drop Requirement
- Durability Requirement
- Effect Requirement
- Energy Requirement
- Energy Per Tick Requirement
- Entity Requirement
- Fluid Requirement
- Fluid Per Tick Requirement
- Fuel Requirement
- Item Requirement
- Light Requirement
- Loot Table Requirement
- Position Requirement
- Structure Requirement
- Redstone Requirement
- Time Requirement
- Weather Requirement