From f776b1715055cc825d463a17ec0b9f3264b98ca2 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Fri, 15 Nov 2024 15:32:40 +0000 Subject: [PATCH 1/7] Fix argument order of math.atan in changelog --- .../main/resources/data/computercraft/lua/rom/help/changelog.md | 2 +- .../main/resources/data/computercraft/lua/rom/help/whatsnew.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md b/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md index fd0e90613..514d9b050 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md @@ -1,7 +1,7 @@ # New features in CC: Tweaked 1.114.0 * Add redstone relay peripheral. -* Add support for `math.atan(x, y)`. +* Add support for `math.atan(y, x)`. * Update several translations. Several bug fixes: diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/help/whatsnew.md b/projects/core/src/main/resources/data/computercraft/lua/rom/help/whatsnew.md index 7828adb8a..a151ee199 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/help/whatsnew.md +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/help/whatsnew.md @@ -1,7 +1,7 @@ New features in CC: Tweaked 1.114.0 * Add redstone relay peripheral. -* Add support for `math.atan(x, y)`. +* Add support for `math.atan(y, x)`. * Update several translations. Several bug fixes: From 63bdc2537cbe5d7b731e43e1fe40951b7d1e0950 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Fri, 15 Nov 2024 18:43:28 +0000 Subject: [PATCH 2/7] Fix monitor events using the wrong computer set Fixes #2010 --- .../shared/peripheral/monitor/MonitorBlockEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/common/src/main/java/dan200/computercraft/shared/peripheral/monitor/MonitorBlockEntity.java b/projects/common/src/main/java/dan200/computercraft/shared/peripheral/monitor/MonitorBlockEntity.java index 928590b49..936a753cd 100644 --- a/projects/common/src/main/java/dan200/computercraft/shared/peripheral/monitor/MonitorBlockEntity.java +++ b/projects/common/src/main/java/dan200/computercraft/shared/peripheral/monitor/MonitorBlockEntity.java @@ -485,7 +485,7 @@ public class MonitorBlockEntity extends BlockEntity { var monitor = getLoadedMonitor(x, y).getMonitor(); if (monitor == null) continue; - computers.forEach(fun); + monitor.computers.forEach(fun); } } } From 1d7d8006d4edc6db09e0dda9f3bd537492f9d3e3 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Sat, 16 Nov 2024 15:19:00 +0000 Subject: [PATCH 3/7] Stop publishing to CurseForge Been dragging my feet over this for a while now, but increasingly uncomfortable with Overwolf. I'm not going to delete the project (or any existing versions), just not publish any new versions there. --- README.md | 4 +--- buildSrc/build.gradle.kts | 1 - .../cc-tweaked.mod-publishing.gradle.kts | 19 ------------------- doc/index.md | 3 +-- gradle/libs.versions.toml | 2 -- 5 files changed, 2 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index f37016ec7..3b1859631 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,13 @@ SPDX-License-Identifier: MPL-2.0 [![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 @@ -83,7 +82,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." diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index f95a9c1d5..90b6c2391 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -49,7 +49,6 @@ dependencies { implementation(libs.kotlin.plugin) implementation(libs.spotless) - implementation(libs.curseForgeGradle) implementation(libs.fabric.loom) implementation(libs.forgeGradle) implementation(libs.ideaExt) diff --git a/buildSrc/src/main/kotlin/cc-tweaked.mod-publishing.gradle.kts b/buildSrc/src/main/kotlin/cc-tweaked.mod-publishing.gradle.kts index 35e1da36b..f83cd9c77 100644 --- a/buildSrc/src/main/kotlin/cc-tweaked.mod-publishing.gradle.kts +++ b/buildSrc/src/main/kotlin/cc-tweaked.mod-publishing.gradle.kts @@ -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") } @@ -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") diff --git a/doc/index.md b/doc/index.md index 86f64f65b..cecb2ac15 100644 --- a/doc/index.md +++ b/doc/index.md @@ -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 @@ -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." diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3c103a085..ada42638e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -58,7 +58,6 @@ jmh = "1.37" # Build tools cctJavadoc = "1.8.3" checkstyle = "10.14.1" -curseForgeGradle = "1.0.14" errorProne-core = "2.27.0" errorProne-plugin = "3.1.0" fabric-loom = "1.7.1" @@ -145,7 +144,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" } From cddb8fec112abd5c22b377461c3e94c37f4c944a Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Tue, 19 Nov 2024 21:35:00 +0000 Subject: [PATCH 4/7] Fix crash when lectern has no item This should never happen in practice, but might happen when using /setblock or after world corruption, so let's be careful here. Closes #2014 --- .../computercraft/shared/lectern/CustomLecternBlockEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/common/src/main/java/dan200/computercraft/shared/lectern/CustomLecternBlockEntity.java b/projects/common/src/main/java/dan200/computercraft/shared/lectern/CustomLecternBlockEntity.java index ee124ed15..ea27c596d 100644 --- a/projects/common/src/main/java/dan200/computercraft/shared/lectern/CustomLecternBlockEntity.java +++ b/projects/common/src/main/java/dan200/computercraft/shared/lectern/CustomLecternBlockEntity.java @@ -119,7 +119,7 @@ public final class CustomLecternBlockEntity extends BlockEntity implements MenuP @Override public CompoundTag getUpdateTag() { var tag = super.getUpdateTag(); - tag.put(NBT_ITEM, item.save(new CompoundTag())); + if (!item.isEmpty()) tag.put(NBT_ITEM, item.save(new CompoundTag())); return tag; } From d1a6b043c2e578d9921770f14fee236b6b473af9 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Sat, 23 Nov 2024 08:15:28 +0000 Subject: [PATCH 5/7] Clean up monitor cursor rendering - Use the correct index count for the cursor quad. Monitors are now rendered as quads, rather than triangles. - *Skip* rendering the cursor vertex, rather than additionally rendering it. I confess, I'm baffled how this code was ever written. From what I can tell, this has been broken since it was first introduced in 4228011b848e99de64eb79c26598d81490c32bad, and I'm sure I tested it then. Fixes #2013. Probably. --- .../client/render/monitor/MonitorBlockEntityRenderer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/common/src/client/java/dan200/computercraft/client/render/monitor/MonitorBlockEntityRenderer.java b/projects/common/src/client/java/dan200/computercraft/client/render/monitor/MonitorBlockEntityRenderer.java index 8e58d42b2..43ca16ac7 100644 --- a/projects/common/src/client/java/dan200/computercraft/client/render/monitor/MonitorBlockEntityRenderer.java +++ b/projects/common/src/client/java/dan200/computercraft/client/render/monitor/MonitorBlockEntityRenderer.java @@ -176,7 +176,7 @@ public class MonitorBlockEntityRenderer implements BlockEntityRenderer DirectFixedWidthFontRenderer.drawTerminalBackground(sink, 0, 0, terminal, yMargin, yMargin, xMargin, xMargin)); @@ -208,10 +208,10 @@ public class MonitorBlockEntityRenderer implements BlockEntityRenderer Date: Sat, 23 Nov 2024 09:10:50 +0000 Subject: [PATCH 6/7] Update translations --- .../src/main/resources/assets/computercraft/lang/de_de.json | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/common/src/main/resources/assets/computercraft/lang/de_de.json b/projects/common/src/main/resources/assets/computercraft/lang/de_de.json index c18c52d8b..3d9dcc116 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/de_de.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/de_de.json @@ -16,6 +16,7 @@ "block.computercraft.monitor_advanced": "Erweiterter Monitor", "block.computercraft.monitor_normal": "Monitor", "block.computercraft.printer": "Drucker", + "block.computercraft.redstone_relay": "Redstone Relais", "block.computercraft.speaker": "Lautsprecher", "block.computercraft.turtle_advanced": "Erweiterte Turtle", "block.computercraft.turtle_advanced.upgraded": "Erweiterte Turtle (%s)", From 5e24ad17d79edd6e42c63b1d72e26e265660f926 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Sat, 23 Nov 2024 09:14:53 +0000 Subject: [PATCH 7/7] Bump CC:T to 1.114.1 --- gradle.properties | 2 +- .../data/computercraft/lua/rom/help/changelog.md | 7 +++++++ .../data/computercraft/lua/rom/help/whatsnew.md | 13 ++++--------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index 6d72cad02..66bb787d8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ kotlin.jvm.target.validation.mode=error # Mod properties isUnstable=false -modVersion=1.114.0 +modVersion=1.114.1 # Minecraft properties: We want to configure this here so we can read it in settings.gradle mcVersion=1.20.1 diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md b/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md index 514d9b050..9fd71be6e 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/help/changelog.md @@ -1,3 +1,10 @@ +# New features in CC: Tweaked 1.114.1 + +Several bug fixes: +* Fix monitor touch events only firing from one monitor. +* Fix crash when lectern has no item. +* Fix cursor not blinking on monitors. + # New features in CC: Tweaked 1.114.0 * Add redstone relay peripheral. diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/help/whatsnew.md b/projects/core/src/main/resources/data/computercraft/lua/rom/help/whatsnew.md index a151ee199..389dfaa36 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/help/whatsnew.md +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/help/whatsnew.md @@ -1,13 +1,8 @@ -New features in CC: Tweaked 1.114.0 - -* Add redstone relay peripheral. -* Add support for `math.atan(y, x)`. -* Update several translations. +New features in CC: Tweaked 1.114.1 Several bug fixes: -* Fix pocket upgrades not appearing after crafting. -* Cancel `rednet.receive` and `Websocket.receive` timers after a message is received. -* Fix several issues with parsing and printing large doubles. -* Fix in-hand pocket computer being blank after changing dimension. +* Fix monitor touch events only firing from one monitor. +* Fix crash when lectern has no item. +* Fix cursor not blinking on monitors. Type "help changelog" to see the full version history.