1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-09 00:40:29 +00:00

Small bits of cleanup

Build system:
 - Switch to our new maven server. This has a cleaner separation between
   published packages and mirrored packages, to avoid leaking those into
   other people's builds.
 - Update Gradle and Loom versions.

Code:
 - Link to definitions instead in the breaking changes page.
 - Fix several unused variable warnings.

Other:
 - Remove unsupported Minecraft versions from the issue template.
This commit is contained in:
Jonathan Coates 2024-06-26 18:07:56 +01:00
parent 09d0f563b7
commit 0895200681
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
12 changed files with 29 additions and 29 deletions

View File

@ -8,10 +8,7 @@ body:
label: Minecraft Version label: Minecraft Version
description: What version of Minecraft are you using? description: What version of Minecraft are you using?
options: options:
- 1.16.x - 1.20.1
- 1.18.x
- 1.19.x
- 1.20.x
- 1.21.x - 1.21.x
validations: validations:
required: true required: true

View File

@ -39,7 +39,7 @@ on is present.
```groovy ```groovy
repositories { repositories {
maven { maven {
url "https://squiddev.cc/maven/" url "https://maven.squiddev.cc"
content { content {
includeGroup("cc.tweaked") includeGroup("cc.tweaked")
} }

View File

@ -36,7 +36,7 @@ repositories {
} }
} }
maven("https://squiddev.cc/maven") { maven("https://maven.squiddev.cc") {
name = "SquidDev" name = "SquidDev"
content { content {
includeGroup("cc.tweaked.vanilla-extract") includeGroup("cc.tweaked.vanilla-extract")

View File

@ -38,7 +38,7 @@ java {
repositories { repositories {
mavenCentral() mavenCentral()
val mainMaven = maven("https://squiddev.cc/maven") { val mainMaven = maven("https://maven.squiddev.cc/mirror") {
name = "SquidDev" name = "SquidDev"
} }
@ -133,8 +133,8 @@ tasks.processResources {
tasks.withType(AbstractArchiveTask::class.java).configureEach { tasks.withType(AbstractArchiveTask::class.java).configureEach {
isPreserveFileTimestamps = false isPreserveFileTimestamps = false
isReproducibleFileOrder = true isReproducibleFileOrder = true
dirMode = Integer.valueOf("755", 8) filePermissions {}
fileMode = Integer.valueOf("664", 8) dirPermissions {}
} }
tasks.jar { tasks.jar {

View File

@ -38,7 +38,7 @@ publishing {
} }
repositories { repositories {
maven("https://squiddev.cc/maven") { maven("https://maven.squiddev.cc") {
name = "SquidDev" name = "SquidDev"
credentials(PasswordCredentials::class) credentials(PasswordCredentials::class)

View File

@ -25,13 +25,13 @@ as documentation for breaking changes and "gotchas" one should look out for betw
- Update to Lua 5.2: - Update to Lua 5.2:
- Support for Lua 5.0's pseudo-argument `arg` has been removed. You should always use `...` for varargs. - Support for Lua 5.0's pseudo-argument `arg` has been removed. You should always use `...` for varargs.
- Environments are no longer baked into the runtime, and instead use the `_ENV` local or upvalue. `getfenv`/`setfenv` - Environments are no longer baked into the runtime, and instead use the `_ENV` local or upvalue. [`getfenv`]/[`setfenv`]
now only work on Lua functions with an `_ENV` upvalue. `getfenv` will return the global environment when called now only work on Lua functions with an `_ENV` upvalue. [`getfenv`] will return the global environment when called
with other functions, and `setfenv` will have no effect. with other functions, and [`setfenv`] will have no effect.
- `load`/`loadstring` defaults to using the global environment (`_G`) rather than the current coroutine's - [`load`]/[`loadstring`] defaults to using the global environment (`_G`) rather than the current coroutine's
environment. environment.
- Support for dumping functions (`string.dump`) and loading binary chunks has been removed. - Support for dumping functions ([`string.dump`]) and loading binary chunks has been removed.
- `math.random` now uses Lua 5.4's random number generator. - [`math.random`] now uses Lua 5.4's random number generator.
- File handles, HTTP requests and websockets now always use the original bytes rather than encoding/decoding to UTF-8. - File handles, HTTP requests and websockets now always use the original bytes rather than encoding/decoding to UTF-8.
@ -44,7 +44,7 @@ as documentation for breaking changes and "gotchas" one should look out for betw
`keys.enter` constant was queued when the key was pressed) `keys.enter` constant was queued when the key was pressed)
- Minecraft 1.13 removed the concept of item damage and block metadata (see ["The Flattening"][flattening]). As a - Minecraft 1.13 removed the concept of item damage and block metadata (see ["The Flattening"][flattening]). As a
result `turtle.inspect` no longer provides block metadata, and `turtle.getItemDetail` no longer provides damage. result [`turtle.inspect`] no longer provides block metadata, and [`turtle.getItemDetail`] no longer provides damage.
- Block states (`turtle.inspect().state`) should provide all the same information as block metadata, but in a much - Block states (`turtle.inspect().state`) should provide all the same information as block metadata, but in a much
more understandable format. more understandable format.
@ -70,7 +70,7 @@ as documentation for breaking changes and "gotchas" one should look out for betw
- Unlabelled computers and turtles now keep their ID when broken, meaning that unlabelled computers/items do not stack. - Unlabelled computers and turtles now keep their ID when broken, meaning that unlabelled computers/items do not stack.
## ComputerCraft 1.80pr1 {#cc-1.80} ## ComputerCraft 1.80pr1 {#cc-1.80}
- Programs run via `shell.run` are now started in their own isolated environment. This means globals set by programs - Programs run via [`shell.run`] are now started in their own isolated environment. This means globals set by programs
will not be accessible outside of this program. will not be accessible outside of this program.
- Programs containing `/` are looked up in the current directory and are no longer looked up on the path. For instance, - Programs containing `/` are looked up in the current directory and are no longer looked up on the path. For instance,

View File

@ -59,7 +59,7 @@ checkstyle = "10.14.1"
curseForgeGradle = "1.0.14" curseForgeGradle = "1.0.14"
errorProne-core = "2.27.0" errorProne-core = "2.27.0"
errorProne-plugin = "3.1.0" errorProne-plugin = "3.1.0"
fabric-loom = "1.6.7" fabric-loom = "1.7.1"
forgeGradle = "6.0.21" forgeGradle = "6.0.21"
githubRelease = "2.5.2" githubRelease = "2.5.2"
gradleVersions = "0.50.0" gradleVersions = "0.50.0"
@ -71,7 +71,7 @@ minotaur = "2.+"
nullAway = "0.10.25" nullAway = "0.10.25"
spotless = "6.23.3" spotless = "6.23.3"
taskTree = "2.1.1" taskTree = "2.1.1"
teavm = "0.10.0-SQUID.4" teavm = "0.11.0-SQUID.1"
vanillaExtract = "0.1.3" vanillaExtract = "0.1.3"
versionCatalogUpdate = "0.8.1" versionCatalogUpdate = "0.8.1"

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

2
gradlew vendored
View File

@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.

View File

@ -5,6 +5,7 @@
package dan200.computercraft.core.computer.computerthread; package dan200.computercraft.core.computer.computerthread;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import com.google.errorprone.annotations.Keep;
import dan200.computercraft.core.ComputerContext; import dan200.computercraft.core.ComputerContext;
import dan200.computercraft.core.Logging; import dan200.computercraft.core.Logging;
import dan200.computercraft.core.computer.TimeoutState; import dan200.computercraft.core.computer.TimeoutState;
@ -774,6 +775,7 @@ public final class ComputerThread implements ComputerScheduler {
/** /**
* The current state of this worker. * The current state of this worker.
*/ */
@Keep
private volatile ExecutorState $state = ExecutorState.IDLE; private volatile ExecutorState $state = ExecutorState.IDLE;
/** /**
@ -784,6 +786,7 @@ public final class ComputerThread implements ComputerScheduler {
* {@linkplain #afterWork()} finishes executing, we set this back to null and compute the difference between the * {@linkplain #afterWork()} finishes executing, we set this back to null and compute the difference between the
* two, updating the {@link Metrics#JAVA_ALLOCATION} metric. * two, updating the {@link Metrics#JAVA_ALLOCATION} metric.
*/ */
@Keep
private volatile @Nullable ThreadAllocation $threadAllocation = null; private volatile @Nullable ThreadAllocation $threadAllocation = null;
/** /**

View File

@ -360,13 +360,13 @@ public class Main {
// And our VBA // And our VBA
var termVertexArray = gl.createVertexArray("Terminal VAO"); var termVertexArray = gl.createVertexArray("Terminal VAO");
glEnableVertexArrayAttrib(termVertexArray, 0); glEnableVertexArrayAttrib(termVertexArray, ATTRIBUTE_POSITION);
glVertexArrayAttribFormat(termVertexArray, 0, 2, GL_FLOAT, false, 0); // Position glVertexArrayAttribFormat(termVertexArray, ATTRIBUTE_POSITION, 2, GL_FLOAT, false, 0); // Position
glEnableVertexArrayAttrib(termVertexArray, 1); glEnableVertexArrayAttrib(termVertexArray, ATTRIBUTE_UV);
glVertexArrayAttribFormat(termVertexArray, 1, 2, GL_FLOAT, false, 8); // UV glVertexArrayAttribFormat(termVertexArray, ATTRIBUTE_UV, 2, GL_FLOAT, false, 8); // UV
// FIXME: Can we merge this into one call? // FIXME: Can we merge this into one call?
glVertexArrayVertexBuffer(termVertexArray, 0, termVertices, 0, 16); glVertexArrayVertexBuffer(termVertexArray, ATTRIBUTE_POSITION, termVertices, 0, 16);
glVertexArrayVertexBuffer(termVertexArray, 1, termVertices, 0, 16); glVertexArrayVertexBuffer(termVertexArray, ATTRIBUTE_UV, termVertices, 0, 16);
glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClearColor(0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -38,7 +38,7 @@ pluginManagement {
} }
} }
maven("https://squiddev.cc/maven") { maven("https://maven.squiddev.cc") {
name = "SquidDev" name = "SquidDev"
content { content {
includeGroup("cc.tweaked.vanilla-extract") includeGroup("cc.tweaked.vanilla-extract")