-
Notifications
You must be signed in to change notification settings - Fork 17
Creating Custom Machines
Custom Machines jsons should be located in datapacks/(my_datapack)/data/(some_namespace)/machines/(my_machine).json
The machine name should be all lowercase with no spaces or any other characters than letters and numbers but you can use "_" or "/"
Each machines loaded in the game should have a different ID, in the example above the machine Id is : namespace:my_machine
You can put any number of machines under the same namespace or separate them.
You can also use subfolders like : datapacks/(my_datapack)/data/(some_namespace)/machines/tier1/(my_machine).json
so the machine ID will be namespace:tier1/my_machine
Just remember that all the machines jsons should be under the machines folder.^
The machine json has 2 mandatory properties and 5 optional properties.
Name
The name of the machine, not to be confused with the ID of the machine (which is the path to the machine json). It will be the name of both the machine item and the jei category for this machine recipes. It will also be displayed in The One Probe when the player is pointing the machine block. The specified name must be a string, any characters are allowed (as long as minecraft can parse it), it can also be a lang key or a Text Component to add more customization options.
//Raw string
"name": "My cool machine"
//Lang key
"name": "machine.example.cool"
//Text component
"name": {
"text": "My cool machine",
"color": "red"
}
Tooltips
A list of tooltips that will be displayed when the player cursor hover the machine item in a gui. The tooltips can be a raw string or a Text Component. Each tooltips of the list will be displayed in a new line.
//Raw string
"tooltips": "That machine is really cool"
//List of strings
"tooltips": ["That machine is really cool", "Try it and see"]
//Text component
"tooltips": {
"text": "That machine is really cool",
"color": "red"
}
//List of text components
"tooltips": [
{
"text": "That machine is really cool",
"color": "red"
},
{
"text": "Try it and see",
"bold": true
}
]
An empty template of a machine json with all it's properties.
{
"name": "",
"appearance": {},
"tooltips": [],
"components": [],
"gui": [],
"jei": [],
"catalysts": []
}
See a few examples of custom machines in the test datapack.
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