CC: Tweaked 1.120.2 for Minecraft 1.20.1

This is the documentation for CC: Tweaked 1.120.2 for Minecraft 1.20.1. Documentation for other versions of Minecraft are available on the CC: Tweaked website:

Quick links

You probably want to start in the following places:

  • invalid reference
    Registering new peripherals
  • LuaFunction and IArguments for adding methods to your peripheral or Lua objects.
  • Turtle upgrades
  • Pocket upgrades

Using

CC: Tweaked is hosted on my maven repo, and so is relatively simple to depend on. You may wish to add a soft (or hard) dependency in your mods.toml file, with the appropriate version bounds, to ensure that API functionality you depend on is present.

repositories {
    maven {
        url "https://maven.squiddev.cc"
        content { includeGroup("cc.tweaked") }
    }
}

dependencies {
    // Vanilla (i.e. for multi-loader systems)
    compileOnly("cc.tweaked:cc-tweaked-1.20.1-common-api:1.120.2")

    // Forge Gradle
    compileOnly("cc.tweaked:cc-tweaked-1.20.1-core-api:1.120.2")
    compileOnly(fg.deobf("cc.tweaked:cc-tweaked-1.20.1-forge-api:1.120.2"))
    runtimeOnly(fg.deobf("cc.tweaked:cc-tweaked-1.20.1-forge:1.120.2"))

    // Fabric Loom
    modCompileOnly("cc.tweaked:cc-tweaked-1.20.1-fabric-api:1.120.2")
    modRuntimeOnly("cc.tweaked:cc-tweaked-1.20.1-fabric:1.120.2")
}

You should also be careful to only use classes within the dan200.computercraft.api package. Non-API classes are subject to change at any point. If you depend on functionality outside the API (or need to mixin to CC:T), please start a discussion to let me know!