CraftTweaker for Terminal - GregTechCEu/GregTech GitHub Wiki
API:
registerDevice(deviceItemStack, deviceName)
: Register the custom device.createAppRegistryBuilder(appName)
: Create the registryBuilder according to the app name.isDefaultApp(default)
: Make it as a default app.battery(euTier, cost)
: Set battery requirements for all tier.battery(appTier, euTier, cost)
: Set battery requirements for the specific tier.device(deviceName...)
: Set device requirements for all tier. (available by default:"scanner"
,"wireless"
,"camera"
,"solar_lv"
)device(appTier, device...)
: Set device requirements for the specific tier.upgrade(upgradeItemStack...)
: Set upgrade requirements for all tier.upgrade(appTier, upgradeItemStack...)
: Set upgrade requirements for the specific tier.build()
: finish and register.
ZS Demo:
import mods.gregtech.TerminalRegistry;
TerminalRegistry.registerDevice(<ore:ingotIron>.firstItem, "ingot_iron");
TerminalRegistry.createAppRegistryBuilder("ore_prospector")
.isDefaultApp(true)
.battery(1, 500)
.battery(3, 3, 1000)
.device("camera", "wireless")
.device(4, "ingot_iron")
.upgrade(<minecraft:apple> * 9)
.upgrade(2, <minecraft:apple> * 9, <minecraft:grass> * 12)
.build();
Result:
Custom Device
Register Battery, Device, and Upgrade