-
Notifications
You must be signed in to change notification settings - Fork 17
Energy Element
The Energy Gui Element is used to display the content of an Energy Component present in the machine.
Energy Elements are defined in json with : "type": "custommachinery:energy"
.
Note that if you didn't set an Energy Component in the machine json the Energy Element will still work but will always show a value of 0FE.
Beside the 3 mandatory properties (type/x/y) and the 3 optional properties (width/height/priority) the Energy Element have 2 optional property.
Description : Point to a texture to use as the empty element texture. The texture must be loaded in-game with a resource pack or a loader mod.
Default : "custommachinery:textures/gui/base_energy_storage_empty"
The default energy gui element empty texture.
Example : "emptytexture": "namespace:textures/energy_element_texture_empty.png"
The element will search for a texture located in assets/namespace/textures/energy_element_texture_empty.png
. The .png extension is mandatory.
Note : The texture can be any size, if the texture size is different from the default size the width
and height
properties of the element will be automatically changed to fit the texture size if not provided.
If the width
and/or height
properties of the element are provided, the texture will be stretched to fit the dimensions of the element (it can render weirdly in that case).
Description : Point to a texture to use as the filled element texture. The texture must be loaded in-game with a resource pack or a loader mod.
Default : "custommachinery:textures/gui/base_energy_storage_filled"
The default energy gui element filled texture.
Example : "filledtexture": "namespace:textures/energy_element_texture_filled.png"
The element will search for a texture located in assets/namespace/textures/energy_element_texture_filled.png
. The .png extension is mandatory.
Note : The filled texture will be rendered on top on the empty texture, how much the filled texture overlap the empty texture is relative to the amount of energy inside the energy component.
A typical Energy GUI Element :
{
"type": "custommachinery:energy",
"x": 20,
"y": 20
}
Result :
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