Skip to content

Commit

Permalink
Merge branch 'mc-1.21.x' into mc-1.21.y
Browse files Browse the repository at this point in the history
Oh, so many issues here. Most notably, NF changed the translation for
config files. We should clean up these translation files, and remove the
suffix from them.
  • Loading branch information
SquidDev committed Nov 30, 2024
2 parents ef36fc1 + b7396f3 commit 205c589
Show file tree
Hide file tree
Showing 131 changed files with 3,799 additions and 1,283 deletions.
10 changes: 4 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ body:
id: mc-version
attributes:
label: Minecraft Version
description: What version of Minecraft are you using?
description: |
What version of Minecraft are you using? If your version is not listed, please try to reproduce on one of the supported versions.
options:
- 1.20.1
- 1.21.x
Expand All @@ -26,8 +27,5 @@ body:
label: Details
description: |
Description of the bug. Please include the following:
- Logs: These will be located in the `logs/` directory of your Minecraft
instance. Please upload them as a gist or directly into this editor.
- Detailed reproduction steps: sometimes I can spot a bug pretty easily,
but often it's much more obscure. The more information I have to help
reproduce it, the quicker it'll get fixed.
- Logs: These will be located in the `logs/` directory of your Minecraft instance. This is always useful, even if it doesn't include errors, so please upload this!
- Detailed reproduction steps: sometimes I can spot a bug pretty easily, but often it's much more obscure. The more information I have to help reproduce it, the quicker it'll get fixed.
18 changes: 9 additions & 9 deletions .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ jobs:
- name: ⚒️ Build
run: ./gradlew assemble || ./gradlew assemble

- name: Cache pre-commit
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}

- name: 💡 Lint
uses: pre-commit/action@v3.0.0
run: |
pipx install pre-commit
pre-commit run --show-diff-on-failure --color=always
- name: 🧪 Run tests
run: ./gradlew test validateMixinNames checkChangelog
Expand All @@ -42,11 +50,6 @@ jobs:
- name: 🧪 Run integration tests
run: ./gradlew runGametest

- name: 🧪 Run client tests
run: ./gradlew runGametestClient # Not checkClient, as no point running rendering tests.
# These are a little flaky on GH actions: its useful to run them, but don't break the build.
continue-on-error: true

- name: 🧪 Parse test reports
run: ./tools/parse-reports.py
if: ${{ failure() }}
Expand All @@ -63,9 +66,6 @@ jobs:
name: CC-Tweaked
path: ./jars

- name: 📤 Upload coverage
uses: codecov/codecov-action@v4

