### Create Datapack Tags Examples Source: https://context7.com/creators-of-create/wiki/llms.txt Examples of JSON files used for Create datapack tags. These tags modify block, item, and fluid behaviors within the game. ```json // Example: data/create/tags/blocks/non_movable.json // Prevent a block from being moved by contraptions { "values": ["mymod:immovable_machine"] } ``` ```json // data/create/tags/blocks/windmill_sails.json // Make a custom block count as a windmill sail (like Wool) { "values": ["mymod:decorative_sail"] ``` ```json // data/create/tags/items/blaze_burner_fuel/special.json // Make a custom item superheat a Blaze Burner (like Blaze Cakes) { "values": ["mymod:super_coal"] ``` ```json // data/create/tags/fluids/bottomless/allow.json // Allow infinite draining of a custom fluid via Hose Pulley (allowlist mode) { "values": ["mymod:infinite_water_variant"] ``` ```json // data/create/tags/blocks/fan_processing_catalysts/splashing.json // Register a custom block as a splashing catalyst for Encased Fan processing { "values": ["mymod:custom_water_source"] ``` -------------------------------- ### Get Item Detail Example Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/package-object.md Retrieves detailed information about an item in a specific slot of the package. This includes basic item properties and additional details like display name and durability. ```lua { name = "minecraft:apple", itemGroups = {}, tags = {}, count = 1, maxCount = 64, displayName = "Apple", } ``` -------------------------------- ### Basic Filtered Request Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/stock-ticker.md A simple example demonstrating how to request up to 10 items with a specific name. ```lua .requestfiltered("address", {name = "apple", _requestCount = 10}) ``` -------------------------------- ### Get Order Data Example Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/package-object.md Retrieves the orderData object associated with an encoded package. This object contains methods to access order-specific information. ```lua { getCrafts(), -- function: 52d1c058 getIndex(), -- function: 1f03a979 getItemDetail(), -- function: 4782ee89 getLinkIndex(), -- function: 3dfc0241 getOrderID(), -- function: 625c4b8e isFinal(), -- function: 4953530c isFinalLink(), -- function: 19750a09 list(), -- function: 4446fd6c } ``` -------------------------------- ### List Package Items Example Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/package-object.md Lists all items within the package, returning a table where each entry represents an item in a slot. Basic information like name and count is provided. ```lua { { name = "minecraft:apple", count = 1, }, { name = "minecraft:stick", count = 1, }, { nbt = "ce5c752cf2df5cf4ffb17d7b7bfacad7", count = 1, name = "minecraft:enchanted_book", }, } ``` -------------------------------- ### List Inventory Items Example Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/packager.md Lists all items in the connected inventory, returning a sparse table where each entry represents an item in a slot. Use pairs to iterate effectively. ```lua { { name = "minecraft:apple", count = 1, }, { name = "minecraft:stick", count = 1, }, [ 10 ] = { nbt = "ce5c752cf2df5cf4ffb17d7b7bfacad7", count = 1, name = "minecraft:enchanted_book", }, } ``` -------------------------------- ### Train Schedule Libraries (trainlib) Source: https://context7.com/creators-of-create/wiki/llms.txt Use the trainlib Lua library to simplify schedule construction for stations. This example shows setting up a cyclic schedule with conditions for player count. ```lua -- ── trainlib (pseudo-OOP) ────────────────────────────────────────────────── -- https://github.com/scmcgowen/trainlib local tl = require("trainlib") local schedule = tl.schedule(true) -- cyclic local board = tl.condition_set_or():addCondition(tl.conditions.player_count(1, false)) local allaboard = tl.condition_set_or():addCondition(tl.conditions.player_count(0, true)) schedule :addEntry(tl.entry(tl.instructions.destination("Station A"), board)) :addEntry(tl.entry(tl.instructions.destination("Station B"), allaboard)) station.setSchedule(schedule) ``` -------------------------------- ### getSize() Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/display-link.md Gets the size of the connected display target. ```APIDOC ## getSize() ### Description Gets the size of the connected display target. ### Returns - **height** (number) - The height of the display. - **width** (number) - The width of the display. ``` -------------------------------- ### Train Schedule Libraries (Scheduler) Source: https://context7.com/creators-of-create/wiki/llms.txt Use the Scheduler Lua library for a fluent builder pattern to construct train schedules. This example sets destinations with wait times and power conditions. ```lua -- ── Scheduler (fluent builder) ───────────────────────────────────────────── -- https://github.com/tizu69/cclibs/tree/main/scheduler local Scheduler = require("scheduler") station.setSchedule( Scheduler.new(true) :to("Station A") :wait(5):powered() :OR():time(14, 0, "daily") :to("Station B") :wait(1) ) ``` -------------------------------- ### Train Schedule Libraries (Create Scheduler DSL) Source: https://context7.com/creators-of-create/wiki/llms.txt Use the Create Scheduler DSL, a custom string-based language, to define train schedules. This example defines a cyclic schedule with wait times and specific times. ```lua -- ── Create Scheduler DSL ─────────────────────────────────────────────────── -- https://gist.github.com/MCJack123/94071c7724045dc048777395afc04eb1 local mksched = require("create-scheduler") station.setSchedule(mksched([[ cyclic to "Station A" { wait 5m, powered time = 14:00 daily } to "Station B" { wait 1m } ]])) ``` -------------------------------- ### Re-Packager Methods Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/repackager.md Provides methods to interact with the Re-Packager's functionality, such as getting its address, inspecting items, managing packages, and listing inventory. ```APIDOC ## getAddress() ### Description Gets the Re-Packager's address. ### Method `getAddress()` ### Returns - `string` With the address currently in use. --- ``` ```APIDOC ## getItemDetail(slot) ### Description Gets detailed information about an item in an attached inventory's given slot. ### Method `getItemDetail(slot)` ### Parameters #### Path Parameters - **slot** (number) - Required - The slot to get information about. ### Returns - `table?` Information about the item in this slot, or `nil` if it is empty. ### Throws - If the slot is out of range. --- ``` ```APIDOC ## getPackage() ### Description Gets the package object of the currently held package. ### Method `getPackage()` ### Returns - `table` of a package object or `nil` if there is none. --- ``` ```APIDOC ## list() ### Description Lists all items in the connected inventory. ### Method `list()` ### Returns - `table` with basic item information. --- ``` ```APIDOC ## makePackage() ### Description Activates the re-packager to make a package. ### Method `makePackage()` ### Returns - `boolean` whether a new package was made successfully. --- ``` ```APIDOC ## setAddress([address]) ### Description Sets the Re-Packager's address. ### Method `setAddress([address])` ### Parameters #### Path Parameters - **address** (string = nil) - Optional - Force every package to be addressed to `address`. Goes back to default if address is `nil`. ### Warning Repackagers only force-assign their address to non-encoded packages. --- ``` -------------------------------- ### Get Crafting Recipes Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/order-data-object.md Retrieves a list of crafting recipes associated with the order. Each recipe includes the count and the required items for a 3x3 grid. ```lua { { count = 5, -- Number of times this recipe needs to be crafted recipe = { -- Corresponds to crafting grid "minecraft:iron_nugget", "minecraft:iron_nugget", "minecraft:iron_nugget", "minecraft:iron_nugget", "create:cogwheel", "minecraft:iron_nugget", "minecraft:iron_nugget", "minecraft:iron_nugget", "minecraft:iron_nugget" } }, { count = 10, recipe = { nil, "minecraft:redstone_torch", nil, nil, "minecraft:iron_ingot", nil, nil, "minecraft:glass_pane", nil } } } ``` -------------------------------- ### Remap Create Mixin Refmap Source: https://github.com/creators-of-create/wiki/blob/main/src/developers/depend-on-create/forge-1.20.1.md Add these properties to each Minecraft run configuration block in your build.gradle file to resolve errors when starting Minecraft from your development environment after adding a dependency on Create. ```groovy property("mixin.env.remapRefMap", "true") property("mixin.env.refMapRemappingFile", "${projectDir}/build/createSrgToMcp/output.srg") ``` ```groovy minecraft { runs { client { property("mixin.env.remapRefMap", "true") property("mixin.env.refMapRemappingFile", "${projectDir}/build/createSrgToMcp/output.srg") } } } ``` -------------------------------- ### getCursorPos() Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/display-link.md Gets the current cursor position. ```APIDOC ## getCursorPos() ### Description Gets the current cursor position. ### Returns - **x** (number) - The cursor x position. - **y** (number) - The cursor y position. ``` -------------------------------- ### getAddress Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/packager.md Gets the Packager's current address. ```APIDOC ## getAddress() ### Description Gets the Packager's address. ### Returns - `string` With the address currently in use. ``` -------------------------------- ### stock([detailed]) Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/stock-ticker.md Lists all items in the stock. Returns a table with an entry for each item. The returned table is never sparse, so you can iterate over it with `ipairs`. ```APIDOC ## stock([detailed]) ### Description Lists all items in the stock. This returns a table, with an entry for each item. Each item in the inventory is represented by a table containing some basic information (or detailed information if `detailed = true`). The returned table is never sparse, so you can iterate over it with [`ipairs`](https://www.lua.org/manual/5.1/manual.html#pdf-ipairs) just fine. ### Parameters #### Query Parameters - **detailed** (boolean) - Optional - Whether the item information should be detailed. Defaults to `false`. ### Returns - `table` with basic item information or detailed item information if `detailed` is true. #### Basic Item Information Example ```lua { { name = "minecraft:apple", count = 1, }, { nbt = "ce5c752cf2df5cf4ffb17d7b7bfacad7", count = 1, name = "minecraft:enchanted_book", }, } ``` #### Detailed Item Information Example ```lua { { name = "minecraft:stick", itemGroups = {}, tags = { [ "forge:rods/wooden" ] = true, [ "forge:rods" ] = true, }, count = 1, maxCount = 64, displayName = "Stick", }, { enchantments = { { level = 1, name = "minecraft:unbreaking", displayName = "Unbreaking I", }, }, tags = { [ "minecraft:bookshelf_books" ] = true, }, name = "minecraft:enchanted_book", itemGroups = {}, maxCount = 1, count = 1, nbt = "ce5c752cf2df5cf4ffb17d7b7bfacad7", displayName = "Enchanted Book", }, } ``` ``` -------------------------------- ### Add Create Dependencies (NeoForge 1.21.1) Source: https://context7.com/creators-of-create/wiki/llms.txt Configure Gradle properties, repositories, and dependencies to include Create, Ponder, Flywheel, and Registrate for a NeoForge mod. Also includes the production dependency declaration for `neoforge.mods.toml`. ```groovy // gradle.properties minecraft_version = 1.21.1 create_version = 6.0.10-280 ponder_version = 1.0.82 flywheel_version = 1.0.6 registrate_version = MC1.21-1.3.0+67 // build.gradle repositories { maven { url = "https://maven.createmod.net" } // Create, Ponder, Flywheel maven { url = "https://maven.ithundxr.dev/snapshots" } // Registrate } dependencies { implementation("com.simibubi.create:create-${minecraft_version}:${create_version}:slim") { transitive = false } implementation("net.createmod.ponder:ponder-neoforge:${ponder_version}+mc${minecraft_version}") compileOnly("dev.engine-room.flywheel:flywheel-neoforge-api-${minecraft_version}:${flywheel_version}") runtimeOnly("dev.engine-room.flywheel:flywheel-neoforge-${minecraft_version}:${flywheel_version}") implementation("com.tterrag.registrate:Registrate:${registrate_version}") } // neoforge.mods.toml — production dependency [[dependencies.your_mod_id]] modId = "create" type = "required" versionRange = "[6.0.10,6.1.0)" ordering = "NONE" side = "BOTH" ``` -------------------------------- ### getSignalType Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/train/train-signal.md Gets the current signal type of the train signal. ```APIDOC ## getSignalType() ### Description Gets the train signal's signal type (Normally toggled with a wrench) as how the trains see it. ### Returns - `string` The signal type - either "ENTRY_SIGNAL" or "CROSS_SIGNAL". ``` -------------------------------- ### isExtended() Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/sticker.md Gets the sticker's state to determine if it is currently extended. ```APIDOC ## isExtended() ### Description Checks if the sticker is extended. ### Returns - `boolean` The state of the sticker, `true` if it's extended. ``` -------------------------------- ### Write Text to Create Display Link Source: https://context7.com/creators-of-create/wiki/llms.txt Use this to write text to Create Display Link targets. Ensure to call `update()` after making changes. Requires the peripheral to be found. ```lua local display = peripheral.find("Create_DisplayLink") if not display then error("No Display Link found") end local h, w = display.getSize() print(string.format("Display size: %d x %d", w, h)) -- Clear and write a two-line message display.clear() display.setCursorPos(1, 1) display.write("Hello, Create!") display.setCursorPos(1, 2) display.write("Speed: 128 RPM") display.update() -- Must call update() to push changes to the display -- Append bytes (raw character codes) display.setCursorPos(1, 3) display.writeBytes(72) -- 'H' display.update() ``` -------------------------------- ### getGeneratedSpeed Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/creative-motor.md Gets the creative motor's current generated speed. ```APIDOC ## getGeneratedSpeed() ### Description Gets the creative motor's current generated speed. ### Returns #### Success Response (200) - **number** - The current generated rotation speed in RPM. ``` -------------------------------- ### Make Package Function Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/packager.md Activates the packager to create a package, similar to redstone power. Returns a boolean indicating success. ```lua return true ``` -------------------------------- ### getState Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/train/train-signal.md Gets the train signal's currently displayed signal state. ```APIDOC ## getState() ### Description Gets the train signal's currently displayed signal, as how the trains see it. ### Returns - `string` The color of the signal currently displayed - either "RED", "GREEN" or "YELLOW" (Only on CROSS_SIGNAL types). ``` -------------------------------- ### getPassingTrainName Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/train/train-observer.md Gets the name of a train within the train observer's range. ```APIDOC ## getPassingTrainName() ### Description Gets the name of a train within the train observer's range. ### Returns - `string` The name of the train detected, or `nil` if none is found. ``` -------------------------------- ### Manage Packages with Packager (Lua) Source: https://context7.com/creators-of-create/wiki/llms.txt Programmatically create packages, inspect connected inventories, and handle package creation events using a Create mod Packager. Allows setting delivery addresses and dynamically redirecting packages. Requires a 'Create_Packager' peripheral. ```lua local packager = peripheral.find("Create_Packager") if not packager then error("No Packager found") end -- Set a delivery address packager.setAddress("warehouse-A") print("Packager address: " .. packager.getAddress()) -- Inspect connected inventory for slot, item in pairs(packager.list()) do print(slot, item.name, item.count) end -- Get detail for slot 1 local detail = packager.getItemDetail(1) if detail then print("Slot 1: " .. detail.displayName .. " x" .. detail.count) end -- Trigger packaging (like a redstone pulse) local success = packager.makePackage() print("Package made: " .. tostring(success)) -- React to package creation and dynamically assign address while true do local event, pkg = os.pullEvent("package_created") if pkg.isEditable() then pkg.setAddress("express-lane") print("Redirected package to express-lane, items: " .. #pkg.list()) end end ``` -------------------------------- ### getItemDetail Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/packager.md Gets detailed information about an item in a specific slot of an attached inventory. ```APIDOC ## getItemDetail(slot) ### Description Get detailed information about an item in the connected inventory. The returned information contains the same information as each item in [`list`](#list), as well as additional details like the display name (`displayName`), and item durability (`damage`, `maxDamage`, `durability`). Some items include more information (such as enchantments) - it is recommended to print it out using [`textutils.serialize`](https://tweaked.cc/module/textutils.html#v:serialize) or in the Lua REPL, to explore what is available. ### Parameters #### Path Parameters - **slot** (number) - Required - The slot to get information about. ### Throws - If the slot is out of range. ### Returns - `table?` Information about the item in this slot, or `nil` if it is empty, like: ```lua { name = "minecraft:apple", itemGroups = {}, tags = {}, count = 1, maxCount = 64, displayName = "Apple", } ``` ``` -------------------------------- ### makePackage Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/packager.md Activates the packager to create a package, similar to a redstone signal. ```APIDOC ## makePackage() ### Description Activates the packager like if it was powered by redstone. It operates by the same rule as a button press, but unlike a redstone signal, returns a value on if it actually succeeded at making a package. ### Returns - `boolean` whether a new package was made successfuly. ``` -------------------------------- ### List Order Items Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/order-data-object.md Lists basic information about all items in a complete order. Only valid for packages with a link index of 1. Returns nil if the package is not the first in a linked order. ```lua { { name = "minecraft:apple", count = 1, }, { nbt = "ce5c752cf2df5cf4ffb17d7b7bfacad7", count = 1, name = "minecraft:enchanted_book", }, } ``` -------------------------------- ### getTargetSpeed Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/rotational-speed-controller.md Gets the rotation speed controller's current target speed. ```APIDOC ## getTargetSpeed() ### Description Gets the rotation speed controller's current target speed. ### Returns #### Success Response - **number** - The current target rotation speed in RPM. ``` -------------------------------- ### Assign Schedule with trainlib Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/train/libraries.md Use trainlib to create a cyclic schedule that drives to 'Station 1', waits for players to mount, then drives to 'Station 2' and waits for them to dismount. Requires the trainlib library. ```lua local tl = require("trainlib") local schedule = tl.schedule(true) -- cyclic / looping! local conditions = tl.condition_set_or():addCondition(tl.conditions.player_count(1, false)) local conditions_destination = tl.condition_set_or():addCondition(tl.conditions.player_count(0, true)) schedule :addEntry(tl.entry(tl.instructions.destination("Station 1"), conditions)) :addEntry(tl.entry(tl.instructions.destination("Station 2"), conditions_destination)) station.setSchedule(schedule) ``` -------------------------------- ### getStockItemDetail(index) Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/stock-ticker.md Gets detailed information about an item in the stock's given index. ```APIDOC ## getStockItemDetail(index) ### Description Get detailed information about an item in the network stock. The returned information contains the same information as each item in [`list`](#list), as well as additional details like the display name (`displayName`), and item durability (`damage`, `maxDamage`, `durability`). Some items include more information (such as enchantments) - it is recommended to print it out using [`textutils.serialize`](https://tweaked.cc/module/textutils.html#v:serialize) or in the Lua REPL, to explore what is available. ::: tip Hint The order of indexes changes whenever the network gets reloaded, make sure to use [`stock`](#stock) to check what item to look for. You can also avoid using this function by using [`stock(true)`](#stock), which already includes the detailed information of all items. ::: ### Parameters #### Path Parameters - **index** (number) - Required - The index to get information from. ### Returns - `table` Information about the item in this slot, or `nil` if it is empty, like: ```lua { name = "minecraft:apple", itemGroups = {}, tags = {}, count = 1, maxCount = 64, displayName = "Apple", } ``` ``` -------------------------------- ### stock([detailed]) Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/stock-ticker.md Lists all items in the network. ```APIDOC ## stock([detailed]) ### Description Lists all items in the network. ### Parameters #### Query Parameters - **detailed** (boolean) - Optional - If true, returns detailed information about each item. ### Returns - `table` A list of items in the network. ``` -------------------------------- ### Get Redstone Requester Configuration Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/redstone-requester.md Retrieves the current operational mode of the Redstone Requester. ```APIDOC ## getConfiguration() ### Description Gets the Redstone Requester's configuration. ### Method GET (conceptual) ### Endpoint N/A (Lua API) ### Returns - `string`: Either `"allow_partial"` or `"strict"`. ``` -------------------------------- ### Set Table Cloth Wares and Price Tag Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/table-cloth.md Demonstrates how to configure a Table Cloth to act as a shop by setting its wares, price tag item, and price tag count. Ensure the peripheral exists before attempting to configure it. ```lua tableCloth = peripheral.find("Create_TableCloth") if tableCloth then -- makes sure the tablecloth exists, in case it was wrapped while it wasn't a store/inventory tableCloth.setWares( { name = "minecraft:diamond"}, -- defaults to 1 { name = "redstone", count = 30 } ) tableCloth.setPriceTagItem("gold_ingot") tableCloth.setPriceTagCount(2) end ``` -------------------------------- ### Get Order Data Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/package-object.md Retrieves the order data object associated with an encoded package. ```APIDOC ## getOrderData() ### Description Gets the `orderData` object of the package if it's an encoded package. ### Returns - `orderData` of the package, or `nil` if none is present, like: ```lua { getCrafts(), -- function: 52d1c058 getIndex(), -- function: 1f03a979 getItemDetail(), -- function: 4782ee89 getLinkIndex(), -- function: 3dfc0241 getOrderID(), -- function: 625c4b8e isFinal(), -- function: 4953530c isFinalLink(), -- function: 19750a09 list(), -- function: 4446fd6c } ``` ``` -------------------------------- ### list() Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/order-data-object.md Retrieves basic information about all items in the complete order, regardless of whether they are in the current package. This method is only valid for packages with a link index of 1. ```APIDOC ## list() ### Description Lists basic information about all items in the complete order, even if they are not in the package. The returned table is empty after re-packaging for individual crafts. **Only valid for packages with a link index of 1**. If the package is not the first in a linked order, this will return `nil`. Each item in the inventory is represented by a table containing basic information. More information can be fetched with [`getItemDetail`](#getItemDetail). The table contains the item `name`, the `count` and a (potentially `nil`) hash of the item's `nbt`. This NBT data doesn't contain anything useful, but allows you to distinguish identical items. The returned table is never sparse, so you can iterate over it with [`ipairs`](https://www.lua.org/manual/5.1/manual.html#pdf-ipairs) just fine. ### Returns - `table`: with basic item information, or `nil` if it's `linkIndex` isn't equal to `1`. ### Example Response ```lua { { name = "minecraft:apple", count = 1, }, { nbt = "ce5c752cf2df5cf4ffb17d7b7bfacad7", count = 1, name = "minecraft:enchanted_book", }, } ``` ``` -------------------------------- ### Gradle Build Script Dependencies (Kotlin) Source: https://github.com/creators-of-create/wiki/blob/main/src/developers/depend-on-create/neoforge-1.21.1.md Configure repositories and dependencies in your build.gradle.kts file for Create, Ponder, Flywheel, and Registrate. ```kotlin repositories { maven("https://maven.createmod.net") // Create, Ponder, Flywheel maven("https://maven.ithundxr.dev/snapshots") // Registrate } dependencies { implementation("com.simibubi.create:create-${property("minecraft_version")}:${property("create_version")}:slim") { isTransitive = false } implementation("net.createmod.ponder:ponder-neoforge:${property("ponder_version")}+mc${property("minecraft_version")}") compileOnly("dev.engine-room.flywheel:flywheel-neoforge-api-${property("minecraft_version")}:${property("flywheel_version")}") runtimeOnly("dev.engine-room.flywheel:flywheel-neoforge-${property("minecraft_version")}:${property("flywheel_version")}") implementation("com.tterrag.registrate:Registrate:${property("registrate_version")}") } ``` -------------------------------- ### getItemDetail(slot) Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/stock-ticker.md Gets detailed information about an item in the payment inventory's given slot. ```APIDOC ## getItemDetail(slot) ### Description Get detailed information about an item in the payment inventory. The returned information contains the same information as each item in [`list`](#list), as well as additional details like the display name (`displayName`), and item durability (`damage`, `maxDamage`, `durability`). Some items include more information (such as enchantments) - it is recommended to print it out using [`textutils.serialize`](https://tweaked.cc/module/textutils.html#v:serialize) or in the Lua REPL, to explore what is available. ### Parameters #### Path Parameters - **slot** (number) - Required - The slot to get information about. ### Returns - `table` Information about the item in this slot, or `nil` if it is empty, like: ```lua { name = "minecraft:apple", itemGroups = {}, tags = {}, count = 1, maxCount = 64, displayName = "Apple", } ``` ``` -------------------------------- ### Get Redstone Requester Address Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/redstone-requester.md Retrieves the current network address configured for the Redstone Requester. ```APIDOC ## getAddress() ### Description Gets the Redstone Requester's address. ### Method GET (conceptual) ### Endpoint N/A (Lua API) ### Returns - `string`: The address currently in use. ``` -------------------------------- ### Add Create Dependencies (Forge 1.20.1) Source: https://context7.com/creators-of-create/wiki/llms.txt Configure Gradle properties, repositories, and dependencies for a legacy Forge mod targeting Minecraft 1.20.1. Includes ForgeGradle specific syntax, Mixin refmap remapping, and `mods.toml` production dependency. ```groovy // gradle.properties minecraft_version = 1.20.1 create_version = 6.0.8-289 ponder_version = 1.0.91 flywheel_version = 1.0.5 registrate_version = MC1.20-1.3.3 // build.gradle (ForgeGradle / FG) repositories { maven { url = "https://maven.createmod.net" } maven { url = "https://maven.ithundxr.dev/mirror" } maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" } } dependencies { implementation(fg.deobf("com.simibubi.create:create-${minecraft_version}:${create_version}:slim") { transitive = false }) implementation(fg.deobf("net.createmod.ponder:Ponder-Forge-${minecraft_version}:${ponder_version}")) compileOnly(fg.deobf("dev.engine-room.flywheel:flywheel-forge-api-${minecraft_version}:${flywheel_version}")) runtimeOnly(fg.deobf("dev.engine-room.flywheel:flywheel-forge-${minecraft_version}:${flywheel_version}")) implementation(fg.deobf("com.tterrag.registrate:Registrate:${registrate_version}")) compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.4.1")) implementation("io.github.llamalad7:mixinextras-forge:0.4.1") } // Mixin refmap remapping (required for FG to avoid startup errors) minecraft { runs { client { property("mixin.env.remapRefMap", "true") property("mixin.env.refMapRemappingFile", "${projectDir}/build/createSrgToMcp/output.srg") } } } // mods.toml — production dependency [[dependencies.your_mod_id]] modId = "create" mandatory = true versionRange = "[6.0.8,6.1.0)" ordering = "NONE" side = "BOTH" ``` -------------------------------- ### list() Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/stock-ticker.md Lists all items in the payment inventory. ```APIDOC ## list() ### Description List all items in the payment inventory. This returns a table, with an entry for each slot. Each item in the inventory is represented by a table containing some basic information. More information can be fetched with [`getItemDetail`](#getItemDetail). The table contains the item `name`, the `count` and a (potentially `nil`) hash of the item's `nbt`. This NBT data doesn't contain anything useful, but allows you to distinguish identical items. The returned table is sparse, so empty slots will be `nil` - it is recommended to loop over using [`pairs`](https://www.lua.org/manual/5.1/manual.html#pdf-pairs) rather than [`ipairs`](https://www.lua.org/manual/5.1/manual.html#pdf-ipairs). ### Returns - `table` with basic item information like: ```lua { { name = "minecraft:apple", count = 1, }, { name = "minecraft:stick", count = 1, }, [ 10 ] = { nbt = "ce5c752cf2df5cf4ffb17d7b7bfacad7", count = 1, name = "minecraft:enchanted_book", }, } ``` ``` -------------------------------- ### Get Package Index Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/order-data-object.md Retrieves the index of the current package. This indicates the n'th package from the same packager. ```lua local index = package.getIndex() ``` -------------------------------- ### Create Schedule with Scheduler Library Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/train/libraries.md Utilize the Scheduler library to define a cyclic schedule that moves to 'Station 1', waits for 5 seconds and for the station to be powered or until 14:00 daily, then proceeds to 'Station 2' and waits for 1 second. This library supports multiple mods. ```lua local Scheduler = require("scheduler") local schedule = Scheduler.new(true) -- cyclic / looping! :to("Station 1") :wait(5):powered() :OR():time(14, 0, "daily") :to("Station 2") :wait(1) station.setSchedule(schedule) ``` -------------------------------- ### Get Frogport Configuration Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/package-frogport.md Retrieves the current operational mode of the Frogport. This can be either 'send_recieve' or 'send'. ```lua frogport.getConfiguration() ``` -------------------------------- ### Configure Maven Repository and Dependencies Source: https://github.com/creators-of-create/wiki/blob/main/src/developers/depend-on-create/template.md This code configures the Maven repository where Create, Flywheel, and Registrate jars are hosted and defines dependencies on those libraries. Ensure this is placed in your Gradle buildscript. ```gradle repositories { maven { name = "Create" url = "https://api.modrinth.com/maven" } } dependencies { implementation(platform("com.simibubi.create:create-bom:0.5.1g")) implementation(fg.deobf("com.simibubi.create:create")) implementation(fg.deobf("com.simibubi.create:flywheel")) implementation(fg.deobf("com.simibubi.create:registrate")) } ``` -------------------------------- ### getIndex() Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/order-data-object.md Gets the fragment index of the package. This indicates the package's position among others from the same packager. ```APIDOC ## getIndex() ### Description Gets the fragment index of the package. ### Returns - `number` The package index. ``` -------------------------------- ### Create Display Link API Source: https://context7.com/creators-of-create/wiki/llms.txt Control Create Display Link peripherals to write text and graphics to scoreboards and item displays with cursor-based positioning. ```APIDOC ## CC: Tweaked — Display Link Write text to Create Display Link targets (scoreboards, item displays, etc.) with cursor-based positioning. ```lua local display = peripheral.find("Create_DisplayLink") if not display then error("No Display Link found") end local h, w = display.getSize() print(string.format("Display size: %d x %d", w, h)) -- Clear and write a two-line message display.clear() display.setCursorPos(1, 1) display.write("Hello, Create!") display.setCursorPos(1, 2) display.write("Speed: 128 RPM") display.update() -- Must call update() to push changes to the display -- Append bytes (raw character codes) display.setCursorPos(1, 3) display.writeBytes(72) -- 'H' display.update() ``` ### Methods - **getSize()**: Returns the height and width of the display. - **clear()**: Clears the entire display. - **setCursorPos(x, y)**: Sets the cursor position for writing. - **write(text)**: Writes a string to the display at the current cursor position. - **writeBytes(byte1, byte2, ...)**: Writes raw byte values to the display. - **update()**: Pushes all pending changes to the display. ``` -------------------------------- ### Get Link Index Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/order-data-object.md Retrieves the Link Index of the package. This indicates the n'th packager that fulfills the order. ```lua local linkIndex = package.getLinkIndex() ``` -------------------------------- ### Get Redstone Requester Request Data Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/redstone-requester.md Retrieves the current item details queued for request by the Redstone Requester. ```APIDOC ## getRequest() ### Description Gets the Redstone Requester's request data. ### Method GET (conceptual) ### Endpoint N/A (Lua API) ### Returns - `table`: A table of `itemDetail`s. ``` -------------------------------- ### ForgeGradle Dependencies for build.gradle Source: https://github.com/creators-of-create/wiki/blob/main/src/developers/depend-on-create/forge-1.20.1.md Configure your `build.gradle` file with ForgeGradle dependencies for Create, Ponder, Flywheel, and Registrate. Ensure all required repositories are included. ```groovy repositories { maven { url = "https://maven.createmod.net" } // Create, Ponder, Flywheel maven { url = "https://maven.ithundxr.dev/mirror" } // Registrate maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" } // ForgeConfigAPIPort } dependencies { implementation(fg.deobf("com.simibubi.create:create-${minecraft_version}:${create_version}:slim") { transitive = false }) implementation(fg.deobf("net.createmod.ponder:Ponder-Forge-${minecraft_version}:${ponder_version}")) compileOnly(fg.deobf("dev.engine-room.flywheel:flywheel-forge-api-${minecraft_version}:${flywheel_version}")) runtimeOnly(fg.deobf("dev.engine-room.flywheel:flywheel-forge-${minecraft_version}:${flywheel_version}")) implementation(fg.deobf("com.tterrag.registrate:Registrate:${registrate_version}")) compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.4.1")) implementation("io.github.llamalad7:mixinextras-forge:0.4.1") } ``` -------------------------------- ### Get Order ID Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/order-data-object.md Retrieves the unique Order ID of the package. This ID is shared between all packages belonging to the same order. ```lua local orderID = package.getOrderID() ``` -------------------------------- ### isFinalLink() Source: https://github.com/creators-of-create/wiki/blob/main/src/users/cc-tweaked-integration/logistics/order-data-object.md Checks if the package is fully assembled and ready to craft. This indicates if it's the last package in the overall order sequence. ```APIDOC ## isFinalLink() ### Description Checks if the package is fully assembled and ready to craft. ### Returns - `boolean` `true` if the package is fully assembled and ready to craft, `false` otherwise. ```