2023-03-15 21:52:13 +00:00
|
|
|
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2022-06-19 10:21:41 +00:00
|
|
|
pluginManagement {
|
2022-11-10 19:32:13 +00:00
|
|
|
// Duplicated in buildSrc/build.gradle.kts
|
2022-06-19 10:21:41 +00:00
|
|
|
repositories {
|
2022-11-10 19:32:13 +00:00
|
|
|
mavenCentral()
|
2022-06-19 10:21:41 +00:00
|
|
|
gradlePluginPortal()
|
2022-11-10 19:32:13 +00:00
|
|
|
|
Clean up Javadocs a little
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.
2025-01-09 20:47:51 +00:00
|
|
|
maven("https://maven.neoforged.net") {
|
|
|
|
name = "NeoForge"
|
2022-11-10 19:32:13 +00:00
|
|
|
content {
|
Clean up Javadocs a little
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.
2025-01-09 20:47:51 +00:00
|
|
|
includeGroup("net.neoforged")
|
2022-11-10 19:32:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
maven("https://maven.fabricmc.net/") {
|
|
|
|
name = "Fabric"
|
|
|
|
content {
|
|
|
|
includeGroup("fabric-loom")
|
|
|
|
includeGroup("net.fabricmc")
|
|
|
|
}
|
|
|
|
}
|
2024-01-29 20:59:16 +00:00
|
|
|
|
2024-06-26 17:07:56 +00:00
|
|
|
maven("https://maven.squiddev.cc") {
|
2024-01-29 20:59:16 +00:00
|
|
|
name = "SquidDev"
|
|
|
|
content {
|
|
|
|
includeGroup("cc.tweaked.vanilla-extract")
|
|
|
|
}
|
|
|
|
}
|
2022-06-19 10:21:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-22 20:09:08 +00:00
|
|
|
val mcVersion: String by settings
|
|
|
|
rootProject.name = "cc-tweaked-$mcVersion"
|
2022-11-04 21:41:59 +00:00
|
|
|
|
|
|
|
include(":core-api")
|
2022-11-04 22:31:56 +00:00
|
|
|
include(":core")
|
2022-11-06 15:07:13 +00:00
|
|
|
|
|
|
|
include(":common-api")
|
2022-11-09 23:58:56 +00:00
|
|
|
include(":common")
|
2022-11-10 19:32:13 +00:00
|
|
|
include(":fabric-api")
|
|
|
|
include(":fabric")
|
2022-11-06 15:07:13 +00:00
|
|
|
include(":forge-api")
|
2022-11-09 23:58:56 +00:00
|
|
|
include(":forge")
|
2022-11-06 15:07:13 +00:00
|
|
|
|
2022-11-09 18:58:31 +00:00
|
|
|
include(":lints")
|
Add a standalone CC:T UI
Does it count as an emulator when it's official? I hope not, as this'd
make it my fourth or fifth emulator at this point.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Developing/debugging CraftOS is a massive pain to do inside Minecraft,
as any change to resources requires a compile+hot swap cycle (and
sometimes a `/reload` in-game). As such, it's often more convenient to
spin up an emulator, pointing it to load the ROM from CC:T's sources.
However, this isn't practical when also making changes to the Java
classes. In this case, we either need to go in-game, or build a custom
version of CCEmuX.
This commit offers an alternative option: we now have our own emulator,
which allows us to hot swap both Lua and Java to our heart's content.
Most of the code here is based on our monitor TBO renderer. We probably
could share some more of this, but there's not really a good place for
it - feels a bit weird just to chuck it in :core.
This is *not* a general-purpose emulator. It's limited in a lot of
ways (won't launch on Mac[^1], no support for multiple computers) - just
stick to what's there already.
[^1]: We require OpenGL 4.5 due to our use of DSA.
2023-10-28 16:55:56 +00:00
|
|
|
include(":standalone")
|
2022-11-06 13:37:07 +00:00
|
|
|
include(":web")
|
2022-11-04 21:41:59 +00:00
|
|
|
|
|
|
|
for (project in rootProject.children) {
|
|
|
|
project.projectDir = file("projects/${project.name}")
|
|
|
|
}
|