build-core:
strategy:
fail-fast: false
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ SPDX-License-Identifier: MPL-2.0
</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 CurseForge](https://img.shields.io/static/v1?label=Download&message=CC:%20Tweaked&color=E04E14&logoColor=E04E14&logo=CurseForge)][CurseForge]
[![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 [CurseForge] or [Modrinth]. It runs on both [Minecraft Forge] and [Fabric].
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
Expand Down Expand Up @@ -82,7 +81,6 @@ We bundle the API sources with the jar, so documentation should be easily viewab
the generated documentation [can be browsed online](https://tweaked.cc/javadoc/).

[computercraft]: https://github.com/dan200/ComputerCraft "ComputerCraft on GitHub"
[curseforge]: https://minecraft.curseforge.com/projects/cc-tweaked "Download CC: Tweaked from CurseForge"
[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."
Expand Down
1 change: 0 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ dependencies {
implementation(libs.kotlin.plugin)
implementation(libs.spotless)

implementation(libs.curseForgeGradle)
implementation(libs.fabric.loom)
implementation(libs.ideaExt)
implementation(libs.minotaur)
Expand Down
19 changes: 0 additions & 19 deletions buildSrc/src/main/kotlin/cc-tweaked.mod-publishing.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
//
// SPDX-License-Identifier: MPL-2.0

import net.darkhax.curseforgegradle.TaskPublishCurseForge
import cc.tweaked.gradle.setProvider

plugins {
id("net.darkhax.curseforgegradle")
id("com.modrinth.minotaur")
id("cc-tweaked.publishing")
}
Expand All @@ -25,23 +23,6 @@ val isUnstable = project.properties["isUnstable"] == "true"
val modVersion: String by extra
val mcVersion: String by extra

val publishCurseForge by tasks.registering(TaskPublishCurseForge::class) {
group = PublishingPlugin.PUBLISH_TASK_GROUP
description = "Upload artifacts to CurseForge"

apiToken = findProperty("curseForgeApiKey") ?: ""
enabled = apiToken != ""

val mainFile = upload("282001", modPublishing.output)
mainFile.changelog =
"Release notes can be found on the [GitHub repository](https://github.com/cc-tweaked/CC-Tweaked/releases/tag/v$mcVersion-$modVersion)."
mainFile.changelogType = "markdown"
mainFile.releaseType = if (isUnstable) "alpha" else "release"
mainFile.gameVersions.add(mcVersion)
}

tasks.publish { dependsOn(publishCurseForge) }

modrinth {
token.set(findProperty("modrinthApiKey") as String? ?: "")
projectId.set("gu7yAYhd")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ abstract class CCTweakedExtension(
companion object {
private val COMMIT_COUNTS = Pattern.compile("""^\s*[0-9]+\s+(.*)$""")
private val IGNORED_USERS = setOf(
"GitHub", "Daniel Ratcliffe", "Weblate",
"GitHub", "Daniel Ratcliffe", "NotSquidDev", "Weblate",
)

private fun <T> gitProvider(project: Project, default: T, supplier: () -> T): Provider<T> {
Expand Down
9 changes: 9 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ SPDX-License-Identifier: MPL-2.0
<property name="file" value="${config_loc}/suppressions.xml" />
</module>

<!--
Checkstyle doesn't support @snippet (https://github.com/checkstyle/checkstyle/issues/11455),
so suppress warnings nearby
-->
<module name="SuppressWithNearbyTextFilter">
<property name="nearbyTextPattern" value="@snippet" />
<property name="lineRange" value="20" />
</module>

<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="render_old"/>
</module>
Expand Down
4 changes: 3 additions & 1 deletion crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# SPDX-FileCopyrightText: 2017 The CC: Tweaked Developers
#
# SPDX-License-Identifier: MPL-2.0

files:
- source: projects/common/src/generated/resources/assets/computercraft/lang/en_us.json
translation: /projects/common/src/main/resources/assets/computercraft/lang/%locale_with_underscore%.json
languages_mapping:
locale_with_underscore:
cs: cs_cs # Czech
cs: cs_cz # Czech
da: da_dk # Danish
de: de_de # German
es-ES: es_es # Spanish
Expand All @@ -21,6 +22,7 @@ files:
ru: ru_ru # Russian
sv-SE: sv_se # Sweedish
tok: tok # Toki Pona
tr: tr_tr # Turkish
uk: uk_ua # Ukraine
vi: vi_vn # Vietnamese
zh-CN: zh_cn # Chinese Simplified
6 changes: 5 additions & 1 deletion doc/events/redstone.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers
SPDX-License-Identifier: MPL-2.0
-->

The [`event!redstone`] event is fired whenever any redstone inputs on the computer change.
The [`event!redstone`] event is fired whenever any redstone inputs on the computer or [relay][`redstone_relay`] change.

## Return values
1. [`string`]: The event name.
Expand All @@ -21,3 +21,7 @@ while true do
print("A redstone input has changed!")
end
```

## See also
- [The `redstone` API on computers][`module!redstone`]
- [The `redstone_relay` peripheral][`redstone_relay`]
3 changes: 1 addition & 2 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CC: Tweaked is a mod for Minecraft which adds programmable computers, turtles an
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 [CurseForge] or [Modrinth]. It runs on both [Minecraft Forge] and [Fabric].
CC: Tweaked can be installed from [Modrinth]. It runs on both [Minecraft Forge] and [Fabric].

## Features
Controlled using the [Lua programming language][lua], CC: Tweaked's computers provides all the tools you need to start
Expand Down Expand Up @@ -62,7 +62,6 @@ CC: Tweaked lives on [GitHub]. If you've got any ideas, feedback or bugs please
[github]: https://github.com/cc-tweaked/CC-Tweaked/ "CC: Tweaked on GitHub"
[bug]: https://github.com/cc-tweaked/CC-Tweaked/issues/new/choose
[computercraft]: https://github.com/dan200/ComputerCraft "ComputerCraft on GitHub"
[curseforge]: https://minecraft.curseforge.com/projects/cc-tweaked "Download CC: Tweaked from CurseForge"
[modrinth]: https://modrinth.com/mod/gu7yAYhd "Download CC: Tweaked from Modrinth"
[forge]: https://files.minecraftforge.net/ "Download Minecraft Forge."
[Minecraft Forge]: https://files.minecraftforge.net/ "Download Minecraft Forge."
Expand Down
2 changes: 1 addition & 1 deletion doc/reference/feature_compat.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ compatibility for these newer versions.
| `string.dump` strip argument || |
| `string.pack`/`string.unpack`/`string.packsize` || |
| `table.move` || |
| `math.atan2` -> `math.atan` | | |
| `math.atan2` -> `math.atan` | 🔶 | `math.atan` supports its two argument form. |
| Removed `math.frexp`, `math.ldexp`, `math.pow`, `math.cosh`, `math.sinh`, `math.tanh` || |
| `math.maxinteger`/`math.mininteger` || |
| `math.tointeger` || |
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ neogradle.subsystems.conventions.runs.enabled=false

# Mod properties
isUnstable=true
modVersion=1.113.1
modVersion=1.114.2

# Minecraft properties: We want to configure this here so we can read it in settings.gradle
mcVersion=1.21.3
20 changes: 9 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
# Minecraft
# MC version is specified in gradle.properties, as we need that in settings.gradle.
# Remember to update corresponding versions in fabric.mod.json/neoforge.mods.toml
fabric-api = "0.106.1+1.21.3"
fabric-loader = "0.16.7"
neoForge = "21.3.0-beta"
fabric-api = "0.109.0+1.21.3"
fabric-loader = "0.16.9"
neoForge = "21.3.38-beta"
neoForgeSpi = "8.0.1"
mixin = "0.8.5"
parchment = "2024.07.28"
parchmentMc = "1.21"
yarn = "1.21.3+build.1"
yarn = "1.21.3+build.2"

# Core dependencies (these versions are tied to the version Minecraft uses)
fastutil = "8.5.12"
Expand All @@ -26,7 +26,7 @@ slf4j = "2.0.9"
asm = "9.6"
autoService = "1.1.1"
checkerFramework = "3.42.0"
cobalt = { strictly = "0.9.3" }
cobalt = { strictly = "0.9.5" }
commonsCli = "1.6.0"
jetbrainsAnnotations = "24.1.0"
jsr305 = "3.0.2"
Expand Down Expand Up @@ -57,19 +57,18 @@ junit = "5.10.1"
jmh = "1.37"

# Build tools
cctJavadoc = "1.8.2"
checkstyle = "10.14.1"
curseForgeGradle = "1.1.18"
cctJavadoc = "1.8.3"
checkstyle = "10.20.1"
errorProne-core = "2.27.0"
errorProne-plugin = "3.1.0"
fabric-loom = "1.8.10"
githubRelease = "2.5.2"
gradleVersions = "0.50.0"
ideaExt = "1.1.7"
illuaminate = "0.1.0-73-g43ee16c"
illuaminate = "0.1.0-74-gf1551d5"
lwjgl = "3.3.3"
minotaur = "2.8.7"
neoGradle = "7.0.165"
neoGradle = "7.0.170"
nullAway = "0.10.25"
shadow = "8.3.1"
spotless = "6.23.3"
Expand Down Expand Up @@ -146,7 +145,6 @@ lwjgl-glfw = { module = "org.lwjgl:lwjgl-glfw" }
# Build tools
cctJavadoc = { module = "cc.tweaked:cct-javadoc", version.ref = "cctJavadoc" }
checkstyle = { module = "com.puppycrawl.tools:checkstyle", version.ref = "checkstyle" }
curseForgeGradle = { module = "net.darkhax.curseforgegradle:CurseForgeGradle", version.ref = "curseForgeGradle" }
errorProne-annotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "errorProne-core" }
errorProne-api = { module = "com.google.errorprone:error_prone_check_api", version.ref = "errorProne-core" }
errorProne-core = { module = "com.google.errorprone:error_prone_core", version.ref = "errorProne-core" }
Expand Down
Loading

0 comments on commit 205c589

Please sign in to comment.