Upgrades
Create machine upgrades using Crafttweaker
Creating custom machine upgrade with Crafttweaker
//Create the upgrade builder and give it the item that will act as upgrade and the max amount of this upgrade that can be used in a machine.
mods.custommachinery.CMUpgradeBuilder.create(Item item)
//If maxAmount is not specified the default is 64.
mods.custommachinery.CMUpgradeBuilder.create(Item item, int maxAmount)
//Add a machine or a list of machines that will accept this upgrade,
//the machine ID must be "namespace:id" like "custommachinery:my_machine" if the json is located in (my_datapack)/data/custommachinery/machines/my_machine.json
.machine(String... machineID)
//You can add a custom tooltip to the machine upgrade item.
.tooltip(String... tooltips)
//Use component for more formatting options,
//See https://docs.blamejared.com/1.18/en/vanilla/api/text/Component
.tooltip(Component... tooltips)
//Add a modifier to this upgrade.
//See below for modifier syntax.
.modifier(CMRecipeModifierBuilder modifier)
//Finish (don't forget the semicolon ';')
.build();Making a modifier
Zenscript syntax
Example
Last updated