diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644
index 0000000000..593c7bb0bf
--- /dev/null
+++ b/.github/workflows/build.yaml
@@ -0,0 +1,29 @@
+name: Build and Pre-release
+
+on:
+ pull_request:
+ types:
+ - opened
+ - edited
+ - synchronize
+ - labeled
+ - unlabeled
+ workflow_dispatch:
+
+permissions:
+ contents: read
+ statuses: write
+ packages: write
+
+jobs:
+ build:
+ uses: ldtteam/operapublicacreator/.github/workflows/gradle.build.yaml@main
+ with:
+ java: 17
+ secrets: inherit
+ pre-release:
+ uses: ldtteam/operapublicacreator/.github/workflows/gradle.prerelease.yaml@main
+ if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && contains( github.event.pull_request.labels.*.name, 'Pre-release')
+ with:
+ java: 17
+ secrets: inherit
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000000..030b3ef933
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,21 @@
+name: Release
+
+on:
+ push:
+ branches:
+ - "version/*"
+ - "release/*"
+ - "testing/*"
+ workflow_dispatch:
+
+permissions:
+ contents: write
+ statuses: write
+
+jobs:
+ release:
+ uses: ldtteam/operapublicacreator/.github/workflows/gradle.publish.yaml@main
+ with:
+ java: 17
+ curse_release_type: ${{ contains(github.ref, 'release') && 'release' || 'beta' }}
+ secrets: inherit
diff --git a/.teamcity/patches/buildTypes/Beta_Release.kts b/.teamcity/patches/buildTypes/Beta_Release.kts
deleted file mode 100644
index 6812b67962..0000000000
--- a/.teamcity/patches/buildTypes/Beta_Release.kts
+++ /dev/null
@@ -1,58 +0,0 @@
-package patches.buildTypes
-
-import jetbrains.buildServer.configs.kotlin.v2019_2.*
-import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
-import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.ScheduleTrigger
-import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.schedule
-import jetbrains.buildServer.configs.kotlin.v2019_2.ui.*
-
-/*
-This patch script was generated by TeamCity on settings change in UI.
-To apply the patch, change the buildType with id = 'Beta_Release'
-accordingly, and delete the patch script.
-*/
-changeBuildType(RelativeId("Beta_Release")) {
- vcs {
-
- check(branchFilter == "+:*") {
- "Unexpected option value: branchFilter = $branchFilter"
- }
- branchFilter = "+:*"
- }
-
- expectSteps {
- gradle {
- name = "Compile"
- id = "RUNNER_9"
- tasks = "build createChangelog curseforge publish"
- buildFile = "build.gradle"
- enableStacktrace = true
- param("org.jfrog.artifactory.selectedDeployableServer.deployReleaseText", "%Project.Type%")
- param("org.jfrog.artifactory.selectedDeployableServer.publishBuildInfo", "true")
- param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
- param("org.jfrog.artifactory.selectedDeployableServer.urlId", "2")
- param("org.jfrog.artifactory.selectedDeployableServer.envVarsExcludePatterns", "*password*,*secret*")
- param("org.jfrog.artifactory.selectedDeployableServer.resolvingRepo", "modding")
- param("org.jfrog.artifactory.selectedDeployableServer.deployReleaseFlag", "true")
- param("org.jfrog.artifactory.selectedDeployableServer.targetRepo", "libraries")
- }
- }
- steps {
- check(stepsOrder == arrayListOf("RUNNER_85", "RUNNER_9")) {
- "Unexpected build steps order: $stepsOrder"
- }
- stepsOrder = arrayListOf("RUNNER_9")
- }
-
- triggers {
- add {
- schedule {
- id = "TRIGGER_14"
- schedulingPolicy = weekly {
- dayOfWeek = ScheduleTrigger.DAY.Saturday
- }
- triggerBuild = always()
- }
- }
- }
-}
diff --git a/.teamcity/pom.xml b/.teamcity/pom.xml
deleted file mode 100644
index 8d8963874f..0000000000
--- a/.teamcity/pom.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
- 4.0.0
- LetSDevTogether_Structurize Config DSL Script
- LetSDevTogether_Structurize
- LetSDevTogether_Structurize_dsl
- 1.0-SNAPSHOT
-
-
- org.jetbrains.teamcity
- configs-dsl-kotlin-parent
- 1.0-SNAPSHOT
-
-
-
-
- jetbrains-all
- https://download.jetbrains.com/teamcity-repository
-
- true
-
-
-
- teamcity-server
- https://buildsystem.ldtteam.com/app/dsl-plugins-repository
-
- true
-
-
-
-
-
-
- JetBrains
- https://download.jetbrains.com/teamcity-repository
-
-
-
-
- ${basedir}
-
-
- kotlin-maven-plugin
- org.jetbrains.kotlin
- ${kotlin.version}
-
-
-
-
- compile
- process-sources
-
- compile
-
-
-
- test-compile
- process-test-sources
-
- test-compile
-
-
-
-
-
- org.jetbrains.teamcity
- teamcity-configs-maven-plugin
- ${teamcity.dsl.version}
-
- kotlin
- target/generated-configs
-
-
-
-
-
-
-
- org.jetbrains.teamcity
- configs-dsl-kotlin
- ${teamcity.dsl.version}
- compile
-
-
- org.jetbrains.teamcity
- configs-dsl-kotlin-plugins
- 1.0-SNAPSHOT
- pom
- compile
-
-
- org.jetbrains.kotlin
- kotlin-stdlib-jdk8
- ${kotlin.version}
- compile
-
-
- org.jetbrains.kotlin
- kotlin-script-runtime
- ${kotlin.version}
- compile
-
-
-
\ No newline at end of file
diff --git a/.teamcity/settings.kts b/.teamcity/settings.kts
deleted file mode 100644
index 078b55ce57..0000000000
--- a/.teamcity/settings.kts
+++ /dev/null
@@ -1,379 +0,0 @@
-import jetbrains.buildServer.configs.kotlin.v2019_2.*
-import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.commitStatusPublisher
-import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.vcsLabeling
-import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.GradleBuildStep
-import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
-import jetbrains.buildServer.configs.kotlin.v2019_2.projectFeatures.githubIssues
-import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.schedule
-import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
-
-/*
-The settings script is an entry point for defining a TeamCity
-project hierarchy. The script should contain a single call to the
-project() function with a Project instance or an init function as
-an argument.
-
-VcsRoots, BuildTypes, Templates, and subprojects can be
-registered inside the project using the vcsRoot(), buildType(),
-template(), and subProject() methods respectively.
-
-To debug settings scripts in command-line, run the
-
- mvnDebug org.jetbrains.teamcity:teamcity-configs-maven-plugin:generate
-
-command and attach your debugger to the port 8000.
-
-To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View
--> Tool Windows -> Maven Projects), find the generate task node
-(Plugins -> teamcity-configs -> teamcity-configs:generate), the
-'Debug' option is available in the context menu for the task.
-*/
-
-version = "2021.2"
-
-project {
- description = "The Structurize Minecraft Mod"
-
- params {
- param("env.JDK_VERSION", "jdk17")
- param("Project.Type", "mods")
- param("env.Version.Patch", "0")
- param("env.Version.Suffix", "")
- param("env.Version.Major", "1")
- text("env.Version", "%env.Version.Major%.%env.Version.Minor%.%env.Version.Patch%%env.Version.Suffix%", label = "Version", description = "The version of the project.", display = ParameterDisplay.HIDDEN, allowEmpty = true)
- param("Current Minecraft Version", "main")
- text("Repository", "ldtteam/structurize", label = "Repository", description = "The repository for structurize.", readOnly = true, allowEmpty = true)
- param("env.Version.Minor", "0")
- param("Upsource.Project.Id", "structurize")
- param("Default.Branch", "version/main")
- param("env.GRADLE_VERSION", "7.3")
- param("filename.prefix", "structurize")
- }
-
- features {
- githubIssues {
- id = "PROJECT_EXT_22"
- displayName = "ldtteam/structurize"
- repositoryURL = "https://github.com/ldtteam/structurize"
- authType = accessToken {
- accessToken = "credentialsJSON:47381468-aceb-4992-93c9-1ccd4d7aa67f"
- }
- }
- }
- subProjectsOrder = arrayListOf(RelativeId("Release"), RelativeId("UpgradeBetaRelease"), RelativeId("Beta"), RelativeId("OfficialPublications"), RelativeId("Branches"), RelativeId("PullRequests_2"))
-
- subProject(Release)
- subProject(UpgradeBetaRelease)
- subProject(Beta)
- subProject(OfficialPublications)
- subProject(Branches)
- subProject(PullRequests_2)
-}
-
-object Beta : Project({
- name = "Beta"
- description = "Beta version builds of structurize"
-
- buildType(Beta_Release)
-
- params {
- text("env.crowdinKey", "credentialsJSON:57fbe4f4-13dd-4c72-b6b3-3cc1e3a8240e", label = "Crowdin key", description = "The API key for crowdin to pull translations", allowEmpty = true)
- param("Current Minecraft Version", "main")
- param("env.GRADLE_VERSION", "7.3")
- param("Default.Branch", "version/%Current Minecraft Version%")
- param("VCS.Branches", "+:refs/heads/version/(*)")
- param("env.CURSERELEASETYPE", "beta")
- param("env.Version.Suffix", "-BETA")
- }
-})
-
-object Beta_Release : BuildType({
- templates(AbsoluteId("LetSDevTogether_BuildWithRelease"))
- name = "Release"
- description = "Releases the mod as Beta to CurseForge"
-
- allowExternalStatus = true
-
- params {
- param("env.Version.Patch", "${OfficialPublications_CommonB.depParamRefs.buildNumber}")
- }
-
- steps {
- gradle {
- name = "Compile"
- id = "RUNNER_9"
- tasks = "build createChangelog curseforge publish"
- buildFile = "build.gradle"
- enableStacktrace = true
- param("org.jfrog.artifactory.selectedDeployableServer.deployReleaseText", "%Project.Type%")
- param("org.jfrog.artifactory.selectedDeployableServer.publishBuildInfo", "true")
- param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
- param("org.jfrog.artifactory.selectedDeployableServer.urlId", "2")
- param("org.jfrog.artifactory.selectedDeployableServer.envVarsExcludePatterns", "*password*,*secret*")
- param("org.jfrog.artifactory.selectedDeployableServer.resolvingRepo", "modding")
- param("org.jfrog.artifactory.selectedDeployableServer.deployReleaseFlag", "true")
- param("org.jfrog.artifactory.selectedDeployableServer.targetRepo", "libraries")
- }
- stepsOrder = arrayListOf("RUNNER_85", "RUNNER_9")
- }
-
- features {
- vcsLabeling {
- id = "BUILD_EXT_11"
- vcsRootId = "${DslContext.settingsRoot.id}"
- labelingPattern = "%env.Version%"
- successfulOnly = true
- branchFilter = ""
- }
- commitStatusPublisher {
- id = "BUILD_EXT_15"
- enabled = false
- vcsRootExtId = "${DslContext.settingsRoot.id}"
- publisher = upsource {
- serverUrl = "https://code-analysis.ldtteam.com"
- projectId = "%Upsource.Project.Id%"
- userName = "upsource"
- password = "credentialsJSON:f19631a7-1bc1-4a66-88a0-dc2b9cd36734"
- }
- }
- }
-
- dependencies {
- snapshot(OfficialPublications_CommonB) {
- reuseBuilds = ReuseBuilds.NO
- onDependencyFailure = FailureAction.FAIL_TO_START
- }
- }
-})
-
-object Release : Project({
- name = "Release"
- description = "Release version builds of structurize"
-
- buildType(Release_Release)
-
- params {
- text("env.crowdinKey", "credentialsJSON:57fbe4f4-13dd-4c72-b6b3-3cc1e3a8240e", label = "Crowdin key", description = "The API key for crowdin to pull translations", allowEmpty = true)
- param("Default.Branch", "version/%Current Minecraft Version%")
- param("VCS.Branches", "+:refs/heads/release/(*)")
- param("env.CURSERELEASETYPE", "release")
- param("env.Version.Suffix", "-RELEASE")
- }
-})
-
-object Release_Release : BuildType({
- templates(AbsoluteId("LetSDevTogether_BuildWithRelease"))
- name = "Release"
- description = "Releases the mod as Release to CurseForge"
-
- allowExternalStatus = true
-
- params {
- param("env.Version.Patch", "${OfficialPublications_CommonB.depParamRefs.buildNumber}")
- }
-
- steps {
- gradle {
- name = "Compile"
- id = "RUNNER_9"
- tasks = "build createChangelog curseforge publish"
- buildFile = "build.gradle"
- enableStacktrace = true
- param("org.jfrog.artifactory.selectedDeployableServer.deployReleaseText", "%Project.Type%")
- param("org.jfrog.artifactory.selectedDeployableServer.publishBuildInfo", "true")
- param("org.jfrog.artifactory.selectedDeployableServer.defaultModuleVersionConfiguration", "GLOBAL")
- param("org.jfrog.artifactory.selectedDeployableServer.urlId", "2")
- param("org.jfrog.artifactory.selectedDeployableServer.envVarsExcludePatterns", "*password*,*secret*")
- param("org.jfrog.artifactory.selectedDeployableServer.resolvingRepo", "modding")
- param("org.jfrog.artifactory.selectedDeployableServer.deployReleaseFlag", "true")
- param("org.jfrog.artifactory.selectedDeployableServer.targetRepo", "libraries")
- }
- stepsOrder = arrayListOf("RUNNER_85", "RUNNER_9")
- }
-
- features {
- vcsLabeling {
- id = "BUILD_EXT_11"
- vcsRootId = "${DslContext.settingsRoot.id}"
- labelingPattern = "%env.Version%"
- successfulOnly = true
- branchFilter = ""
- }
- commitStatusPublisher {
- id = "BUILD_EXT_15"
- enabled = false
- vcsRootExtId = "${DslContext.settingsRoot.id}"
- publisher = upsource {
- serverUrl = "https://code-analysis.ldtteam.com"
- projectId = "%Upsource.Project.Id%"
- userName = "upsource"
- password = "credentialsJSON:f19631a7-1bc1-4a66-88a0-dc2b9cd36734"
- }
- }
- }
-
- dependencies {
- snapshot(OfficialPublications_CommonB) {
- reuseBuilds = ReuseBuilds.NO
- onDependencyFailure = FailureAction.FAIL_TO_START
- }
- }
-})
-
-object Branches : Project({
- name = "Branches"
- description = "All none release branches."
-
- buildType(Branches_Common)
- buildType(Branches_Build)
-
- params {
- text("Default.Branch", "version/%Current Minecraft Version%", label = "Default branch", description = "The default branch for branch builds", allowEmpty = true)
- param("VCS.Branches", """
- +:refs/heads/(*)
- -:refs/heads/version/*
- -:refs/heads/release/*
- -:refs/pull/*/head
- -:refs/heads/CI/*
- """.trimIndent())
- param("env.Version.Suffix", "-PERSONAL")
- }
-
- cleanup {
- baseRule {
- all(days = 60)
- }
- }
-})
-
-object Branches_Build : BuildType({
- templates(AbsoluteId("LetSDevTogether_Build"))
- name = "Build"
- description = "Builds the branch without testing."
-
- params {
- param("Project.Type", "mods")
- param("env.Version.Patch", "${Branches_Common.depParamRefs.buildNumber}")
- }
-
- triggers {
- vcs {
- id = "vcsTrigger"
- }
- }
-
- dependencies {
- snapshot(Branches_Common) {
- reuseBuilds = ReuseBuilds.NO
- onDependencyFailure = FailureAction.FAIL_TO_START
- }
- }
-
- disableSettings("BUILD_EXT_14")
-})
-
-object Branches_Common : BuildType({
- templates(AbsoluteId("LetSDevTogether_CommonBuildCounter"))
- name = "Common Build Counter"
- description = "Tracks the amount of builds run for branches"
-})
-
-
-object OfficialPublications : Project({
- name = "Official Publications"
- description = "Holds projects and builds related to official publications"
-
- buildType(OfficialPublications_CommonB)
-})
-
-object OfficialPublications_CommonB : BuildType({
- templates(AbsoluteId("LetSDevTogether_CommonBuildCounter"))
- name = "Common Build Counter"
- description = "Represents the version counter within Structurize for official releases."
-})
-
-
-object PullRequests_2 : Project({
- name = "Pull Requests"
- description = "All open pull requests"
-
- buildType(PullRequests_2_BuildAndTest)
- buildType(PullRequests_2_CommonBuildCounter)
-
- params {
- text("Default.Branch", "version/%Current Minecraft Version%", label = "Default branch", description = "The default branch for pull requests.", allowEmpty = false)
- param("VCS.Branches", """
- -:refs/heads/*
- +:refs/pull/(*)/head
- -:refs/heads/(CI/*)
- """.trimIndent())
- param("env.Version", "%env.Version.Major%.%env.Version.Minor%.%build.counter%-PR")
- }
-
- cleanup {
- baseRule {
- all(days = 60)
- }
- }
-})
-
-object PullRequests_2_BuildAndTest : BuildType({
- templates(AbsoluteId("LetSDevTogether_BuildWithTesting"))
- name = "Build and Test"
- description = "Builds and Tests the pull request."
-
- artifactRules = """
- +:build\libs\*.jar => build\libs
- +:build\distributions\mods-*.zip => build\distributions
- """.trimIndent()
-
- params {
- param("env.Version.Patch", "${PullRequests_2_CommonBuildCounter.depParamRefs.buildNumber}")
- param("env.Version.Suffix", "-PR")
- }
-
- features {
- feature {
- id = "com.ldtteam.teamcity.github.commenting.GithubCommentingBuildFeature"
- type = "com.ldtteam.teamcity.github.commenting.GithubCommentingBuildFeature"
- param("privateKey", "-----")
- param("appId", "154983")
- param("branch", "%teamcity.build.branch%")
- }
- }
-
- dependencies {
- snapshot(PullRequests_2_CommonBuildCounter) {
- onDependencyFailure = FailureAction.FAIL_TO_START
- }
- }
-
- disableSettings("BUILD_EXT_15")
-})
-
-object PullRequests_2_CommonBuildCounter : BuildType({
- templates(AbsoluteId("LetSDevTogether_CommonBuildCounter"))
- name = "Common Build Counter"
- description = "Defines version numbers uniquely over all Pull Request builds"
-})
-
-object UpgradeBetaRelease : Project({
- name = "Upgrade Beta -> Release"
- description = "Upgrades the current Beta to Release"
-
- buildType(UpgradeBetaRelease_UpgradeBetaRelease)
-})
-
-object UpgradeBetaRelease_UpgradeBetaRelease : BuildType({
- templates(AbsoluteId("LetSDevTogether_Upgrade"))
- name = "Upgrade Beta -> Release"
- description = "Upgrades the current Beta to Release."
-
- params {
- param("Source.Branch", "version")
- param("Default.Branch", "release/%Current Minecraft Version%")
- param("VCS.Branches", "+:refs/heads/release/(*)")
- param("Target.Branch", "release")
- param("env.Version", "%env.Version.Major%.%env.Version.Minor%.%build.counter%-RELEASE")
- }
-})
diff --git a/README.md b/README.md
index 69ec0b814f..aee0f8bf86 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
+[![Structurize CurseForge](https://img.shields.io/curseforge/dt/298744?logo=curseforge&color=F16436&label=Structurize)](https://www.curseforge.com/minecraft/mc-mods/structurize)
+[![Release 1.20.1](https://img.shields.io/github/actions/workflow/status/ldtteam/minecolonies/release.yml?branch=version%2Fmain&label=Build%201.20.1&event=push)](https://github.com/ldtteam/Structurize/actions/workflows/release.yml?query=branch%3Aversion%2Fmain+event%3Apush)
+[![Release 1.21.1](https://img.shields.io/github/actions/workflow/status/ldtteam/minecolonies/release.yml?branch=version%2F1.21&label=Build%201.21.1&event=push)](https://github.com/ldtteam/Structurize/actions/workflows/release.yml?query=branch%3Aversion%2F1.21+event%3Apush)
[![CLA assistant](https://cla-assistant.io/readme/badge/ldtteam/structurize)](https://cla-assistant.io/ldtteam/structurize)
-[![Build Status](https://buildsystem.ldtteam.com/app/rest/builds/buildType:LetSDevTogether_Structurize_Alpha_Release/statusIcon)](http://buildsystem.ldtteam.com/)
[![Crowdin](https://badges.crowdin.net/structurize/localized.svg)](https://crowdin.com/project/structurize)
![structurize logo](structurize.png)
diff --git a/build.gradle b/build.gradle
index 9f6103d493..265b102c01 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,29 +1 @@
-buildscript {
- repositories {
- maven { url = 'https://files.minecraftforge.net/maven' }
- mavenLocal()
- mavenCentral()
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
- dependencies {
- classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.0+', changing: true
- classpath "gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0"
- classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.4.0"
- classpath 'de.undercouch:gradle-download-task:4.1.2'
- }
-}
-
apply from: 'https://raw.githubusercontent.com/ldtteam/OperaPublicaCreator/main/gradle/mod.gradle'
-
-configurations {
- library
- implementation.extendsFrom library
-}
-
-minecraft.runs.all {
- lazyToken('minecraft_classpath') {
- configurations.library.copyRecursive().resolve().collect { it.absolutePath }.join(File.pathSeparator)
- }
-}
diff --git a/gradle.properties b/gradle.properties
index 203b063574..98ac429c6c 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -27,10 +27,10 @@ additionalMinecraftVersions=
mappingsChannel=official
mappingsVersion=1.20.1
-blockUiVersion=1.20.1-0.0.98-ALPHA
+blockUiVersion=1.20.1-1.0.156-RELEASE
blockUiRange=[1.20.1-0.0.98-ALPHA,)
-domumOrnamentumVersion=1.20-1.0.159-BETA
+domumOrnamentumVersion=1.20.1-1.0.199-BETA
domumOrnamentumRange=[1.20-1.0.93-ALPHA,)
githubUrl=https://github.com/ldtteam/Structurize
diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle
index 49a196baa1..02d71ca160 100644
--- a/gradle/dependencies.gradle
+++ b/gradle/dependencies.gradle
@@ -1,12 +1,3 @@
-repositories {
- maven { url = 'https://files.minecraftforge.net/maven' }
- mavenLocal()
- mavenCentral()
- maven {
- url "https://plugins.gradle.org/m2/"
- }
-}
-
dependencies {
apiImplementation fg.deobf("com.ldtteam:blockui:${project.blockUiVersion}")
implementation fg.deobf("com.ldtteam:blockui:${project.blockUiVersion}")
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 943f0cbfa7..2c3521197d 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 37aef8d3f0..09523c0e54 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index aeb74cbb43..f5feea6d6b 100755
--- a/gradlew
+++ b/gradlew
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+# SPDX-License-Identifier: Apache-2.0
+#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (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.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,7 +85,9 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
+' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -130,10 +134,13 @@ location of your Java installation."
fi
else
JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
+ fi
fi
# Increase the maximum file descriptors if we can.
@@ -141,7 +148,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
+ # shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -149,7 +156,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
+ # shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -198,11 +205,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-# Collect all arguments for the java command;
-# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
-# shell script including quotes and variable substitutions, so put them in
-# double quotes to make sure that they get re-expanded; and
-# * put everything else in single quotes, so that it's not re-expanded.
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
diff --git a/gradlew.bat b/gradlew.bat
index 93e3f59f13..9d21a21834 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
diff --git a/src/main/java/com/ldtteam/structurize/client/BlueprintHandler.java b/src/main/java/com/ldtteam/structurize/client/BlueprintHandler.java
index fdfc692562..0b7787072c 100644
--- a/src/main/java/com/ldtteam/structurize/client/BlueprintHandler.java
+++ b/src/main/java/com/ldtteam/structurize/client/BlueprintHandler.java
@@ -7,6 +7,7 @@
import com.ldtteam.structurize.storage.rendering.types.BlueprintPreviewData;
import net.minecraft.client.Minecraft;
import net.minecraft.core.BlockPos;
+import net.minecraft.world.phys.Vec3;
import net.minecraftforge.client.event.RenderLevelStageEvent;
import java.util.List;
@@ -70,6 +71,20 @@ public static BlueprintHandler getInstance()
* @param ctx rendering event
*/
public void draw(final BlueprintPreviewData previewData, final BlockPos pos, final RenderLevelStageEvent ctx)
+ {
+ final Vec3 viewPosition = Minecraft.getInstance().gameRenderer.getMainCamera().getPosition();
+ ctx.getPoseStack().pushPose();
+ ctx.getPoseStack().translate(viewPosition.x(), viewPosition.y(), viewPosition.z());
+
+ internalBackportDraw(previewData, pos, ctx);
+
+ ctx.getPoseStack().popPose();
+ }
+
+ /**
+ * DO NOT USE IN MCOL
+ */
+ public void internalBackportDraw(final BlueprintPreviewData previewData, final BlockPos pos, final RenderLevelStageEvent ctx)
{
if (previewData == null || previewData.getBlueprint() == null)
{
@@ -119,10 +134,14 @@ public void drawAtListOfPositions(final BlueprintPreviewData previewData,
final BlueprintRenderer renderer = rendererCache.getUnchecked(previewData.getRenderKey());
+ final Vec3 viewPosition = Minecraft.getInstance().gameRenderer.getMainCamera().getPosition();
+ ctx.getPoseStack().pushPose();
+ ctx.getPoseStack().translate(viewPosition.x(), viewPosition.y(), viewPosition.z());
for (final BlockPos coord : points)
{
renderer.draw(previewData, coord, ctx);
}
+ ctx.getPoseStack().popPose();
Minecraft.getInstance().getProfiler().pop();
}
diff --git a/src/main/java/com/ldtteam/structurize/client/BlueprintRenderer.java b/src/main/java/com/ldtteam/structurize/client/BlueprintRenderer.java
index b896fa55f8..42d8c13267 100644
--- a/src/main/java/com/ldtteam/structurize/client/BlueprintRenderer.java
+++ b/src/main/java/com/ldtteam/structurize/client/BlueprintRenderer.java
@@ -304,6 +304,8 @@ public Map