{ "section": "CraftTweaker/Terminal", "title": "CraftTweaker of Terminal", "stream": [ { "type": "textbox", "content": [ "Content:" ] }, { "type": "textbox", "content": [ "§1§lURL:§r§n https://github.com/Gregicality/GregTech/wiki/CraftTweaker-of-Terminal" ] }, { "type": "textbox", "ref": "api", "isShadow": false, "content": [ "§4§lAPI:" ] }, { "type": "textbox", "fontSize": 9, "content": [ "1. §1registerDevice(deviceItemStack, deviceName)§0:\nRegister the custon device.\n\n2. §1createAppRegistryBuilder(appName):\n§0Create the registryBuilder according to the app name (found in the store app).\n\n3. §1isDefaultApp(default):\n§0Make it as a default app.\n\n4. §1battery(euTier, cost):\n§0Set battery requirements for all tier.\n\n5. §1battery(appTier, euTier, cost):\n§0Set battery requirements for the specific tier.\n\n6. §1device(deviceName...):\n§0Set device requirements for all tier. (available by default: \"scanner\", \"wireless\", \"camera\", \"solar_lv\").\n\n7. §1device(appTier, device...):\n§0Set device requirements for the specific tier.\n\n8. §1upgrade(upgradeItemStack...):\n§0Set upgrade requirements for all tier.\n\n9. §1upgrade(appTier, upgradeItemStack...):\n§0Set upgrade requirements for the specific tier.\n\n10. §1build():\n§0finish and register." ] }, { "type": "textbox", "ref": "demo", "space": 1, "content": [ "\n§4§lZS Demo:" ] }, { "type": "textbox", "fill": -912478525, "fontSize": 9, "content": [ "import mods.gregtech.TerminalRegistry;\n\nTerminalRegistry.registerDevice(\u003core:ingotIron\u003e.firstItem, \"ingot_iron\");\n\nTerminalRegistry.createAppRegistryBuilder(\"ore_prospector\")\n .isDefaultApp(true)\n .battery(1, 500)\n .battery(3, 3, 1000)\n .device(\"camera\", \"wireless\")\n .device(4, \"ingot_iron\")\n .upgrade(\u003cminecraft:apple\u003e * 9)\n .upgrade(2, \u003cminecraft:apple\u003e * 9, \u003cminecraft:grass\u003e * 12)\n .build();" ] }, { "type": "textbox", "fontSize": 9, "content": [ "§4§lResult:\n§rCustom Device" ] }, { "type": "image", "form": "url", "source": "https://user-images.githubusercontent.com/18493855/140280593-37922838-4a20-4e1b-9be9-73935c4c8c13.png", "width": 190, "height": 120 }, { "type": "textbox", "content": [ "Register Battery, Device, and Upgrade" ] }, { "type": "image", "form": "url", "source": "https://user-images.githubusercontent.com/18493855/140280587-84dc8f67-6dde-472f-9ed8-6a4c5e71abc4.png", "width": 190, "height": 120 }, { "type": "image", "form": "url", "source": "https://user-images.githubusercontent.com/18493855/140280590-d4700a88-5780-4e0f-95f8-130e82f4634a.png", "width": 190, "height": 120 } ], "fixed": [ { "type": "textbox", "x": 49, "y": 40, "width": 16, "height": 10, "link": "api", "content": [ "§9§napi" ] }, { "type": "textbox", "x": 67, "y": 40, "width": 25, "height": 10, "link": "demo", "content": [ "§9§ndemo" ] } ] }