Upgrades
Make an existing item capable of modifying recipe requirements
Machine upgrades are items that can be used to change the behaviors of a custom machine recipe while it's processing.
You can change the properties of almost every requirements, for example make a machine consume 2x more FE but also half the processing time.
You can define any item registered in the game as machine upgrade.
The defined item will works as a machine upgrade only if placed in an item component slot with variant property set to upgrade. See Item Component variant property for more info.
The machine upgrade must be defined in a json file placed in a datapack, such as machines and recipes json.
The path of the machine upgrade json file must be : [datapack_name]/data/[namespace]/upgrades/my_upgrade.json
You can use whatever you want as [datapackname] but [namespace] and json file name must be all lowercase without spaces or special characters except _
Properties
The upgrade json has 3 mandatory properties and 2 optional properties.
Mandatory properties
Optional properties
Example
The machine upgrade json below make a vanilla diamond item half the recipe duration in the Custom Machinery Power Crusher included in the test datapack.
{
"item": "minecraft:diamond",
"machines": ["custommachinery:power_crusher"],
"modifiers": [
{
"requirement": "custommachinery:speed",
"mode": "input",
"operation": "multiplication",
"modifier": 0.5
}
]
}Last updated