-
Notifications
You must be signed in to change notification settings - Fork 27
Fluid Element
The Fluid Elements are used to display the content of a Fluid Component in the Machine GUI.
A Fluid Element must be associated with a Fluid Component using the id property. It will display the fluid stored in the Fluid Component on the Machine GUI.
Fluid Elements are defined in json with "type": "custommachinery:fluid".
If the Fluid Element cannot find the Fluid Component (usually because of an error in the id) the Fluid Element will still be rendered but it will always be empty.
Beside the 3 mandatory properties (type/x/y) and the 3 optional properties (width/height/priority) the Fluid Element have 1 mandatory and 1 optional properties.
Description : A String value that will be used to find a Fluid Component with the same id in the machine.
Example : "id": "tank1" Will find the Fluid Component with id "tank1" and show it's fluid into the Machine Gui.
Description : The Fluid Element texture file to be rendered in the Machine GUI.
Default : custommachinery:textures/gui/base_fluid_storage.png The default fluid tank texture provided by Custom Machinery.
Example : "texture": "namespace:textures/my_tank_texture.png" The texture loader will use the file assets/namespace/textures/my_tank_texture.png as the tank texture.
Note : If a custom texture is provided the Fluid Element width and height properties will be adjusted automatically but the size and the position of the fluid rendered inside the tank cannot be changed.
A basic Fluid Element linked to a Fluid Component using the id "tank1" and using the default texture :
{
"type": "custommachinery:fluid",
"x": 20,
"y": 20,
"id": "tank1"
}Result :

(Here the Fluid Component contains 4000mB of Water)
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