mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-02-15 10:30:05 +00:00
![Jonathan Coates](/assets/img/avatar_default.png)
I've no motivation for modding right now, but always got time for build system busywork! CC:T (and CC before that) has always published its API docs. However, they're not always the most helpful — they're useful if you know what you're looking for, but aren't a good getting-started guide. Part of the issue here is there's no examples, and everything is described pretty abstractly. I have occasionally tried to improve this (e.g. the peripheral docs in bdffabc08e2eb9895f966c949acc8334a2bf4475), but it's a long road. This commit adds a new example mod, which registers peripherals, an API and a turtle upgrade. While the mod itself isn't exported as part of the docs, we reference blocks of it using Java's new {@snippet} tag. - Switch the Forge project to use NeoForge's new Legacy MDG plugin. We don't *need* to do this, but it means the build logic for Forge and NeoForge is more closely aligned. - Add a new SnippetTaglet, which is a partial backport of Java 18+'s {@snippet}. - Add an example mod. This is a working multi-loader mod, complete with datagen (albeit with no good multi-loader abstractions). - Move our existing <pre>{@code ...}</pre> blocks into the example mod, replacing them with {@snippet}s. - Add a new overview page to the docs, providing some getting-started information. We had this already in the dan200.computercraft.api package docs, but it's not especially visible there.
78 lines
3.6 KiB
Markdown
78 lines
3.6 KiB
Markdown
<!--
|
|
SPDX-FileCopyrightText: 2017 The CC: Tweaked Developers
|
|
|
|
SPDX-License-Identifier: MPL-2.0
|
|
-->
|
|
|
|
<picture>
|
|
<source media="(prefers-color-scheme: dark)" srcset="./doc/logo-darkmode.png">
|
|
<source media="(prefers-color-scheme: light)" srcset="./doc/logo.png">
|
|
<img alt="CC: Tweaked" src="./doc/logo.png">
|
|
</picture>
|
|
|
|
[![Current build status](https://github.com/cc-tweaked/CC-Tweaked/workflows/Build/badge.svg)](https://github.com/cc-tweaked/CC-Tweaked/actions "Current build status")
|
|
[![Download CC: Tweaked on Modrinth](https://img.shields.io/static/v1?label=Download&color=00AF5C&logoColor=00AF5C&logo=Modrinth&message=CC:%20Tweaked)][Modrinth]
|
|
|
|
CC: Tweaked is a mod for Minecraft which adds programmable computers, turtles and more to the game. A fork of the
|
|
much-beloved [ComputerCraft], it continues its legacy with improved performance and stability, along with a wealth of
|
|
new features.
|
|
|
|
CC: Tweaked can be installed from [Modrinth]. It runs on both [Minecraft Forge] and [Fabric].
|
|
|
|
## Contributing
|
|
Any contribution is welcome, be that using the mod, reporting bugs or contributing code. If you want to get started
|
|
developing the mod, [check out the instructions here](CONTRIBUTING.md#developing).
|
|
|
|
## Community
|
|
If you need help getting started with CC: Tweaked, want to show off your latest project, or just want to chat about
|
|
ComputerCraft, do check out our [GitHub discussions page][GitHub discussions]! There's also a fairly populated,
|
|
albeit quiet IRC channel on [EsperNet], if that's more your cup of tea. You can join `#computercraft` through your
|
|
desktop client, or online using [KiwiIRC].
|
|
|
|
We also host fairly comprehensive documentation at [tweaked.cc](https://tweaked.cc/ "The CC: Tweaked website").
|
|
|
|
## 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.
|
|
|
|
```groovy
|
|
repositories {
|
|
maven {
|
|
url "https://maven.squiddev.cc"
|
|
content {
|
|
includeGroup("cc.tweaked")
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// Vanilla (i.e. for multi-loader systems)
|
|
compileOnly("cc.tweaked:cc-tweaked-$mcVersion-common-api:$cctVersion")
|
|
|
|
// Forge Gradle
|
|
compileOnly("cc.tweaked:cc-tweaked-$mcVersion-core-api:$cctVersion")
|
|
compileOnly(fg.deobf("cc.tweaked:cc-tweaked-$mcVersion-forge-api:$cctVersion"))
|
|
runtimeOnly(fg.deobf("cc.tweaked:cc-tweaked-$mcVersion-forge:$cctVersion"))
|
|
|
|
// Fabric Loom
|
|
modCompileOnly("cc.tweaked:cc-tweaked-$mcVersion-fabric-api:$cctVersion")
|
|
modRuntimeOnly("cc.tweaked:cc-tweaked-$mcVersion-fabric:$cctVersion")
|
|
}
|
|
```
|
|
|
|
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 file
|
|
an issue to let me know!
|
|
|
|
We bundle the API sources with the jar, so documentation should be easily viewable within your editor. Alternatively,
|
|
the generated documentation [can be browsed online](https://tweaked.cc/javadoc/).
|
|
|
|
[computercraft]: https://github.com/dan200/ComputerCraft "ComputerCraft on GitHub"
|
|
[modrinth]: https://modrinth.com/mod/gu7yAYhd "Download CC: Tweaked from Modrinth"
|
|
[Minecraft Forge]: https://files.minecraftforge.net/ "Download Minecraft Forge."
|
|
[Fabric]: https://fabricmc.net/use/installer/ "Download Fabric."
|
|
[GitHub Discussions]: https://github.com/cc-tweaked/CC-Tweaked/discussions
|
|
[EsperNet]: https://www.esper.net/
|
|
[KiwiIRC]: https://kiwiirc.com/nextclient/#irc://irc.esper.net:+6697/#computercraft "#computercraft on EsperNet"
|