Toggle Config
Add a default toggle side config for any component
Some components have a config property that you can define in the machine json.
Unlike the I/O config, the toggle config only support 2 states per sides : enabled and disabled .
Supported components :
Side modes
You can configure the toggle mode of a specific component for each sides of the machine.
Available sides are : top, bottom, front, back, right, left
You can also use default to configure each sides that aren't specified.
Available I/O modes :
enableddisabled
Disabling gui config
By default any player can change the side mode of a component by using the config button (only if a config gui element is present in the machine GUI).
You can prevent player to config a specific component by adding in the config :
"enabled": falseColor
By default when the config button is clicked, all configurable slots will turn blue. This can be changed using color property.
Color property support various formats, pick one of these :
//Full json object, values between 0 and 1
"color": {
"alpha": 0.5,
"red": 1,
"green": 0,
"blue": 0
}
//Array of color, the order is alpha, red, green, blue. Values between 0 and 1
"color": [0.5, 1, 0, 0]
//ARGB 32bit integer
"color": 2147418112
//Minecraft color names, only support a few colors listed here : https://minecraft.fandom.com/wiki/Formatting_codes
"color": "red"Example of a config gui with a few colored slots.

Example :
A component config that has the following properties :
Enable the left and right sides.
Disable all other sides.
The config can't be modified by the player with the gui config button.
{
"type": "custommachinery:heat",
"config": {
"default": "disabled",
"right": "enabled",
"left": "enabled",
"enabled": false
}
}All sides are optional.
default will act for all sides that are not specified.
If default is not specified enabled mode will be used.
Last updated