From 68fea1db1eff64b214823fcbfbac22523337c221 Mon Sep 17 00:00:00 2001 From: "orbit-brancher[bot]" <169901335+orbit-brancher[bot]@users.noreply.github.com> Date: Sun, 9 Jun 2024 19:55:05 +0200 Subject: [PATCH] [DEV] Fix some jenkins configs (#10) * [no-orbit] [DEV] Fix some jenkins configs * [DEV] Fix Patches and use correct MCFormatter versions for older MC versions * [CHORE] Update readme and remove GitHub action --------- Co-authored-by: fdd-orbit Co-authored-by: hypherionmc --- .github/workflows/test-orbit-pr.yml | 50 -------- README.md | 19 ++- commit.sha | 2 +- .../1.18.2/.jenkins/Jenkinsfile.deploy.patch | 6 +- .../.jenkins/Jenkinsfile.snapshot.patch | 12 +- patches/1.18.2/Common/gradle.properties.patch | 5 + .../gui/config/CraterConfigScreen.java.patch | 110 +++++++++++++++-- .../resources/ResourceIdentifier.java.patch | 16 +++ patches/1.18.2/Fabric/build.gradle.patch | 4 +- .../src/main/resources/fabric.mod.json.patch | 2 +- patches/1.18.2/NeoForge/build.gradle.patch | 6 +- .../META-INF/neoforge.mods.toml.patch | 4 +- patches/1.18.2/README.md.patch | 11 ++ patches/1.18.2/gradle.properties.patch | 16 ++- patches/1.18.2/orbit.json.patch | 7 ++ patches/1.18.2/settings.gradle.patch | 2 +- .../1.19.2/.jenkins/Jenkinsfile.deploy.patch | 6 +- .../.jenkins/Jenkinsfile.snapshot.patch | 12 +- patches/1.19.2/Common/gradle.properties.patch | 5 + .../gui/config/CraterConfigScreen.java.patch | 112 ++++++++++++++++-- .../resources/ResourceIdentifier.java.patch | 16 +++ patches/1.19.2/Fabric/build.gradle.patch | 4 +- .../src/main/resources/fabric.mod.json.patch | 2 +- patches/1.19.2/NeoForge/build.gradle.patch | 6 +- .../META-INF/neoforge.mods.toml.patch | 4 +- patches/1.19.2/README.md.patch | 11 ++ patches/1.19.2/gradle.properties.patch | 16 ++- patches/1.19.2/orbit.json.patch | 7 ++ patches/1.19.2/settings.gradle.patch | 2 +- .../1.19.3/.jenkins/Jenkinsfile.deploy.patch | 6 +- .../.jenkins/Jenkinsfile.snapshot.patch | 10 +- patches/1.19.3/Common/gradle.properties.patch | 5 + .../gui/config/CraterConfigScreen.java.patch | 112 ++++++++++++++++-- .../resources/ResourceIdentifier.java.patch | 16 +++ patches/1.19.3/Fabric/build.gradle.patch | 4 +- .../src/main/resources/fabric.mod.json.patch | 2 +- patches/1.19.3/NeoForge/build.gradle.patch | 6 +- .../META-INF/neoforge.mods.toml.patch | 4 +- patches/1.19.3/README.md.patch | 11 ++ patches/1.19.3/gradle.properties.patch | 16 ++- patches/1.19.3/orbit.json.patch | 7 ++ patches/1.19.3/settings.gradle.patch | 2 +- .../1.20.2/.jenkins/Jenkinsfile.deploy.patch | 6 +- .../.jenkins/Jenkinsfile.snapshot.patch | 12 +- patches/1.20.2/Common/gradle.properties.patch | 5 + .../gui/config/CraterConfigScreen.java.patch | 106 ++++++++++++++++- .../resources/ResourceIdentifier.java.patch | 16 +++ patches/1.20.2/Fabric/build.gradle.patch | 4 +- .../src/main/resources/fabric.mod.json.patch | 2 +- patches/1.20.2/NeoForge/build.gradle.patch | 6 +- .../META-INF/neoforge.mods.toml.patch | 4 +- patches/1.20.2/README.md.patch | 11 ++ patches/1.20.2/gradle.properties.patch | 16 ++- patches/1.20.2/orbit.json.patch | 7 ++ patches/1.20.2/settings.gradle.patch | 2 +- .../1.20.4/.jenkins/Jenkinsfile.deploy.patch | 6 +- .../.jenkins/Jenkinsfile.snapshot.patch | 10 +- patches/1.20.4/Common/gradle.properties.patch | 5 + .../gui/config/CraterConfigScreen.java.patch | 106 ++++++++++++++++- .../resources/ResourceIdentifier.java.patch | 16 +++ patches/1.20.4/Fabric/build.gradle.patch | 4 +- .../src/main/resources/fabric.mod.json.patch | 2 +- patches/1.20.4/NeoForge/build.gradle.patch | 13 +- .../META-INF/neoforge.mods.toml.patch | 4 +- patches/1.20.4/README.md.patch | 11 ++ patches/1.20.4/gradle.properties.patch | 17 ++- patches/1.20.4/orbit.json.patch | 7 ++ patches/1.20.4/settings.gradle.patch | 8 ++ .../1.20/.jenkins/Jenkinsfile.deploy.patch | 6 +- .../1.20/.jenkins/Jenkinsfile.snapshot.patch | 12 +- patches/1.20/Common/gradle.properties.patch | 5 + .../gui/config/CraterConfigScreen.java.patch | 108 ++++++++++++++++- .../resources/ResourceIdentifier.java.patch | 16 +++ patches/1.20/Fabric/build.gradle.patch | 4 +- .../src/main/resources/fabric.mod.json.patch | 2 +- patches/1.20/NeoForge/build.gradle.patch | 6 +- .../META-INF/neoforge.mods.toml.patch | 4 +- patches/1.20/README.md.patch | 11 ++ patches/1.20/gradle.properties.patch | 16 ++- patches/1.20/orbit.json.patch | 7 ++ patches/1.20/settings.gradle.patch | 2 +- 81 files changed, 1058 insertions(+), 223 deletions(-) delete mode 100644 .github/workflows/test-orbit-pr.yml create mode 100644 patches/1.18.2/Common/gradle.properties.patch create mode 100644 patches/1.18.2/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch create mode 100644 patches/1.18.2/README.md.patch create mode 100644 patches/1.18.2/orbit.json.patch create mode 100644 patches/1.19.2/Common/gradle.properties.patch create mode 100644 patches/1.19.2/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch create mode 100644 patches/1.19.2/README.md.patch create mode 100644 patches/1.19.2/orbit.json.patch create mode 100644 patches/1.19.3/Common/gradle.properties.patch create mode 100644 patches/1.19.3/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch create mode 100644 patches/1.19.3/README.md.patch create mode 100644 patches/1.19.3/orbit.json.patch create mode 100644 patches/1.20.2/Common/gradle.properties.patch create mode 100644 patches/1.20.2/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch create mode 100644 patches/1.20.2/README.md.patch create mode 100644 patches/1.20.2/orbit.json.patch create mode 100644 patches/1.20.4/Common/gradle.properties.patch create mode 100644 patches/1.20.4/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch create mode 100644 patches/1.20.4/README.md.patch create mode 100644 patches/1.20.4/orbit.json.patch create mode 100644 patches/1.20.4/settings.gradle.patch create mode 100644 patches/1.20/Common/gradle.properties.patch create mode 100644 patches/1.20/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch create mode 100644 patches/1.20/README.md.patch create mode 100644 patches/1.20/orbit.json.patch diff --git a/.github/workflows/test-orbit-pr.yml b/.github/workflows/test-orbit-pr.yml deleted file mode 100644 index 35712a5..0000000 --- a/.github/workflows/test-orbit-pr.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Test Orbit Auto PR - -on: - pull_request: - branches: - - porting - -jobs: - run-gradle-taks: - runs-on: self-hosted - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Fetch all branches and tags - run: git fetch --all - - - name: Set Up JDK - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 17 - - - name: Cache Gradle dependencies - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Setup Workspace - run: chmod +x ./gradle && ./gradlew setupWorkspace - - - name: Test LTS Branches - run: | - for dir in dev/*/ ; do - if [ -d "$dir" ]; then - echo "Running Gradle build for $dir" - cd "$dir" - chmod +x ./gradlew - ./gradlew build - cd - - fi - done \ No newline at end of file diff --git a/README.md b/README.md index c7b5a68..817be6c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,20 @@ # CraterLib -This is a branch for porting automation. Commits and Pull Requests should NEVER target this branch directly \ No newline at end of file +This is a branch for porting automation. Commits and Pull Requests should NEVER target this branch directly + +### Supported Minecraft Versions + +| Minecraft Version | Support Status | +|-------------------| -------------- | +| < 1.18.2 | ❌ | +| 1.18.2-1.20.2 | ✳️ | +| 1.20.4 | ✳️ | +| 1.20.5/6 | ❌ | +| 1.21 | 🚧 | + +- ❌ - Not Supported; no bug fixes or new features. +- 🚧 - Work in Progress; not ready for release. +- ✳️ - Long Term Support; receives changes through backports only. +- ✅ - In Support; the active version, receiving all bugfixes and features directly. + +*** \ No newline at end of file diff --git a/commit.sha b/commit.sha index fcd447c..35b3f69 100644 --- a/commit.sha +++ b/commit.sha @@ -1 +1 @@ -55c6f60197e1b916ecb6b1e84747838c9e4c1c67 \ No newline at end of file +648441ec78fbc0cfadcd398a85f54f2723f4a081 \ No newline at end of file diff --git a/patches/1.18.2/.jenkins/Jenkinsfile.deploy.patch b/patches/1.18.2/.jenkins/Jenkinsfile.deploy.patch index 0876dbb..52d9953 100644 --- a/patches/1.18.2/.jenkins/Jenkinsfile.deploy.patch +++ b/patches/1.18.2/.jenkins/Jenkinsfile.deploy.patch @@ -7,9 +7,9 @@ - image "registry.firstdark.dev/java21:latest" + image "registry.firstdark.dev/java17:latest" alwaysPull true + args '-v gradle-cache:/home/gradle/.gradle' } - } -@@ -10,7 +10,7 @@ +@@ -15,7 +15,7 @@ stage("Notify Discord") { steps { discordSend webhookURL: env.FDD_WH_ADMIN, @@ -18,7 +18,7 @@ link: env.BUILD_URL, result: 'SUCCESS', description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})" -@@ -39,7 +39,7 @@ +@@ -44,7 +44,7 @@ deleteDir() discordSend webhookURL: env.FDD_WH_ADMIN, diff --git a/patches/1.18.2/.jenkins/Jenkinsfile.snapshot.patch b/patches/1.18.2/.jenkins/Jenkinsfile.snapshot.patch index e4a54ea..81daeba 100644 --- a/patches/1.18.2/.jenkins/Jenkinsfile.snapshot.patch +++ b/patches/1.18.2/.jenkins/Jenkinsfile.snapshot.patch @@ -11,9 +11,9 @@ - image "registry.firstdark.dev/java21:latest" + image "registry.firstdark.dev/java17:latest" alwaysPull true + args '-v gradle-cache:/home/gradle/.gradle' } - } -@@ -13,7 +14,7 @@ +@@ -18,7 +19,7 @@ stage("Notify Discord") { steps { discordSend webhookURL: env.SSS_WEBHOOK, @@ -22,7 +22,7 @@ link: env.BUILD_URL, result: 'SUCCESS', description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})" -@@ -29,14 +30,14 @@ +@@ -34,14 +35,14 @@ stage("Build") { steps { @@ -39,12 +39,12 @@ } } } -@@ -51,8 +52,8 @@ +@@ -56,8 +57,8 @@ projectSlug: "craterlib", projectName: "${projectName}", projectIcon: "${projectIcon}", -- modLoaders: "forge|neoforge|fabric|quilt", -- minecraftVersions: "1.20.6", +- modLoaders: "neoforge|fabric|quilt", +- minecraftVersions: "1.21", + modLoaders: "forge|fabric|quilt", + minecraftVersions: "1.18.2", failWebhook: env.SSS_WEBHOOK, diff --git a/patches/1.18.2/Common/gradle.properties.patch b/patches/1.18.2/Common/gradle.properties.patch new file mode 100644 index 0000000..cd35d4f --- /dev/null +++ b/patches/1.18.2/Common/gradle.properties.patch @@ -0,0 +1,5 @@ +--- a/Common/gradle.properties ++++ /dev/null +@@ -1,2 +1,0 @@ +-# We don't need the common jar to be remapped +-fabric.loom.dontRemap=true diff --git a/patches/1.18.2/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch b/patches/1.18.2/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch index 1d21d7a..4f8722e 100644 --- a/patches/1.18.2/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch +++ b/patches/1.18.2/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch @@ -55,6 +55,15 @@ val, () -> val, (ret) -> { +@@ -158,7 +159,7 @@ + return new TextConfigOption<>(Objects::toString, BigDecimal::new); + } + if (value instanceof ResourceLocation) { +- return new TextConfigOption<>(Objects::toString, ResourceLocation::parse); ++ return new TextConfigOption<>(Objects::toString, ResourceLocation::new); + } + if (isSubConfig) { + return new SubConfigWidget<>(config, this, value); @@ -172,24 +173,24 @@ ((List) children()).addAll(options); @@ -92,19 +101,106 @@ int y = (int) (TOP + 4 - Math.round(scrollerAmount)); for (Option option : options) { -@@ -268,9 +269,9 @@ +@@ -216,23 +217,24 @@ + int maxY = this.height - BOTTOM; + //RenderSystem.disableTexture(); + Tesselator tesselator = Tesselator.getInstance(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.setShader(GameRenderer::getPositionColorShader); +- +- buffer.addVertex(scrollbarPositionMinX, maxY, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMaxX, maxY, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMaxX, TOP, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMinX, TOP, 0.0f).setColor(0, 0, 0, 255); +- +- buffer.addVertex(scrollbarPositionMinX, minY + height, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMaxX, minY + height, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMaxX, minY, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, minY, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, (minY + height - 1), 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex((scrollbarPositionMaxX - 1), (minY + height - 1), 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex((scrollbarPositionMaxX - 1), minY, 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, minY, 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); ++ ++ buffer.vertex(scrollbarPositionMinX, maxY, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, maxY, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, TOP, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, TOP, 0.0D).color(0, 0, 0, 255).endVertex(); ++ ++ buffer.vertex(scrollbarPositionMinX, minY + height, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, minY + height, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, minY, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, minY, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, (minY + height - 1), 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex((scrollbarPositionMaxX - 1), (minY + height - 1), 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex((scrollbarPositionMaxX - 1), minY, 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, minY, 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ tesselator.end(); + RenderSystem.disableBlend(); + //RenderSystem.enableTexture(); + } +@@ -240,21 +242,22 @@ + + private void renderShadow(PoseStack matrices) { + Tesselator tesselator = Tesselator.getInstance(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.enableBlend(); + RenderSystem.blendFuncSeparate(770, 771, 0, 1); + //RenderSystem.disableTexture(); + RenderSystem.setShader(GameRenderer::getPositionTexColorShader); + Matrix4f matrix = matrices.last().pose(); +- buffer.addVertex(matrix, 0, TOP + 4, 0.0F).setUv(0, 1).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, width, TOP + 4, 0.0F).setUv(1, 1).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, width, TOP, 0.0F).setUv(1, 0).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, 0, TOP, 0.0F).setUv(0, 0).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, 0, height - BOTTOM, 0.0F).setUv(0, 1).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, width, height - BOTTOM, 0.0F).setUv(1, 1).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, width, height - BOTTOM - 4, 0.0F).setUv(1, 0).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, 0, height - BOTTOM - 4, 0.0F).setUv(0, 0).setColor(0, 0, 0, 0); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ buffer.vertex(matrix, 0, TOP + 4, 0.0F).uv(0, 1).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, width, TOP + 4, 0.0F).uv(1, 1).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, width, TOP, 0.0F).uv(1, 0).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, 0, TOP, 0.0F).uv(0, 0).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, 0, height - BOTTOM, 0.0F).uv(0, 1).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, width, height - BOTTOM, 0.0F).uv(1, 1).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, width, height - BOTTOM - 4, 0.0F).uv(1, 0).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, 0, height - BOTTOM - 4, 0.0F).uv(0, 0).color(0, 0, 0, 0).endVertex(); ++ tesselator.end(); + //RenderSystem.enableTexture(); + RenderSystem.disableBlend(); + } +@@ -265,15 +268,16 @@ + protected void overlayBackground(Matrix4f matrix, int minX, int minY, int maxX, int maxY, int red, int green, int blue, int startAlpha, int endAlpha) { Tesselator tesselator = Tesselator.getInstance(); - BufferBuilder buffer = tesselator.getBuilder(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - RenderSystem.setShader(GameRenderer::getPositionTexColorShader); - RenderSystem.setShaderTexture(0, Screen.MENU_BACKGROUND); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.setShaderTexture(0, Screen.BACKGROUND_LOCATION); RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f); +- buffer.addVertex(matrix, minX, maxY, 0.0F).setUv(minX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha); +- buffer.addVertex(matrix, maxX, maxY, 0.0F).setUv(maxX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha); +- buffer.addVertex(matrix, maxX, minY, 0.0F).setUv(maxX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha); +- buffer.addVertex(matrix, minX, minY, 0.0F).setUv(minX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); + RenderSystem.setShader(GameRenderer::getPositionTexColorShader); - buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - buffer.vertex(matrix, minX, maxY, 0.0F).uv(minX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); - buffer.vertex(matrix, maxX, maxY, 0.0F).uv(maxX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); -@@ -324,22 +325,22 @@ ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ buffer.vertex(matrix, minX, maxY, 0.0F).uv(minX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); ++ buffer.vertex(matrix, maxX, maxY, 0.0F).uv(maxX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); ++ buffer.vertex(matrix, maxX, minY, 0.0F).uv(maxX / 32.0F, minY / 32.0F).color(red, green, blue, startAlpha).endVertex(); ++ buffer.vertex(matrix, minX, minY, 0.0F).uv(minX / 32.0F, minY / 32.0F).color(red, green, blue, startAlpha).endVertex(); ++ tesselator.end(); + } + + public int scrollHeight() { +@@ -321,22 +325,22 @@ @Override public void onClose() { if (isEdited()) { @@ -133,7 +229,7 @@ } @Override -@@ -378,15 +379,15 @@ +@@ -375,15 +379,15 @@ } } diff --git a/patches/1.18.2/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch b/patches/1.18.2/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch new file mode 100644 index 0000000..b8e086e --- /dev/null +++ b/patches/1.18.2/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch @@ -0,0 +1,16 @@ +--- a/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java ++++ b/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java +@@ -7,11 +7,11 @@ + private final ResourceLocation internal; + + public ResourceIdentifier(String namespace, String path) { +- this.internal = ResourceLocation.fromNamespaceAndPath(namespace, path); ++ this.internal = new ResourceLocation(namespace, path); + } + + public ResourceIdentifier(String path) { +- this.internal = ResourceLocation.withDefaultNamespace(path); ++ this.internal = new ResourceLocation(path); + } + + public String getNamespace() { diff --git a/patches/1.18.2/Fabric/build.gradle.patch b/patches/1.18.2/Fabric/build.gradle.patch index 5b3e583..6d7af80 100644 --- a/patches/1.18.2/Fabric/build.gradle.patch +++ b/patches/1.18.2/Fabric/build.gradle.patch @@ -4,8 +4,8 @@ setVersionType("release") setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-fabric.md") setProjectVersion("${minecraft_version}-${project.version}") -- setDisplayName("[FABRIC/QUILT 1.20.6] CraterLib - ${project.version}") -- setGameVersions("1.20.6") +- setDisplayName("[FABRIC/QUILT 1.21.0] CraterLib - ${project.version}") +- setGameVersions("1.21") + setDisplayName("[FABRIC/QUILT 1.18.2] CraterLib - ${project.version}") + setGameVersions("1.18.2") setLoaders("fabric", "quilt") diff --git a/patches/1.18.2/Fabric/src/main/resources/fabric.mod.json.patch b/patches/1.18.2/Fabric/src/main/resources/fabric.mod.json.patch index 33b8a1c..b011ce0 100644 --- a/patches/1.18.2/Fabric/src/main/resources/fabric.mod.json.patch +++ b/patches/1.18.2/Fabric/src/main/resources/fabric.mod.json.patch @@ -4,7 +4,7 @@ "depends": { "fabricloader": ">=0.15.0", "fabric-api": "*", -- "minecraft": ">=1.20.6", +- "minecraft": ">=1.21", - "java": ">=21" + "minecraft": "1.18.2", + "java": ">=17" diff --git a/patches/1.18.2/NeoForge/build.gradle.patch b/patches/1.18.2/NeoForge/build.gradle.patch index 6d6a100..1e3bedc 100644 --- a/patches/1.18.2/NeoForge/build.gradle.patch +++ b/patches/1.18.2/NeoForge/build.gradle.patch @@ -34,7 +34,7 @@ - -unimined.minecraft { - neoForged { -- loader neoforge_version +- loader "net.neoforged:neoforge:${neoforge_version}:universal" - mixinConfig("${mod_id}.mixins.json", "${mod_id}.neoforge.mixins.json") - } -} @@ -106,8 +106,8 @@ - setVersionType("release") - setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-forge.md") - setProjectVersion("${minecraft_version}-${project.version}") -- setDisplayName("[NeoForge 1.20.6] CraterLib - ${project.version}") -- setGameVersions("1.20.6") +- setDisplayName("[NeoForge 1.21.0] CraterLib - ${project.version}") +- setGameVersions("1.21") - setLoaders("neoforge") - setArtifact(remapJar) - setCurseEnvironment("both") diff --git a/patches/1.18.2/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch b/patches/1.18.2/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch index 27e2e32..e811538 100644 --- a/patches/1.18.2/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch +++ b/patches/1.18.2/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch @@ -22,13 +22,13 @@ -[[dependencies.${ mod_id }]] - modId = "neoforge" - type="required" -- versionRange = "[20.6,)" +- versionRange = "[21.0,)" - ordering = "NONE" - side = "BOTH" - -[[dependencies.${ mod_id }]] - modId = "minecraft" - type="required" -- versionRange = "[1.20.6,1.21)" +- versionRange = "[*,)" - ordering = "NONE" - side = "BOTH" diff --git a/patches/1.18.2/README.md.patch b/patches/1.18.2/README.md.patch new file mode 100644 index 0000000..e51d5b3 --- /dev/null +++ b/patches/1.18.2/README.md.patch @@ -0,0 +1,11 @@ +--- a/README.md ++++ b/README.md +@@ -15,7 +15,7 @@ + | < 1.18.2 | ❌ | + | 1.18.2-1.20.2 | ✳️ | + | 1.20.4 | ✳️ | +-| 1.20.6 | 🚧 | ++| 1.21 | 🚧 | + + - ❌ - Not Supported; no bug fixes or new features. + - 🚧 - Work in Progress; not ready for release. diff --git a/patches/1.18.2/gradle.properties.patch b/patches/1.18.2/gradle.properties.patch index 8212a3f..59ae860 100644 --- a/patches/1.18.2/gradle.properties.patch +++ b/patches/1.18.2/gradle.properties.patch @@ -4,25 +4,25 @@ mod_name=CraterLib # Shared --minecraft_version=1.20.6 +-minecraft_version=1.21-pre4 +minecraft_version=1.18.2 project_group=com.hypherionmc.craterlib # Fabric - fabric_loader=0.15.0 --fabric_api=0.97.8+1.20.6 + fabric_loader=0.15.11 +-fabric_api=0.100.0+1.21 +fabric_api=0.76.0+1.18.2 # Forge -forge_version=50.0.6 - -# NeoForged --neoforge_version=41-beta +-neoforge_version=21.0.0-alpha.1.21-pre4.20240609.095301 +forge_version=40.2.0 # Dependencies moon_config=1.0.9 -@@ -30,11 +27,10 @@ +@@ -30,16 +27,15 @@ discord_formatter=2.0.0 # Mod Dependencies @@ -38,3 +38,9 @@ # Publishing curse_id=867099 + modrinth_id=Nn8Wasaq +-release_type=port ++release_type=release + + # Gradle + org.gradle.jvmargs=-Xmx3G diff --git a/patches/1.18.2/orbit.json.patch b/patches/1.18.2/orbit.json.patch new file mode 100644 index 0000000..4f0263d --- /dev/null +++ b/patches/1.18.2/orbit.json.patch @@ -0,0 +1,7 @@ +--- a/orbit.json ++++ /dev/null +@@ -1,4 +1,0 @@ +-{ +- "action": "port", +- "devBranch": "porting" +-} diff --git a/patches/1.18.2/settings.gradle.patch b/patches/1.18.2/settings.gradle.patch index 671df0b..b23adaa 100644 --- a/patches/1.18.2/settings.gradle.patch +++ b/patches/1.18.2/settings.gradle.patch @@ -4,5 +4,5 @@ } rootProject.name = 'CraterLib' --include("Common", "Fabric", "NeoForge", "Forge") +-include("Common", "Fabric", "NeoForge") +include("Common", "Fabric", "Forge") diff --git a/patches/1.19.2/.jenkins/Jenkinsfile.deploy.patch b/patches/1.19.2/.jenkins/Jenkinsfile.deploy.patch index 1b3669c..2090d87 100644 --- a/patches/1.19.2/.jenkins/Jenkinsfile.deploy.patch +++ b/patches/1.19.2/.jenkins/Jenkinsfile.deploy.patch @@ -7,9 +7,9 @@ - image "registry.firstdark.dev/java21:latest" + image "registry.firstdark.dev/java17:latest" alwaysPull true + args '-v gradle-cache:/home/gradle/.gradle' } - } -@@ -10,7 +10,7 @@ +@@ -15,7 +15,7 @@ stage("Notify Discord") { steps { discordSend webhookURL: env.FDD_WH_ADMIN, @@ -18,7 +18,7 @@ link: env.BUILD_URL, result: 'SUCCESS', description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})" -@@ -39,7 +39,7 @@ +@@ -44,7 +44,7 @@ deleteDir() discordSend webhookURL: env.FDD_WH_ADMIN, diff --git a/patches/1.19.2/.jenkins/Jenkinsfile.snapshot.patch b/patches/1.19.2/.jenkins/Jenkinsfile.snapshot.patch index 6f0b844..258fa84 100644 --- a/patches/1.19.2/.jenkins/Jenkinsfile.snapshot.patch +++ b/patches/1.19.2/.jenkins/Jenkinsfile.snapshot.patch @@ -11,9 +11,9 @@ - image "registry.firstdark.dev/java21:latest" + image "registry.firstdark.dev/java17:latest" alwaysPull true + args '-v gradle-cache:/home/gradle/.gradle' } - } -@@ -13,7 +14,7 @@ +@@ -18,7 +19,7 @@ stage("Notify Discord") { steps { discordSend webhookURL: env.SSS_WEBHOOK, @@ -22,7 +22,7 @@ link: env.BUILD_URL, result: 'SUCCESS', description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})" -@@ -29,14 +30,14 @@ +@@ -34,14 +35,14 @@ stage("Build") { steps { @@ -39,12 +39,12 @@ } } } -@@ -51,8 +52,8 @@ +@@ -56,8 +57,8 @@ projectSlug: "craterlib", projectName: "${projectName}", projectIcon: "${projectIcon}", -- modLoaders: "forge|neoforge|fabric|quilt", -- minecraftVersions: "1.20.6", +- modLoaders: "neoforge|fabric|quilt", +- minecraftVersions: "1.21", + modLoaders: "forge|fabric|quilt", + minecraftVersions: "1.19.2", failWebhook: env.SSS_WEBHOOK, diff --git a/patches/1.19.2/Common/gradle.properties.patch b/patches/1.19.2/Common/gradle.properties.patch new file mode 100644 index 0000000..cd35d4f --- /dev/null +++ b/patches/1.19.2/Common/gradle.properties.patch @@ -0,0 +1,5 @@ +--- a/Common/gradle.properties ++++ /dev/null +@@ -1,2 +1,0 @@ +-# We don't need the common jar to be remapped +-fabric.loom.dontRemap=true diff --git a/patches/1.19.2/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch b/patches/1.19.2/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch index e181905..e93a5e3 100644 --- a/patches/1.19.2/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch +++ b/patches/1.19.2/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch @@ -20,6 +20,15 @@ import java.lang.reflect.Field; import java.lang.reflect.Modifier; +@@ -158,7 +157,7 @@ + return new TextConfigOption<>(Objects::toString, BigDecimal::new); + } + if (value instanceof ResourceLocation) { +- return new TextConfigOption<>(Objects::toString, ResourceLocation::parse); ++ return new TextConfigOption<>(Objects::toString, ResourceLocation::new); + } + if (isSubConfig) { + return new SubConfigWidget<>(config, this, value); @@ -177,19 +176,19 @@ } @@ -50,19 +59,106 @@ int y = (int) (TOP + 4 - Math.round(scrollerAmount)); for (Option option : options) { -@@ -268,9 +267,9 @@ +@@ -216,23 +215,24 @@ + int maxY = this.height - BOTTOM; + //RenderSystem.disableTexture(); + Tesselator tesselator = Tesselator.getInstance(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.setShader(GameRenderer::getPositionColorShader); +- +- buffer.addVertex(scrollbarPositionMinX, maxY, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMaxX, maxY, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMaxX, TOP, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMinX, TOP, 0.0f).setColor(0, 0, 0, 255); +- +- buffer.addVertex(scrollbarPositionMinX, minY + height, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMaxX, minY + height, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMaxX, minY, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, minY, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, (minY + height - 1), 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex((scrollbarPositionMaxX - 1), (minY + height - 1), 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex((scrollbarPositionMaxX - 1), minY, 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, minY, 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); ++ ++ buffer.vertex(scrollbarPositionMinX, maxY, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, maxY, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, TOP, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, TOP, 0.0D).color(0, 0, 0, 255).endVertex(); ++ ++ buffer.vertex(scrollbarPositionMinX, minY + height, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, minY + height, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, minY, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, minY, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, (minY + height - 1), 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex((scrollbarPositionMaxX - 1), (minY + height - 1), 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex((scrollbarPositionMaxX - 1), minY, 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, minY, 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ tesselator.end(); + RenderSystem.disableBlend(); + //RenderSystem.enableTexture(); + } +@@ -240,21 +240,22 @@ + + private void renderShadow(PoseStack matrices) { + Tesselator tesselator = Tesselator.getInstance(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.enableBlend(); + RenderSystem.blendFuncSeparate(770, 771, 0, 1); + //RenderSystem.disableTexture(); + RenderSystem.setShader(GameRenderer::getPositionTexColorShader); + Matrix4f matrix = matrices.last().pose(); +- buffer.addVertex(matrix, 0, TOP + 4, 0.0F).setUv(0, 1).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, width, TOP + 4, 0.0F).setUv(1, 1).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, width, TOP, 0.0F).setUv(1, 0).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, 0, TOP, 0.0F).setUv(0, 0).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, 0, height - BOTTOM, 0.0F).setUv(0, 1).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, width, height - BOTTOM, 0.0F).setUv(1, 1).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, width, height - BOTTOM - 4, 0.0F).setUv(1, 0).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, 0, height - BOTTOM - 4, 0.0F).setUv(0, 0).setColor(0, 0, 0, 0); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ buffer.vertex(matrix, 0, TOP + 4, 0.0F).uv(0, 1).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, width, TOP + 4, 0.0F).uv(1, 1).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, width, TOP, 0.0F).uv(1, 0).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, 0, TOP, 0.0F).uv(0, 0).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, 0, height - BOTTOM, 0.0F).uv(0, 1).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, width, height - BOTTOM, 0.0F).uv(1, 1).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, width, height - BOTTOM - 4, 0.0F).uv(1, 0).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, 0, height - BOTTOM - 4, 0.0F).uv(0, 0).color(0, 0, 0, 0).endVertex(); ++ tesselator.end(); + //RenderSystem.enableTexture(); + RenderSystem.disableBlend(); + } +@@ -265,15 +266,16 @@ + protected void overlayBackground(Matrix4f matrix, int minX, int minY, int maxX, int maxY, int red, int green, int blue, int startAlpha, int endAlpha) { Tesselator tesselator = Tesselator.getInstance(); - BufferBuilder buffer = tesselator.getBuilder(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - RenderSystem.setShader(GameRenderer::getPositionTexColorShader); - RenderSystem.setShaderTexture(0, Screen.MENU_BACKGROUND); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.setShaderTexture(0, Screen.BACKGROUND_LOCATION); RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f); +- buffer.addVertex(matrix, minX, maxY, 0.0F).setUv(minX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha); +- buffer.addVertex(matrix, maxX, maxY, 0.0F).setUv(maxX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha); +- buffer.addVertex(matrix, maxX, minY, 0.0F).setUv(maxX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha); +- buffer.addVertex(matrix, minX, minY, 0.0F).setUv(minX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); + RenderSystem.setShader(GameRenderer::getPositionTexColorShader); - buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - buffer.vertex(matrix, minX, maxY, 0.0F).uv(minX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); - buffer.vertex(matrix, maxX, maxY, 0.0F).uv(maxX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); -@@ -334,12 +333,12 @@ ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ buffer.vertex(matrix, minX, maxY, 0.0F).uv(minX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); ++ buffer.vertex(matrix, maxX, maxY, 0.0F).uv(maxX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); ++ buffer.vertex(matrix, maxX, minY, 0.0F).uv(maxX / 32.0F, minY / 32.0F).color(red, green, blue, startAlpha).endVertex(); ++ buffer.vertex(matrix, minX, minY, 0.0F).uv(minX / 32.0F, minY / 32.0F).color(red, green, blue, startAlpha).endVertex(); ++ tesselator.end(); + } + + public int scrollHeight() { +@@ -331,12 +333,12 @@ } @Override @@ -77,7 +173,7 @@ } @Override -@@ -378,7 +377,7 @@ +@@ -375,7 +377,7 @@ } } @@ -86,7 +182,7 @@ if (mouseX > startX && mouseX < startX + sizeX) { if (mouseY > startY && mouseY < startY + sizeY) { List list = new ArrayList<>(); -@@ -386,7 +385,7 @@ +@@ -383,7 +385,7 @@ for (String desc : description) { list.add(Component.translatable(desc)); } diff --git a/patches/1.19.2/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch b/patches/1.19.2/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch new file mode 100644 index 0000000..b8e086e --- /dev/null +++ b/patches/1.19.2/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch @@ -0,0 +1,16 @@ +--- a/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java ++++ b/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java +@@ -7,11 +7,11 @@ + private final ResourceLocation internal; + + public ResourceIdentifier(String namespace, String path) { +- this.internal = ResourceLocation.fromNamespaceAndPath(namespace, path); ++ this.internal = new ResourceLocation(namespace, path); + } + + public ResourceIdentifier(String path) { +- this.internal = ResourceLocation.withDefaultNamespace(path); ++ this.internal = new ResourceLocation(path); + } + + public String getNamespace() { diff --git a/patches/1.19.2/Fabric/build.gradle.patch b/patches/1.19.2/Fabric/build.gradle.patch index 66a507f..7d6477c 100644 --- a/patches/1.19.2/Fabric/build.gradle.patch +++ b/patches/1.19.2/Fabric/build.gradle.patch @@ -4,8 +4,8 @@ setVersionType("release") setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-fabric.md") setProjectVersion("${minecraft_version}-${project.version}") -- setDisplayName("[FABRIC/QUILT 1.20.6] CraterLib - ${project.version}") -- setGameVersions("1.20.6") +- setDisplayName("[FABRIC/QUILT 1.21.0] CraterLib - ${project.version}") +- setGameVersions("1.21") + setDisplayName("[FABRIC/QUILT 1.19.2] CraterLib - ${project.version}") + setGameVersions("1.19.2") setLoaders("fabric", "quilt") diff --git a/patches/1.19.2/Fabric/src/main/resources/fabric.mod.json.patch b/patches/1.19.2/Fabric/src/main/resources/fabric.mod.json.patch index 6fe1efb..dda5e73 100644 --- a/patches/1.19.2/Fabric/src/main/resources/fabric.mod.json.patch +++ b/patches/1.19.2/Fabric/src/main/resources/fabric.mod.json.patch @@ -4,7 +4,7 @@ "depends": { "fabricloader": ">=0.15.0", "fabric-api": "*", -- "minecraft": ">=1.20.6", +- "minecraft": ">=1.21", - "java": ">=21" + "minecraft": "1.19.2", + "java": ">=17" diff --git a/patches/1.19.2/NeoForge/build.gradle.patch b/patches/1.19.2/NeoForge/build.gradle.patch index 6d6a100..1e3bedc 100644 --- a/patches/1.19.2/NeoForge/build.gradle.patch +++ b/patches/1.19.2/NeoForge/build.gradle.patch @@ -34,7 +34,7 @@ - -unimined.minecraft { - neoForged { -- loader neoforge_version +- loader "net.neoforged:neoforge:${neoforge_version}:universal" - mixinConfig("${mod_id}.mixins.json", "${mod_id}.neoforge.mixins.json") - } -} @@ -106,8 +106,8 @@ - setVersionType("release") - setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-forge.md") - setProjectVersion("${minecraft_version}-${project.version}") -- setDisplayName("[NeoForge 1.20.6] CraterLib - ${project.version}") -- setGameVersions("1.20.6") +- setDisplayName("[NeoForge 1.21.0] CraterLib - ${project.version}") +- setGameVersions("1.21") - setLoaders("neoforge") - setArtifact(remapJar) - setCurseEnvironment("both") diff --git a/patches/1.19.2/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch b/patches/1.19.2/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch index 27e2e32..e811538 100644 --- a/patches/1.19.2/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch +++ b/patches/1.19.2/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch @@ -22,13 +22,13 @@ -[[dependencies.${ mod_id }]] - modId = "neoforge" - type="required" -- versionRange = "[20.6,)" +- versionRange = "[21.0,)" - ordering = "NONE" - side = "BOTH" - -[[dependencies.${ mod_id }]] - modId = "minecraft" - type="required" -- versionRange = "[1.20.6,1.21)" +- versionRange = "[*,)" - ordering = "NONE" - side = "BOTH" diff --git a/patches/1.19.2/README.md.patch b/patches/1.19.2/README.md.patch new file mode 100644 index 0000000..e51d5b3 --- /dev/null +++ b/patches/1.19.2/README.md.patch @@ -0,0 +1,11 @@ +--- a/README.md ++++ b/README.md +@@ -15,7 +15,7 @@ + | < 1.18.2 | ❌ | + | 1.18.2-1.20.2 | ✳️ | + | 1.20.4 | ✳️ | +-| 1.20.6 | 🚧 | ++| 1.21 | 🚧 | + + - ❌ - Not Supported; no bug fixes or new features. + - 🚧 - Work in Progress; not ready for release. diff --git a/patches/1.19.2/gradle.properties.patch b/patches/1.19.2/gradle.properties.patch index 5e22aa5..853ee9a 100644 --- a/patches/1.19.2/gradle.properties.patch +++ b/patches/1.19.2/gradle.properties.patch @@ -4,25 +4,25 @@ mod_name=CraterLib # Shared --minecraft_version=1.20.6 +-minecraft_version=1.21-pre4 +minecraft_version=1.19.2 project_group=com.hypherionmc.craterlib # Fabric - fabric_loader=0.15.0 --fabric_api=0.97.8+1.20.6 + fabric_loader=0.15.11 +-fabric_api=0.100.0+1.21 +fabric_api=0.76.0+1.19.2 # Forge -forge_version=50.0.6 - -# NeoForged --neoforge_version=41-beta +-neoforge_version=21.0.0-alpha.1.21-pre4.20240609.095301 +forge_version=43.2.0 # Dependencies moon_config=1.0.9 -@@ -30,11 +27,10 @@ +@@ -30,16 +27,15 @@ discord_formatter=2.0.0 # Mod Dependencies @@ -38,3 +38,9 @@ # Publishing curse_id=867099 + modrinth_id=Nn8Wasaq +-release_type=port ++release_type=release + + # Gradle + org.gradle.jvmargs=-Xmx3G diff --git a/patches/1.19.2/orbit.json.patch b/patches/1.19.2/orbit.json.patch new file mode 100644 index 0000000..4f0263d --- /dev/null +++ b/patches/1.19.2/orbit.json.patch @@ -0,0 +1,7 @@ +--- a/orbit.json ++++ /dev/null +@@ -1,4 +1,0 @@ +-{ +- "action": "port", +- "devBranch": "porting" +-} diff --git a/patches/1.19.2/settings.gradle.patch b/patches/1.19.2/settings.gradle.patch index 671df0b..b23adaa 100644 --- a/patches/1.19.2/settings.gradle.patch +++ b/patches/1.19.2/settings.gradle.patch @@ -4,5 +4,5 @@ } rootProject.name = 'CraterLib' --include("Common", "Fabric", "NeoForge", "Forge") +-include("Common", "Fabric", "NeoForge") +include("Common", "Fabric", "Forge") diff --git a/patches/1.19.3/.jenkins/Jenkinsfile.deploy.patch b/patches/1.19.3/.jenkins/Jenkinsfile.deploy.patch index 7f7d8d5..d630ab8 100644 --- a/patches/1.19.3/.jenkins/Jenkinsfile.deploy.patch +++ b/patches/1.19.3/.jenkins/Jenkinsfile.deploy.patch @@ -7,9 +7,9 @@ - image "registry.firstdark.dev/java21:latest" + image "registry.firstdark.dev/java17:latest" alwaysPull true + args '-v gradle-cache:/home/gradle/.gradle' } - } -@@ -10,7 +10,7 @@ +@@ -15,7 +15,7 @@ stage("Notify Discord") { steps { discordSend webhookURL: env.FDD_WH_ADMIN, @@ -18,7 +18,7 @@ link: env.BUILD_URL, result: 'SUCCESS', description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})" -@@ -39,7 +39,7 @@ +@@ -44,7 +44,7 @@ deleteDir() discordSend webhookURL: env.FDD_WH_ADMIN, diff --git a/patches/1.19.3/.jenkins/Jenkinsfile.snapshot.patch b/patches/1.19.3/.jenkins/Jenkinsfile.snapshot.patch index 84ee70b..d1666a7 100644 --- a/patches/1.19.3/.jenkins/Jenkinsfile.snapshot.patch +++ b/patches/1.19.3/.jenkins/Jenkinsfile.snapshot.patch @@ -7,7 +7,7 @@ pipeline { agent { -@@ -13,7 +14,7 @@ +@@ -18,7 +19,7 @@ stage("Notify Discord") { steps { discordSend webhookURL: env.SSS_WEBHOOK, @@ -16,7 +16,7 @@ link: env.BUILD_URL, result: 'SUCCESS', description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})" -@@ -29,14 +30,14 @@ +@@ -34,14 +35,14 @@ stage("Build") { steps { @@ -33,12 +33,12 @@ } } } -@@ -51,8 +52,8 @@ +@@ -56,8 +57,8 @@ projectSlug: "craterlib", projectName: "${projectName}", projectIcon: "${projectIcon}", -- modLoaders: "forge|neoforge|fabric|quilt", -- minecraftVersions: "1.20.6", +- modLoaders: "neoforge|fabric|quilt", +- minecraftVersions: "1.21", + modLoaders: "forge|fabric|quilt", + minecraftVersions: "1.19.3|1.19.4", failWebhook: env.SSS_WEBHOOK, diff --git a/patches/1.19.3/Common/gradle.properties.patch b/patches/1.19.3/Common/gradle.properties.patch new file mode 100644 index 0000000..cd35d4f --- /dev/null +++ b/patches/1.19.3/Common/gradle.properties.patch @@ -0,0 +1,5 @@ +--- a/Common/gradle.properties ++++ /dev/null +@@ -1,2 +1,0 @@ +-# We don't need the common jar to be remapped +-fabric.loom.dontRemap=true diff --git a/patches/1.19.3/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch b/patches/1.19.3/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch index fa90832..e9ec1ff 100644 --- a/patches/1.19.3/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch +++ b/patches/1.19.3/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch @@ -8,6 +8,15 @@ import net.minecraft.client.gui.screens.ConfirmScreen; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.renderer.GameRenderer; +@@ -158,7 +157,7 @@ + return new TextConfigOption<>(Objects::toString, BigDecimal::new); + } + if (value instanceof ResourceLocation) { +- return new TextConfigOption<>(Objects::toString, ResourceLocation::parse); ++ return new TextConfigOption<>(Objects::toString, ResourceLocation::new); + } + if (isSubConfig) { + return new SubConfigWidget<>(config, this, value); @@ -177,19 +176,19 @@ } @@ -38,19 +47,106 @@ int y = (int) (TOP + 4 - Math.round(scrollerAmount)); for (Option option : options) { -@@ -268,9 +267,9 @@ +@@ -216,23 +215,24 @@ + int maxY = this.height - BOTTOM; + //RenderSystem.disableTexture(); + Tesselator tesselator = Tesselator.getInstance(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.setShader(GameRenderer::getPositionColorShader); +- +- buffer.addVertex(scrollbarPositionMinX, maxY, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMaxX, maxY, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMaxX, TOP, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMinX, TOP, 0.0f).setColor(0, 0, 0, 255); +- +- buffer.addVertex(scrollbarPositionMinX, minY + height, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMaxX, minY + height, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMaxX, minY, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, minY, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, (minY + height - 1), 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex((scrollbarPositionMaxX - 1), (minY + height - 1), 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex((scrollbarPositionMaxX - 1), minY, 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, minY, 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); ++ ++ buffer.vertex(scrollbarPositionMinX, maxY, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, maxY, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, TOP, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, TOP, 0.0D).color(0, 0, 0, 255).endVertex(); ++ ++ buffer.vertex(scrollbarPositionMinX, minY + height, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, minY + height, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, minY, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, minY, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, (minY + height - 1), 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex((scrollbarPositionMaxX - 1), (minY + height - 1), 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex((scrollbarPositionMaxX - 1), minY, 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, minY, 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ tesselator.end(); + RenderSystem.disableBlend(); + //RenderSystem.enableTexture(); + } +@@ -240,21 +240,22 @@ + + private void renderShadow(PoseStack matrices) { + Tesselator tesselator = Tesselator.getInstance(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.enableBlend(); + RenderSystem.blendFuncSeparate(770, 771, 0, 1); + //RenderSystem.disableTexture(); + RenderSystem.setShader(GameRenderer::getPositionTexColorShader); + Matrix4f matrix = matrices.last().pose(); +- buffer.addVertex(matrix, 0, TOP + 4, 0.0F).setUv(0, 1).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, width, TOP + 4, 0.0F).setUv(1, 1).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, width, TOP, 0.0F).setUv(1, 0).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, 0, TOP, 0.0F).setUv(0, 0).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, 0, height - BOTTOM, 0.0F).setUv(0, 1).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, width, height - BOTTOM, 0.0F).setUv(1, 1).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, width, height - BOTTOM - 4, 0.0F).setUv(1, 0).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, 0, height - BOTTOM - 4, 0.0F).setUv(0, 0).setColor(0, 0, 0, 0); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ buffer.vertex(matrix, 0, TOP + 4, 0.0F).uv(0, 1).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, width, TOP + 4, 0.0F).uv(1, 1).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, width, TOP, 0.0F).uv(1, 0).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, 0, TOP, 0.0F).uv(0, 0).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, 0, height - BOTTOM, 0.0F).uv(0, 1).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, width, height - BOTTOM, 0.0F).uv(1, 1).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, width, height - BOTTOM - 4, 0.0F).uv(1, 0).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, 0, height - BOTTOM - 4, 0.0F).uv(0, 0).color(0, 0, 0, 0).endVertex(); ++ tesselator.end(); + //RenderSystem.enableTexture(); + RenderSystem.disableBlend(); + } +@@ -265,15 +266,16 @@ + protected void overlayBackground(Matrix4f matrix, int minX, int minY, int maxX, int maxY, int red, int green, int blue, int startAlpha, int endAlpha) { Tesselator tesselator = Tesselator.getInstance(); - BufferBuilder buffer = tesselator.getBuilder(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - RenderSystem.setShader(GameRenderer::getPositionTexColorShader); - RenderSystem.setShaderTexture(0, Screen.MENU_BACKGROUND); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.setShaderTexture(0, Screen.BACKGROUND_LOCATION); RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f); +- buffer.addVertex(matrix, minX, maxY, 0.0F).setUv(minX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha); +- buffer.addVertex(matrix, maxX, maxY, 0.0F).setUv(maxX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha); +- buffer.addVertex(matrix, maxX, minY, 0.0F).setUv(maxX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha); +- buffer.addVertex(matrix, minX, minY, 0.0F).setUv(minX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); + RenderSystem.setShader(GameRenderer::getPositionTexColorShader); - buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - buffer.vertex(matrix, minX, maxY, 0.0F).uv(minX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); - buffer.vertex(matrix, maxX, maxY, 0.0F).uv(maxX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); -@@ -334,12 +333,12 @@ ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ buffer.vertex(matrix, minX, maxY, 0.0F).uv(minX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); ++ buffer.vertex(matrix, maxX, maxY, 0.0F).uv(maxX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); ++ buffer.vertex(matrix, maxX, minY, 0.0F).uv(maxX / 32.0F, minY / 32.0F).color(red, green, blue, startAlpha).endVertex(); ++ buffer.vertex(matrix, minX, minY, 0.0F).uv(minX / 32.0F, minY / 32.0F).color(red, green, blue, startAlpha).endVertex(); ++ tesselator.end(); + } + + public int scrollHeight() { +@@ -331,12 +333,12 @@ } @Override @@ -65,7 +161,7 @@ } @Override -@@ -378,7 +377,7 @@ +@@ -375,7 +377,7 @@ } } @@ -74,7 +170,7 @@ if (mouseX > startX && mouseX < startX + sizeX) { if (mouseY > startY && mouseY < startY + sizeY) { List list = new ArrayList<>(); -@@ -386,7 +385,7 @@ +@@ -383,7 +385,7 @@ for (String desc : description) { list.add(Component.translatable(desc)); } diff --git a/patches/1.19.3/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch b/patches/1.19.3/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch new file mode 100644 index 0000000..b8e086e --- /dev/null +++ b/patches/1.19.3/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch @@ -0,0 +1,16 @@ +--- a/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java ++++ b/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java +@@ -7,11 +7,11 @@ + private final ResourceLocation internal; + + public ResourceIdentifier(String namespace, String path) { +- this.internal = ResourceLocation.fromNamespaceAndPath(namespace, path); ++ this.internal = new ResourceLocation(namespace, path); + } + + public ResourceIdentifier(String path) { +- this.internal = ResourceLocation.withDefaultNamespace(path); ++ this.internal = new ResourceLocation(path); + } + + public String getNamespace() { diff --git a/patches/1.19.3/Fabric/build.gradle.patch b/patches/1.19.3/Fabric/build.gradle.patch index f118f53..b94d6ca 100644 --- a/patches/1.19.3/Fabric/build.gradle.patch +++ b/patches/1.19.3/Fabric/build.gradle.patch @@ -4,8 +4,8 @@ setVersionType("release") setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-fabric.md") setProjectVersion("${minecraft_version}-${project.version}") -- setDisplayName("[FABRIC/QUILT 1.20.6] CraterLib - ${project.version}") -- setGameVersions("1.20.6") +- setDisplayName("[FABRIC/QUILT 1.21.0] CraterLib - ${project.version}") +- setGameVersions("1.21") + setDisplayName("[FABRIC/QUILT 1.19.3/1.19.4] CraterLib - ${project.version}") + setGameVersions("1.19.3", "1.19.4") setLoaders("fabric", "quilt") diff --git a/patches/1.19.3/Fabric/src/main/resources/fabric.mod.json.patch b/patches/1.19.3/Fabric/src/main/resources/fabric.mod.json.patch index 1eb998a..4cd15d4 100644 --- a/patches/1.19.3/Fabric/src/main/resources/fabric.mod.json.patch +++ b/patches/1.19.3/Fabric/src/main/resources/fabric.mod.json.patch @@ -4,7 +4,7 @@ "depends": { "fabricloader": ">=0.15.0", "fabric-api": "*", -- "minecraft": ">=1.20.6", +- "minecraft": ">=1.21", - "java": ">=21" + "minecraft": ">=1.19.3", + "java": ">=17" diff --git a/patches/1.19.3/NeoForge/build.gradle.patch b/patches/1.19.3/NeoForge/build.gradle.patch index 6d6a100..1e3bedc 100644 --- a/patches/1.19.3/NeoForge/build.gradle.patch +++ b/patches/1.19.3/NeoForge/build.gradle.patch @@ -34,7 +34,7 @@ - -unimined.minecraft { - neoForged { -- loader neoforge_version +- loader "net.neoforged:neoforge:${neoforge_version}:universal" - mixinConfig("${mod_id}.mixins.json", "${mod_id}.neoforge.mixins.json") - } -} @@ -106,8 +106,8 @@ - setVersionType("release") - setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-forge.md") - setProjectVersion("${minecraft_version}-${project.version}") -- setDisplayName("[NeoForge 1.20.6] CraterLib - ${project.version}") -- setGameVersions("1.20.6") +- setDisplayName("[NeoForge 1.21.0] CraterLib - ${project.version}") +- setGameVersions("1.21") - setLoaders("neoforge") - setArtifact(remapJar) - setCurseEnvironment("both") diff --git a/patches/1.19.3/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch b/patches/1.19.3/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch index 27e2e32..e811538 100644 --- a/patches/1.19.3/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch +++ b/patches/1.19.3/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch @@ -22,13 +22,13 @@ -[[dependencies.${ mod_id }]] - modId = "neoforge" - type="required" -- versionRange = "[20.6,)" +- versionRange = "[21.0,)" - ordering = "NONE" - side = "BOTH" - -[[dependencies.${ mod_id }]] - modId = "minecraft" - type="required" -- versionRange = "[1.20.6,1.21)" +- versionRange = "[*,)" - ordering = "NONE" - side = "BOTH" diff --git a/patches/1.19.3/README.md.patch b/patches/1.19.3/README.md.patch new file mode 100644 index 0000000..e51d5b3 --- /dev/null +++ b/patches/1.19.3/README.md.patch @@ -0,0 +1,11 @@ +--- a/README.md ++++ b/README.md +@@ -15,7 +15,7 @@ + | < 1.18.2 | ❌ | + | 1.18.2-1.20.2 | ✳️ | + | 1.20.4 | ✳️ | +-| 1.20.6 | 🚧 | ++| 1.21 | 🚧 | + + - ❌ - Not Supported; no bug fixes or new features. + - 🚧 - Work in Progress; not ready for release. diff --git a/patches/1.19.3/gradle.properties.patch b/patches/1.19.3/gradle.properties.patch index c1738bc..3ea5b65 100644 --- a/patches/1.19.3/gradle.properties.patch +++ b/patches/1.19.3/gradle.properties.patch @@ -4,25 +4,25 @@ mod_name=CraterLib # Shared --minecraft_version=1.20.6 +-minecraft_version=1.21-pre4 +minecraft_version=1.19.3 project_group=com.hypherionmc.craterlib # Fabric - fabric_loader=0.15.0 --fabric_api=0.97.8+1.20.6 + fabric_loader=0.15.11 +-fabric_api=0.100.0+1.21 +fabric_api=0.76.1+1.19.3 # Forge -forge_version=50.0.6 - -# NeoForged --neoforge_version=41-beta +-neoforge_version=21.0.0-alpha.1.21-pre4.20240609.095301 +forge_version=44.1.0 # Dependencies moon_config=1.0.9 -@@ -30,11 +27,10 @@ +@@ -30,16 +27,15 @@ discord_formatter=2.0.0 # Mod Dependencies @@ -38,3 +38,9 @@ # Publishing curse_id=867099 + modrinth_id=Nn8Wasaq +-release_type=port ++release_type=release + + # Gradle + org.gradle.jvmargs=-Xmx3G diff --git a/patches/1.19.3/orbit.json.patch b/patches/1.19.3/orbit.json.patch new file mode 100644 index 0000000..4f0263d --- /dev/null +++ b/patches/1.19.3/orbit.json.patch @@ -0,0 +1,7 @@ +--- a/orbit.json ++++ /dev/null +@@ -1,4 +1,0 @@ +-{ +- "action": "port", +- "devBranch": "porting" +-} diff --git a/patches/1.19.3/settings.gradle.patch b/patches/1.19.3/settings.gradle.patch index 671df0b..b23adaa 100644 --- a/patches/1.19.3/settings.gradle.patch +++ b/patches/1.19.3/settings.gradle.patch @@ -4,5 +4,5 @@ } rootProject.name = 'CraterLib' --include("Common", "Fabric", "NeoForge", "Forge") +-include("Common", "Fabric", "NeoForge") +include("Common", "Fabric", "Forge") diff --git a/patches/1.20.2/.jenkins/Jenkinsfile.deploy.patch b/patches/1.20.2/.jenkins/Jenkinsfile.deploy.patch index 10cd5cb..01197fa 100644 --- a/patches/1.20.2/.jenkins/Jenkinsfile.deploy.patch +++ b/patches/1.20.2/.jenkins/Jenkinsfile.deploy.patch @@ -7,9 +7,9 @@ - image "registry.firstdark.dev/java21:latest" + image "registry.firstdark.dev/java17:latest" alwaysPull true + args '-v gradle-cache:/home/gradle/.gradle' } - } -@@ -10,7 +10,7 @@ +@@ -15,7 +15,7 @@ stage("Notify Discord") { steps { discordSend webhookURL: env.FDD_WH_ADMIN, @@ -18,7 +18,7 @@ link: env.BUILD_URL, result: 'SUCCESS', description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})" -@@ -39,7 +39,7 @@ +@@ -44,7 +44,7 @@ deleteDir() discordSend webhookURL: env.FDD_WH_ADMIN, diff --git a/patches/1.20.2/.jenkins/Jenkinsfile.snapshot.patch b/patches/1.20.2/.jenkins/Jenkinsfile.snapshot.patch index 496d44d..530e015 100644 --- a/patches/1.20.2/.jenkins/Jenkinsfile.snapshot.patch +++ b/patches/1.20.2/.jenkins/Jenkinsfile.snapshot.patch @@ -11,9 +11,9 @@ - image "registry.firstdark.dev/java21:latest" + image "registry.firstdark.dev/java17:latest" alwaysPull true + args '-v gradle-cache:/home/gradle/.gradle' } - } -@@ -13,7 +14,7 @@ +@@ -18,7 +19,7 @@ stage("Notify Discord") { steps { discordSend webhookURL: env.SSS_WEBHOOK, @@ -22,7 +22,7 @@ link: env.BUILD_URL, result: 'SUCCESS', description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})" -@@ -29,14 +30,14 @@ +@@ -34,14 +35,14 @@ stage("Build") { steps { @@ -39,12 +39,12 @@ } } } -@@ -51,8 +52,8 @@ +@@ -56,8 +57,8 @@ projectSlug: "craterlib", projectName: "${projectName}", projectIcon: "${projectIcon}", -- modLoaders: "forge|neoforge|fabric|quilt", -- minecraftVersions: "1.20.6", +- modLoaders: "neoforge|fabric|quilt", +- minecraftVersions: "1.21", + modLoaders: "forge|fabric|quilt", + minecraftVersions: "1.20.2", failWebhook: env.SSS_WEBHOOK, diff --git a/patches/1.20.2/Common/gradle.properties.patch b/patches/1.20.2/Common/gradle.properties.patch new file mode 100644 index 0000000..cd35d4f --- /dev/null +++ b/patches/1.20.2/Common/gradle.properties.patch @@ -0,0 +1,5 @@ +--- a/Common/gradle.properties ++++ /dev/null +@@ -1,2 +1,0 @@ +-# We don't need the common jar to be remapped +-fabric.loom.dontRemap=true diff --git a/patches/1.20.2/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch b/patches/1.20.2/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch index c0be618..ed53a54 100644 --- a/patches/1.20.2/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch +++ b/patches/1.20.2/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch @@ -1,11 +1,109 @@ --- a/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java +++ b/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java -@@ -269,7 +269,7 @@ +@@ -158,7 +158,7 @@ + return new TextConfigOption<>(Objects::toString, BigDecimal::new); + } + if (value instanceof ResourceLocation) { +- return new TextConfigOption<>(Objects::toString, ResourceLocation::parse); ++ return new TextConfigOption<>(Objects::toString, ResourceLocation::new); + } + if (isSubConfig) { + return new SubConfigWidget<>(config, this, value); +@@ -216,23 +216,24 @@ + int maxY = this.height - BOTTOM; + //RenderSystem.disableTexture(); + Tesselator tesselator = Tesselator.getInstance(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.setShader(GameRenderer::getPositionColorShader); +- +- buffer.addVertex(scrollbarPositionMinX, maxY, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMaxX, maxY, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMaxX, TOP, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMinX, TOP, 0.0f).setColor(0, 0, 0, 255); +- +- buffer.addVertex(scrollbarPositionMinX, minY + height, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMaxX, minY + height, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMaxX, minY, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, minY, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, (minY + height - 1), 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex((scrollbarPositionMaxX - 1), (minY + height - 1), 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex((scrollbarPositionMaxX - 1), minY, 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, minY, 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); ++ ++ buffer.vertex(scrollbarPositionMinX, maxY, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, maxY, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, TOP, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, TOP, 0.0D).color(0, 0, 0, 255).endVertex(); ++ ++ buffer.vertex(scrollbarPositionMinX, minY + height, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, minY + height, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, minY, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, minY, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, (minY + height - 1), 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex((scrollbarPositionMaxX - 1), (minY + height - 1), 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex((scrollbarPositionMaxX - 1), minY, 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, minY, 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ tesselator.end(); + RenderSystem.disableBlend(); + //RenderSystem.enableTexture(); + } +@@ -240,21 +241,22 @@ + + private void renderShadow(PoseStack matrices) { Tesselator tesselator = Tesselator.getInstance(); - BufferBuilder buffer = tesselator.getBuilder(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.enableBlend(); + RenderSystem.blendFuncSeparate(770, 771, 0, 1); + //RenderSystem.disableTexture(); + RenderSystem.setShader(GameRenderer::getPositionTexColorShader); + Matrix4f matrix = matrices.last().pose(); +- buffer.addVertex(matrix, 0, TOP + 4, 0.0F).setUv(0, 1).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, width, TOP + 4, 0.0F).setUv(1, 1).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, width, TOP, 0.0F).setUv(1, 0).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, 0, TOP, 0.0F).setUv(0, 0).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, 0, height - BOTTOM, 0.0F).setUv(0, 1).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, width, height - BOTTOM, 0.0F).setUv(1, 1).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, width, height - BOTTOM - 4, 0.0F).setUv(1, 0).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, 0, height - BOTTOM - 4, 0.0F).setUv(0, 0).setColor(0, 0, 0, 0); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ buffer.vertex(matrix, 0, TOP + 4, 0.0F).uv(0, 1).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, width, TOP + 4, 0.0F).uv(1, 1).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, width, TOP, 0.0F).uv(1, 0).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, 0, TOP, 0.0F).uv(0, 0).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, 0, height - BOTTOM, 0.0F).uv(0, 1).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, width, height - BOTTOM, 0.0F).uv(1, 1).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, width, height - BOTTOM - 4, 0.0F).uv(1, 0).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, 0, height - BOTTOM - 4, 0.0F).uv(0, 0).color(0, 0, 0, 0).endVertex(); ++ tesselator.end(); + //RenderSystem.enableTexture(); + RenderSystem.disableBlend(); + } +@@ -265,15 +267,16 @@ + + protected void overlayBackground(Matrix4f matrix, int minX, int minY, int maxX, int maxY, int red, int green, int blue, int startAlpha, int endAlpha) { + Tesselator tesselator = Tesselator.getInstance(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); RenderSystem.setShader(GameRenderer::getPositionTexColorShader); - RenderSystem.setShaderTexture(0, Screen.MENU_BACKGROUND); + RenderSystem.setShaderTexture(0, Screen.BACKGROUND_LOCATION); RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f); - buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - buffer.vertex(matrix, minX, maxY, 0.0F).uv(minX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); +- buffer.addVertex(matrix, minX, maxY, 0.0F).setUv(minX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha); +- buffer.addVertex(matrix, maxX, maxY, 0.0F).setUv(maxX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha); +- buffer.addVertex(matrix, maxX, minY, 0.0F).setUv(maxX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha); +- buffer.addVertex(matrix, minX, minY, 0.0F).setUv(minX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ buffer.vertex(matrix, minX, maxY, 0.0F).uv(minX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); ++ buffer.vertex(matrix, maxX, maxY, 0.0F).uv(maxX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); ++ buffer.vertex(matrix, maxX, minY, 0.0F).uv(maxX / 32.0F, minY / 32.0F).color(red, green, blue, startAlpha).endVertex(); ++ buffer.vertex(matrix, minX, minY, 0.0F).uv(minX / 32.0F, minY / 32.0F).color(red, green, blue, startAlpha).endVertex(); ++ tesselator.end(); + } + + public int scrollHeight() { diff --git a/patches/1.20.2/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch b/patches/1.20.2/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch new file mode 100644 index 0000000..b8e086e --- /dev/null +++ b/patches/1.20.2/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch @@ -0,0 +1,16 @@ +--- a/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java ++++ b/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java +@@ -7,11 +7,11 @@ + private final ResourceLocation internal; + + public ResourceIdentifier(String namespace, String path) { +- this.internal = ResourceLocation.fromNamespaceAndPath(namespace, path); ++ this.internal = new ResourceLocation(namespace, path); + } + + public ResourceIdentifier(String path) { +- this.internal = ResourceLocation.withDefaultNamespace(path); ++ this.internal = new ResourceLocation(path); + } + + public String getNamespace() { diff --git a/patches/1.20.2/Fabric/build.gradle.patch b/patches/1.20.2/Fabric/build.gradle.patch index 7efc7bd..880fd91 100644 --- a/patches/1.20.2/Fabric/build.gradle.patch +++ b/patches/1.20.2/Fabric/build.gradle.patch @@ -4,8 +4,8 @@ setVersionType("release") setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-fabric.md") setProjectVersion("${minecraft_version}-${project.version}") -- setDisplayName("[FABRIC/QUILT 1.20.6] CraterLib - ${project.version}") -- setGameVersions("1.20.6") +- setDisplayName("[FABRIC/QUILT 1.21.0] CraterLib - ${project.version}") +- setGameVersions("1.21") + setDisplayName("[FABRIC/QUILT 1.20.2] CraterLib - ${project.version}") + setGameVersions("1.20.2") setLoaders("fabric", "quilt") diff --git a/patches/1.20.2/Fabric/src/main/resources/fabric.mod.json.patch b/patches/1.20.2/Fabric/src/main/resources/fabric.mod.json.patch index 4db55f6..a25540b 100644 --- a/patches/1.20.2/Fabric/src/main/resources/fabric.mod.json.patch +++ b/patches/1.20.2/Fabric/src/main/resources/fabric.mod.json.patch @@ -4,7 +4,7 @@ "depends": { "fabricloader": ">=0.15.0", "fabric-api": "*", -- "minecraft": ">=1.20.6", +- "minecraft": ">=1.21", - "java": ">=21" + "minecraft": "1.20.2", + "java": ">=17" diff --git a/patches/1.20.2/NeoForge/build.gradle.patch b/patches/1.20.2/NeoForge/build.gradle.patch index 6d6a100..1e3bedc 100644 --- a/patches/1.20.2/NeoForge/build.gradle.patch +++ b/patches/1.20.2/NeoForge/build.gradle.patch @@ -34,7 +34,7 @@ - -unimined.minecraft { - neoForged { -- loader neoforge_version +- loader "net.neoforged:neoforge:${neoforge_version}:universal" - mixinConfig("${mod_id}.mixins.json", "${mod_id}.neoforge.mixins.json") - } -} @@ -106,8 +106,8 @@ - setVersionType("release") - setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-forge.md") - setProjectVersion("${minecraft_version}-${project.version}") -- setDisplayName("[NeoForge 1.20.6] CraterLib - ${project.version}") -- setGameVersions("1.20.6") +- setDisplayName("[NeoForge 1.21.0] CraterLib - ${project.version}") +- setGameVersions("1.21") - setLoaders("neoforge") - setArtifact(remapJar) - setCurseEnvironment("both") diff --git a/patches/1.20.2/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch b/patches/1.20.2/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch index 27e2e32..e811538 100644 --- a/patches/1.20.2/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch +++ b/patches/1.20.2/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch @@ -22,13 +22,13 @@ -[[dependencies.${ mod_id }]] - modId = "neoforge" - type="required" -- versionRange = "[20.6,)" +- versionRange = "[21.0,)" - ordering = "NONE" - side = "BOTH" - -[[dependencies.${ mod_id }]] - modId = "minecraft" - type="required" -- versionRange = "[1.20.6,1.21)" +- versionRange = "[*,)" - ordering = "NONE" - side = "BOTH" diff --git a/patches/1.20.2/README.md.patch b/patches/1.20.2/README.md.patch new file mode 100644 index 0000000..e51d5b3 --- /dev/null +++ b/patches/1.20.2/README.md.patch @@ -0,0 +1,11 @@ +--- a/README.md ++++ b/README.md +@@ -15,7 +15,7 @@ + | < 1.18.2 | ❌ | + | 1.18.2-1.20.2 | ✳️ | + | 1.20.4 | ✳️ | +-| 1.20.6 | 🚧 | ++| 1.21 | 🚧 | + + - ❌ - Not Supported; no bug fixes or new features. + - 🚧 - Work in Progress; not ready for release. diff --git a/patches/1.20.2/gradle.properties.patch b/patches/1.20.2/gradle.properties.patch index 848bd1d..230ac83 100644 --- a/patches/1.20.2/gradle.properties.patch +++ b/patches/1.20.2/gradle.properties.patch @@ -4,25 +4,25 @@ mod_name=CraterLib # Shared --minecraft_version=1.20.6 +-minecraft_version=1.21-pre4 +minecraft_version=1.20.2 project_group=com.hypherionmc.craterlib # Fabric - fabric_loader=0.15.0 --fabric_api=0.97.8+1.20.6 + fabric_loader=0.15.11 +-fabric_api=0.100.0+1.21 +fabric_api=0.91.6+1.20.2 # Forge -forge_version=50.0.6 - -# NeoForged --neoforge_version=41-beta +-neoforge_version=21.0.0-alpha.1.21-pre4.20240609.095301 +forge_version=48.1.0 # Dependencies moon_config=1.0.9 -@@ -30,11 +27,10 @@ +@@ -30,16 +27,15 @@ discord_formatter=2.0.0 # Mod Dependencies @@ -38,3 +38,9 @@ # Publishing curse_id=867099 + modrinth_id=Nn8Wasaq +-release_type=port ++release_type=release + + # Gradle + org.gradle.jvmargs=-Xmx3G diff --git a/patches/1.20.2/orbit.json.patch b/patches/1.20.2/orbit.json.patch new file mode 100644 index 0000000..4f0263d --- /dev/null +++ b/patches/1.20.2/orbit.json.patch @@ -0,0 +1,7 @@ +--- a/orbit.json ++++ /dev/null +@@ -1,4 +1,0 @@ +-{ +- "action": "port", +- "devBranch": "porting" +-} diff --git a/patches/1.20.2/settings.gradle.patch b/patches/1.20.2/settings.gradle.patch index 671df0b..b23adaa 100644 --- a/patches/1.20.2/settings.gradle.patch +++ b/patches/1.20.2/settings.gradle.patch @@ -4,5 +4,5 @@ } rootProject.name = 'CraterLib' --include("Common", "Fabric", "NeoForge", "Forge") +-include("Common", "Fabric", "NeoForge") +include("Common", "Fabric", "Forge") diff --git a/patches/1.20.4/.jenkins/Jenkinsfile.deploy.patch b/patches/1.20.4/.jenkins/Jenkinsfile.deploy.patch index 5f00d4e..7a533ff 100644 --- a/patches/1.20.4/.jenkins/Jenkinsfile.deploy.patch +++ b/patches/1.20.4/.jenkins/Jenkinsfile.deploy.patch @@ -7,9 +7,9 @@ - image "registry.firstdark.dev/java21:latest" + image "registry.firstdark.dev/java17:latest" alwaysPull true + args '-v gradle-cache:/home/gradle/.gradle' } - } -@@ -10,7 +10,7 @@ +@@ -15,7 +15,7 @@ stage("Notify Discord") { steps { discordSend webhookURL: env.FDD_WH_ADMIN, @@ -18,7 +18,7 @@ link: env.BUILD_URL, result: 'SUCCESS', description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})" -@@ -39,7 +39,7 @@ +@@ -44,7 +44,7 @@ deleteDir() discordSend webhookURL: env.FDD_WH_ADMIN, diff --git a/patches/1.20.4/.jenkins/Jenkinsfile.snapshot.patch b/patches/1.20.4/.jenkins/Jenkinsfile.snapshot.patch index 74025d1..49a4964 100644 --- a/patches/1.20.4/.jenkins/Jenkinsfile.snapshot.patch +++ b/patches/1.20.4/.jenkins/Jenkinsfile.snapshot.patch @@ -11,9 +11,9 @@ - image "registry.firstdark.dev/java21:latest" + image "registry.firstdark.dev/java17:latest" alwaysPull true + args '-v gradle-cache:/home/gradle/.gradle' } - } -@@ -29,14 +30,14 @@ +@@ -34,14 +35,14 @@ stage("Build") { steps { @@ -30,11 +30,11 @@ } } } -@@ -52,7 +53,7 @@ +@@ -57,7 +58,7 @@ projectName: "${projectName}", projectIcon: "${projectIcon}", - modLoaders: "forge|neoforge|fabric|quilt", -- minecraftVersions: "1.20.6", + modLoaders: "neoforge|fabric|quilt", +- minecraftVersions: "1.21", + minecraftVersions: "1.20.4", failWebhook: env.SSS_WEBHOOK, publishWebhooks: "${env.SSS_WEBHOOK}|${env.FDD_WH}" diff --git a/patches/1.20.4/Common/gradle.properties.patch b/patches/1.20.4/Common/gradle.properties.patch new file mode 100644 index 0000000..cd35d4f --- /dev/null +++ b/patches/1.20.4/Common/gradle.properties.patch @@ -0,0 +1,5 @@ +--- a/Common/gradle.properties ++++ /dev/null +@@ -1,2 +1,0 @@ +-# We don't need the common jar to be remapped +-fabric.loom.dontRemap=true diff --git a/patches/1.20.4/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch b/patches/1.20.4/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch index c0be618..ed53a54 100644 --- a/patches/1.20.4/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch +++ b/patches/1.20.4/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch @@ -1,11 +1,109 @@ --- a/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java +++ b/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java -@@ -269,7 +269,7 @@ +@@ -158,7 +158,7 @@ + return new TextConfigOption<>(Objects::toString, BigDecimal::new); + } + if (value instanceof ResourceLocation) { +- return new TextConfigOption<>(Objects::toString, ResourceLocation::parse); ++ return new TextConfigOption<>(Objects::toString, ResourceLocation::new); + } + if (isSubConfig) { + return new SubConfigWidget<>(config, this, value); +@@ -216,23 +216,24 @@ + int maxY = this.height - BOTTOM; + //RenderSystem.disableTexture(); + Tesselator tesselator = Tesselator.getInstance(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.setShader(GameRenderer::getPositionColorShader); +- +- buffer.addVertex(scrollbarPositionMinX, maxY, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMaxX, maxY, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMaxX, TOP, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMinX, TOP, 0.0f).setColor(0, 0, 0, 255); +- +- buffer.addVertex(scrollbarPositionMinX, minY + height, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMaxX, minY + height, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMaxX, minY, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, minY, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, (minY + height - 1), 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex((scrollbarPositionMaxX - 1), (minY + height - 1), 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex((scrollbarPositionMaxX - 1), minY, 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, minY, 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); ++ ++ buffer.vertex(scrollbarPositionMinX, maxY, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, maxY, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, TOP, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, TOP, 0.0D).color(0, 0, 0, 255).endVertex(); ++ ++ buffer.vertex(scrollbarPositionMinX, minY + height, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, minY + height, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, minY, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, minY, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, (minY + height - 1), 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex((scrollbarPositionMaxX - 1), (minY + height - 1), 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex((scrollbarPositionMaxX - 1), minY, 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, minY, 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ tesselator.end(); + RenderSystem.disableBlend(); + //RenderSystem.enableTexture(); + } +@@ -240,21 +241,22 @@ + + private void renderShadow(PoseStack matrices) { Tesselator tesselator = Tesselator.getInstance(); - BufferBuilder buffer = tesselator.getBuilder(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.enableBlend(); + RenderSystem.blendFuncSeparate(770, 771, 0, 1); + //RenderSystem.disableTexture(); + RenderSystem.setShader(GameRenderer::getPositionTexColorShader); + Matrix4f matrix = matrices.last().pose(); +- buffer.addVertex(matrix, 0, TOP + 4, 0.0F).setUv(0, 1).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, width, TOP + 4, 0.0F).setUv(1, 1).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, width, TOP, 0.0F).setUv(1, 0).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, 0, TOP, 0.0F).setUv(0, 0).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, 0, height - BOTTOM, 0.0F).setUv(0, 1).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, width, height - BOTTOM, 0.0F).setUv(1, 1).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, width, height - BOTTOM - 4, 0.0F).setUv(1, 0).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, 0, height - BOTTOM - 4, 0.0F).setUv(0, 0).setColor(0, 0, 0, 0); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ buffer.vertex(matrix, 0, TOP + 4, 0.0F).uv(0, 1).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, width, TOP + 4, 0.0F).uv(1, 1).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, width, TOP, 0.0F).uv(1, 0).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, 0, TOP, 0.0F).uv(0, 0).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, 0, height - BOTTOM, 0.0F).uv(0, 1).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, width, height - BOTTOM, 0.0F).uv(1, 1).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, width, height - BOTTOM - 4, 0.0F).uv(1, 0).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, 0, height - BOTTOM - 4, 0.0F).uv(0, 0).color(0, 0, 0, 0).endVertex(); ++ tesselator.end(); + //RenderSystem.enableTexture(); + RenderSystem.disableBlend(); + } +@@ -265,15 +267,16 @@ + + protected void overlayBackground(Matrix4f matrix, int minX, int minY, int maxX, int maxY, int red, int green, int blue, int startAlpha, int endAlpha) { + Tesselator tesselator = Tesselator.getInstance(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); RenderSystem.setShader(GameRenderer::getPositionTexColorShader); - RenderSystem.setShaderTexture(0, Screen.MENU_BACKGROUND); + RenderSystem.setShaderTexture(0, Screen.BACKGROUND_LOCATION); RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f); - buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - buffer.vertex(matrix, minX, maxY, 0.0F).uv(minX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); +- buffer.addVertex(matrix, minX, maxY, 0.0F).setUv(minX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha); +- buffer.addVertex(matrix, maxX, maxY, 0.0F).setUv(maxX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha); +- buffer.addVertex(matrix, maxX, minY, 0.0F).setUv(maxX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha); +- buffer.addVertex(matrix, minX, minY, 0.0F).setUv(minX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ buffer.vertex(matrix, minX, maxY, 0.0F).uv(minX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); ++ buffer.vertex(matrix, maxX, maxY, 0.0F).uv(maxX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); ++ buffer.vertex(matrix, maxX, minY, 0.0F).uv(maxX / 32.0F, minY / 32.0F).color(red, green, blue, startAlpha).endVertex(); ++ buffer.vertex(matrix, minX, minY, 0.0F).uv(minX / 32.0F, minY / 32.0F).color(red, green, blue, startAlpha).endVertex(); ++ tesselator.end(); + } + + public int scrollHeight() { diff --git a/patches/1.20.4/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch b/patches/1.20.4/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch new file mode 100644 index 0000000..b8e086e --- /dev/null +++ b/patches/1.20.4/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch @@ -0,0 +1,16 @@ +--- a/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java ++++ b/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java +@@ -7,11 +7,11 @@ + private final ResourceLocation internal; + + public ResourceIdentifier(String namespace, String path) { +- this.internal = ResourceLocation.fromNamespaceAndPath(namespace, path); ++ this.internal = new ResourceLocation(namespace, path); + } + + public ResourceIdentifier(String path) { +- this.internal = ResourceLocation.withDefaultNamespace(path); ++ this.internal = new ResourceLocation(path); + } + + public String getNamespace() { diff --git a/patches/1.20.4/Fabric/build.gradle.patch b/patches/1.20.4/Fabric/build.gradle.patch index 0272ed9..556c9df 100644 --- a/patches/1.20.4/Fabric/build.gradle.patch +++ b/patches/1.20.4/Fabric/build.gradle.patch @@ -4,8 +4,8 @@ setVersionType("release") setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-fabric.md") setProjectVersion("${minecraft_version}-${project.version}") -- setDisplayName("[FABRIC/QUILT 1.20.6] CraterLib - ${project.version}") -- setGameVersions("1.20.6") +- setDisplayName("[FABRIC/QUILT 1.21.0] CraterLib - ${project.version}") +- setGameVersions("1.21") + setDisplayName("[FABRIC/QUILT 1.20.4] CraterLib - ${project.version}") + setGameVersions("1.20.4") setLoaders("fabric", "quilt") diff --git a/patches/1.20.4/Fabric/src/main/resources/fabric.mod.json.patch b/patches/1.20.4/Fabric/src/main/resources/fabric.mod.json.patch index c97c881..0a76fef 100644 --- a/patches/1.20.4/Fabric/src/main/resources/fabric.mod.json.patch +++ b/patches/1.20.4/Fabric/src/main/resources/fabric.mod.json.patch @@ -4,7 +4,7 @@ "depends": { "fabricloader": ">=0.15.0", "fabric-api": "*", -- "minecraft": ">=1.20.6", +- "minecraft": ">=1.21", - "java": ">=21" + "minecraft": "1.20.4", + "java": ">=17" diff --git a/patches/1.20.4/NeoForge/build.gradle.patch b/patches/1.20.4/NeoForge/build.gradle.patch index c7770bd..b8e3cf4 100644 --- a/patches/1.20.4/NeoForge/build.gradle.patch +++ b/patches/1.20.4/NeoForge/build.gradle.patch @@ -1,5 +1,14 @@ --- a/NeoForge/build.gradle +++ b/NeoForge/build.gradle +@@ -31,7 +31,7 @@ + + unimined.minecraft { + neoForged { +- loader "net.neoforged:neoforge:${neoforge_version}:universal" ++ loader neoforge_version + mixinConfig("${mod_id}.mixins.json", "${mod_id}.neoforge.mixins.json") + } + } @@ -50,7 +50,7 @@ from project(":Common").sourceSets.main.resources def buildProps = project.properties.clone() @@ -13,8 +22,8 @@ setVersionType("release") setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-forge.md") setProjectVersion("${minecraft_version}-${project.version}") -- setDisplayName("[NeoForge 1.20.6] CraterLib - ${project.version}") -- setGameVersions("1.20.6") +- setDisplayName("[NeoForge 1.21.0] CraterLib - ${project.version}") +- setGameVersions("1.21") + setDisplayName("[NeoForge 1.20.4] CraterLib - ${project.version}") + setGameVersions("1.20.4") setLoaders("neoforge") diff --git a/patches/1.20.4/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch b/patches/1.20.4/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch index 27e2e32..e811538 100644 --- a/patches/1.20.4/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch +++ b/patches/1.20.4/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch @@ -22,13 +22,13 @@ -[[dependencies.${ mod_id }]] - modId = "neoforge" - type="required" -- versionRange = "[20.6,)" +- versionRange = "[21.0,)" - ordering = "NONE" - side = "BOTH" - -[[dependencies.${ mod_id }]] - modId = "minecraft" - type="required" -- versionRange = "[1.20.6,1.21)" +- versionRange = "[*,)" - ordering = "NONE" - side = "BOTH" diff --git a/patches/1.20.4/README.md.patch b/patches/1.20.4/README.md.patch new file mode 100644 index 0000000..e51d5b3 --- /dev/null +++ b/patches/1.20.4/README.md.patch @@ -0,0 +1,11 @@ +--- a/README.md ++++ b/README.md +@@ -15,7 +15,7 @@ + | < 1.18.2 | ❌ | + | 1.18.2-1.20.2 | ✳️ | + | 1.20.4 | ✳️ | +-| 1.20.6 | 🚧 | ++| 1.21 | 🚧 | + + - ❌ - Not Supported; no bug fixes or new features. + - 🚧 - Work in Progress; not ready for release. diff --git a/patches/1.20.4/gradle.properties.patch b/patches/1.20.4/gradle.properties.patch index 45ae265..2b3ee5a 100644 --- a/patches/1.20.4/gradle.properties.patch +++ b/patches/1.20.4/gradle.properties.patch @@ -4,13 +4,13 @@ mod_name=CraterLib # Shared --minecraft_version=1.20.6 +-minecraft_version=1.21-pre4 +minecraft_version=1.20.4 project_group=com.hypherionmc.craterlib # Fabric - fabric_loader=0.15.0 --fabric_api=0.97.8+1.20.6 + fabric_loader=0.15.11 +-fabric_api=0.100.0+1.21 +fabric_api=0.97.0+1.20.4 # Forge @@ -18,12 +18,12 @@ +forge_version=49.0.49 # NeoForged --neoforge_version=41-beta +-neoforge_version=21.0.0-alpha.1.21-pre4.20240609.095301 +neoforge_version=234 # Dependencies moon_config=1.0.9 -@@ -31,9 +31,9 @@ +@@ -31,15 +31,15 @@ # Mod Dependencies fabrictailor=2.3.1 @@ -36,3 +36,10 @@ vanishmod_neo=puxrKAMr # Publishing + curse_id=867099 + modrinth_id=Nn8Wasaq +-release_type=port ++release_type=release + + # Gradle + org.gradle.jvmargs=-Xmx3G diff --git a/patches/1.20.4/orbit.json.patch b/patches/1.20.4/orbit.json.patch new file mode 100644 index 0000000..4f0263d --- /dev/null +++ b/patches/1.20.4/orbit.json.patch @@ -0,0 +1,7 @@ +--- a/orbit.json ++++ /dev/null +@@ -1,4 +1,0 @@ +-{ +- "action": "port", +- "devBranch": "porting" +-} diff --git a/patches/1.20.4/settings.gradle.patch b/patches/1.20.4/settings.gradle.patch new file mode 100644 index 0000000..6ee7e7a --- /dev/null +++ b/patches/1.20.4/settings.gradle.patch @@ -0,0 +1,8 @@ +--- a/settings.gradle ++++ b/settings.gradle +@@ -11,4 +11,4 @@ + } + + rootProject.name = 'CraterLib' +-include("Common", "Fabric", "NeoForge") ++include("Common", "Fabric", "Forge", "NeoForge") diff --git a/patches/1.20/.jenkins/Jenkinsfile.deploy.patch b/patches/1.20/.jenkins/Jenkinsfile.deploy.patch index 22afbf1..7a3499f 100644 --- a/patches/1.20/.jenkins/Jenkinsfile.deploy.patch +++ b/patches/1.20/.jenkins/Jenkinsfile.deploy.patch @@ -7,9 +7,9 @@ - image "registry.firstdark.dev/java21:latest" + image "registry.firstdark.dev/java17:latest" alwaysPull true + args '-v gradle-cache:/home/gradle/.gradle' } - } -@@ -10,7 +10,7 @@ +@@ -15,7 +15,7 @@ stage("Notify Discord") { steps { discordSend webhookURL: env.FDD_WH_ADMIN, @@ -18,7 +18,7 @@ link: env.BUILD_URL, result: 'SUCCESS', description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})" -@@ -39,7 +39,7 @@ +@@ -44,7 +44,7 @@ deleteDir() discordSend webhookURL: env.FDD_WH_ADMIN, diff --git a/patches/1.20/.jenkins/Jenkinsfile.snapshot.patch b/patches/1.20/.jenkins/Jenkinsfile.snapshot.patch index 43c2357..f9f1fc3 100644 --- a/patches/1.20/.jenkins/Jenkinsfile.snapshot.patch +++ b/patches/1.20/.jenkins/Jenkinsfile.snapshot.patch @@ -11,9 +11,9 @@ - image "registry.firstdark.dev/java21:latest" + image "registry.firstdark.dev/java17:latest" alwaysPull true + args '-v gradle-cache:/home/gradle/.gradle' } - } -@@ -13,7 +14,7 @@ +@@ -18,7 +19,7 @@ stage("Notify Discord") { steps { discordSend webhookURL: env.SSS_WEBHOOK, @@ -22,7 +22,7 @@ link: env.BUILD_URL, result: 'SUCCESS', description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})" -@@ -29,14 +30,14 @@ +@@ -34,14 +35,14 @@ stage("Build") { steps { @@ -39,12 +39,12 @@ } } } -@@ -51,8 +52,8 @@ +@@ -56,8 +57,8 @@ projectSlug: "craterlib", projectName: "${projectName}", projectIcon: "${projectIcon}", -- modLoaders: "forge|neoforge|fabric|quilt", -- minecraftVersions: "1.20.6", +- modLoaders: "neoforge|fabric|quilt", +- minecraftVersions: "1.21", + modLoaders: "forge|fabric|quilt", + minecraftVersions: "1.20|1.20.1", failWebhook: env.SSS_WEBHOOK, diff --git a/patches/1.20/Common/gradle.properties.patch b/patches/1.20/Common/gradle.properties.patch new file mode 100644 index 0000000..cd35d4f --- /dev/null +++ b/patches/1.20/Common/gradle.properties.patch @@ -0,0 +1,5 @@ +--- a/Common/gradle.properties ++++ /dev/null +@@ -1,2 +1,0 @@ +-# We don't need the common jar to be remapped +-fabric.loom.dontRemap=true diff --git a/patches/1.20/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch b/patches/1.20/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch index 14e51e6..6f3651a 100644 --- a/patches/1.20/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch +++ b/patches/1.20/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java.patch @@ -1,5 +1,14 @@ --- a/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java +++ b/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java +@@ -158,7 +158,7 @@ + return new TextConfigOption<>(Objects::toString, BigDecimal::new); + } + if (value instanceof ResourceLocation) { +- return new TextConfigOption<>(Objects::toString, ResourceLocation::parse); ++ return new TextConfigOption<>(Objects::toString, ResourceLocation::new); + } + if (isSubConfig) { + return new SubConfigWidget<>(config, this, value); @@ -179,6 +179,7 @@ @Override public void render(@NotNull GuiGraphics matrices, int mouseX, int mouseY, float delta) { @@ -19,19 +28,106 @@ int y = (int) (TOP + 4 - Math.round(scrollerAmount)); for (Option option : options) { -@@ -268,9 +268,9 @@ +@@ -216,23 +216,24 @@ + int maxY = this.height - BOTTOM; + //RenderSystem.disableTexture(); + Tesselator tesselator = Tesselator.getInstance(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.setShader(GameRenderer::getPositionColorShader); +- +- buffer.addVertex(scrollbarPositionMinX, maxY, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMaxX, maxY, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMaxX, TOP, 0.0f).setColor(0, 0, 0, 255); +- buffer.addVertex(scrollbarPositionMinX, TOP, 0.0f).setColor(0, 0, 0, 255); +- +- buffer.addVertex(scrollbarPositionMinX, minY + height, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMaxX, minY + height, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMaxX, minY, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, minY, 0.0f).setColor(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, (minY + height - 1), 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex((scrollbarPositionMaxX - 1), (minY + height - 1), 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex((scrollbarPositionMaxX - 1), minY, 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- buffer.addVertex(scrollbarPositionMinX, minY, 0.0f).setColor(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR); ++ ++ buffer.vertex(scrollbarPositionMinX, maxY, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, maxY, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, TOP, 0.0D).color(0, 0, 0, 255).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, TOP, 0.0D).color(0, 0, 0, 255).endVertex(); ++ ++ buffer.vertex(scrollbarPositionMinX, minY + height, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, minY + height, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMaxX, minY, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, minY, 0.0D).color(SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, SCROLLBAR_BOTTOM_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, (minY + height - 1), 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex((scrollbarPositionMaxX - 1), (minY + height - 1), 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex((scrollbarPositionMaxX - 1), minY, 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ buffer.vertex(scrollbarPositionMinX, minY, 0.0D).color(SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, SCROLLBAR_TOP_COLOR, 1).endVertex(); ++ tesselator.end(); + RenderSystem.disableBlend(); + //RenderSystem.enableTexture(); + } +@@ -240,21 +241,22 @@ + + private void renderShadow(PoseStack matrices) { + Tesselator tesselator = Tesselator.getInstance(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.enableBlend(); + RenderSystem.blendFuncSeparate(770, 771, 0, 1); + //RenderSystem.disableTexture(); + RenderSystem.setShader(GameRenderer::getPositionTexColorShader); + Matrix4f matrix = matrices.last().pose(); +- buffer.addVertex(matrix, 0, TOP + 4, 0.0F).setUv(0, 1).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, width, TOP + 4, 0.0F).setUv(1, 1).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, width, TOP, 0.0F).setUv(1, 0).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, 0, TOP, 0.0F).setUv(0, 0).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, 0, height - BOTTOM, 0.0F).setUv(0, 1).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, width, height - BOTTOM, 0.0F).setUv(1, 1).setColor(0, 0, 0, 185); +- buffer.addVertex(matrix, width, height - BOTTOM - 4, 0.0F).setUv(1, 0).setColor(0, 0, 0, 0); +- buffer.addVertex(matrix, 0, height - BOTTOM - 4, 0.0F).setUv(0, 0).setColor(0, 0, 0, 0); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ buffer.vertex(matrix, 0, TOP + 4, 0.0F).uv(0, 1).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, width, TOP + 4, 0.0F).uv(1, 1).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, width, TOP, 0.0F).uv(1, 0).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, 0, TOP, 0.0F).uv(0, 0).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, 0, height - BOTTOM, 0.0F).uv(0, 1).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, width, height - BOTTOM, 0.0F).uv(1, 1).color(0, 0, 0, 185).endVertex(); ++ buffer.vertex(matrix, width, height - BOTTOM - 4, 0.0F).uv(1, 0).color(0, 0, 0, 0).endVertex(); ++ buffer.vertex(matrix, 0, height - BOTTOM - 4, 0.0F).uv(0, 0).color(0, 0, 0, 0).endVertex(); ++ tesselator.end(); + //RenderSystem.enableTexture(); + RenderSystem.disableBlend(); + } +@@ -265,15 +267,16 @@ + protected void overlayBackground(Matrix4f matrix, int minX, int minY, int maxX, int maxY, int red, int green, int blue, int startAlpha, int endAlpha) { Tesselator tesselator = Tesselator.getInstance(); - BufferBuilder buffer = tesselator.getBuilder(); +- BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - RenderSystem.setShader(GameRenderer::getPositionTexColorShader); - RenderSystem.setShaderTexture(0, Screen.MENU_BACKGROUND); ++ BufferBuilder buffer = tesselator.getBuilder(); + RenderSystem.setShaderTexture(0, Screen.BACKGROUND_LOCATION); RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f); +- buffer.addVertex(matrix, minX, maxY, 0.0F).setUv(minX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha); +- buffer.addVertex(matrix, maxX, maxY, 0.0F).setUv(maxX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha); +- buffer.addVertex(matrix, maxX, minY, 0.0F).setUv(maxX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha); +- buffer.addVertex(matrix, minX, minY, 0.0F).setUv(minX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha); +- BufferUploader.drawWithShader(buffer.buildOrThrow()); + RenderSystem.setShader(GameRenderer::getPositionTexColorShader); - buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - buffer.vertex(matrix, minX, maxY, 0.0F).uv(minX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); - buffer.vertex(matrix, maxX, maxY, 0.0F).uv(maxX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); -@@ -334,12 +334,12 @@ ++ buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); ++ buffer.vertex(matrix, minX, maxY, 0.0F).uv(minX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); ++ buffer.vertex(matrix, maxX, maxY, 0.0F).uv(maxX / 32.0F, maxY / 32.0F).color(red, green, blue, endAlpha).endVertex(); ++ buffer.vertex(matrix, maxX, minY, 0.0F).uv(maxX / 32.0F, minY / 32.0F).color(red, green, blue, startAlpha).endVertex(); ++ buffer.vertex(matrix, minX, minY, 0.0F).uv(minX / 32.0F, minY / 32.0F).color(red, green, blue, startAlpha).endVertex(); ++ tesselator.end(); + } + + public int scrollHeight() { +@@ -331,12 +334,12 @@ } @Override diff --git a/patches/1.20/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch b/patches/1.20/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch new file mode 100644 index 0000000..b8e086e --- /dev/null +++ b/patches/1.20/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java.patch @@ -0,0 +1,16 @@ +--- a/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java ++++ b/Common/src/main/java/com/hypherionmc/craterlib/nojang/resources/ResourceIdentifier.java +@@ -7,11 +7,11 @@ + private final ResourceLocation internal; + + public ResourceIdentifier(String namespace, String path) { +- this.internal = ResourceLocation.fromNamespaceAndPath(namespace, path); ++ this.internal = new ResourceLocation(namespace, path); + } + + public ResourceIdentifier(String path) { +- this.internal = ResourceLocation.withDefaultNamespace(path); ++ this.internal = new ResourceLocation(path); + } + + public String getNamespace() { diff --git a/patches/1.20/Fabric/build.gradle.patch b/patches/1.20/Fabric/build.gradle.patch index 089c855..80cd28f 100644 --- a/patches/1.20/Fabric/build.gradle.patch +++ b/patches/1.20/Fabric/build.gradle.patch @@ -4,8 +4,8 @@ setVersionType("release") setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-fabric.md") setProjectVersion("${minecraft_version}-${project.version}") -- setDisplayName("[FABRIC/QUILT 1.20.6] CraterLib - ${project.version}") -- setGameVersions("1.20.6") +- setDisplayName("[FABRIC/QUILT 1.21.0] CraterLib - ${project.version}") +- setGameVersions("1.21") + setDisplayName("[FABRIC/QUILT 1.20/1.20.1] CraterLib - ${project.version}") + setGameVersions("1.20", "1.20.1") setLoaders("fabric", "quilt") diff --git a/patches/1.20/Fabric/src/main/resources/fabric.mod.json.patch b/patches/1.20/Fabric/src/main/resources/fabric.mod.json.patch index 822e86c..a4a9160 100644 --- a/patches/1.20/Fabric/src/main/resources/fabric.mod.json.patch +++ b/patches/1.20/Fabric/src/main/resources/fabric.mod.json.patch @@ -4,7 +4,7 @@ "depends": { "fabricloader": ">=0.15.0", "fabric-api": "*", -- "minecraft": ">=1.20.6", +- "minecraft": ">=1.21", - "java": ">=21" + "minecraft": ">=1.20", + "java": ">=17" diff --git a/patches/1.20/NeoForge/build.gradle.patch b/patches/1.20/NeoForge/build.gradle.patch index 6d6a100..1e3bedc 100644 --- a/patches/1.20/NeoForge/build.gradle.patch +++ b/patches/1.20/NeoForge/build.gradle.patch @@ -34,7 +34,7 @@ - -unimined.minecraft { - neoForged { -- loader neoforge_version +- loader "net.neoforged:neoforge:${neoforge_version}:universal" - mixinConfig("${mod_id}.mixins.json", "${mod_id}.neoforge.mixins.json") - } -} @@ -106,8 +106,8 @@ - setVersionType("release") - setChangelog("https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-forge.md") - setProjectVersion("${minecraft_version}-${project.version}") -- setDisplayName("[NeoForge 1.20.6] CraterLib - ${project.version}") -- setGameVersions("1.20.6") +- setDisplayName("[NeoForge 1.21.0] CraterLib - ${project.version}") +- setGameVersions("1.21") - setLoaders("neoforge") - setArtifact(remapJar) - setCurseEnvironment("both") diff --git a/patches/1.20/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch b/patches/1.20/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch index 27e2e32..e811538 100644 --- a/patches/1.20/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch +++ b/patches/1.20/NeoForge/src/main/resources/META-INF/neoforge.mods.toml.patch @@ -22,13 +22,13 @@ -[[dependencies.${ mod_id }]] - modId = "neoforge" - type="required" -- versionRange = "[20.6,)" +- versionRange = "[21.0,)" - ordering = "NONE" - side = "BOTH" - -[[dependencies.${ mod_id }]] - modId = "minecraft" - type="required" -- versionRange = "[1.20.6,1.21)" +- versionRange = "[*,)" - ordering = "NONE" - side = "BOTH" diff --git a/patches/1.20/README.md.patch b/patches/1.20/README.md.patch new file mode 100644 index 0000000..e51d5b3 --- /dev/null +++ b/patches/1.20/README.md.patch @@ -0,0 +1,11 @@ +--- a/README.md ++++ b/README.md +@@ -15,7 +15,7 @@ + | < 1.18.2 | ❌ | + | 1.18.2-1.20.2 | ✳️ | + | 1.20.4 | ✳️ | +-| 1.20.6 | 🚧 | ++| 1.21 | 🚧 | + + - ❌ - Not Supported; no bug fixes or new features. + - 🚧 - Work in Progress; not ready for release. diff --git a/patches/1.20/gradle.properties.patch b/patches/1.20/gradle.properties.patch index a3f51a3..44ab41f 100644 --- a/patches/1.20/gradle.properties.patch +++ b/patches/1.20/gradle.properties.patch @@ -4,25 +4,25 @@ mod_name=CraterLib # Shared --minecraft_version=1.20.6 +-minecraft_version=1.21-pre4 +minecraft_version=1.20 project_group=com.hypherionmc.craterlib # Fabric - fabric_loader=0.15.0 --fabric_api=0.97.8+1.20.6 + fabric_loader=0.15.11 +-fabric_api=0.100.0+1.21 +fabric_api=0.83.0+1.20 # Forge -forge_version=50.0.6 - -# NeoForged --neoforge_version=41-beta +-neoforge_version=21.0.0-alpha.1.21-pre4.20240609.095301 +forge_version=46.0.14 # Dependencies moon_config=1.0.9 -@@ -30,11 +27,10 @@ +@@ -30,16 +27,15 @@ discord_formatter=2.0.0 # Mod Dependencies @@ -38,3 +38,9 @@ # Publishing curse_id=867099 + modrinth_id=Nn8Wasaq +-release_type=port ++release_type=release + + # Gradle + org.gradle.jvmargs=-Xmx3G diff --git a/patches/1.20/orbit.json.patch b/patches/1.20/orbit.json.patch new file mode 100644 index 0000000..4f0263d --- /dev/null +++ b/patches/1.20/orbit.json.patch @@ -0,0 +1,7 @@ +--- a/orbit.json ++++ /dev/null +@@ -1,4 +1,0 @@ +-{ +- "action": "port", +- "devBranch": "porting" +-} diff --git a/patches/1.20/settings.gradle.patch b/patches/1.20/settings.gradle.patch index 671df0b..b23adaa 100644 --- a/patches/1.20/settings.gradle.patch +++ b/patches/1.20/settings.gradle.patch @@ -4,5 +4,5 @@ } rootProject.name = 'CraterLib' --include("Common", "Fabric", "NeoForge", "Forge") +-include("Common", "Fabric", "NeoForge") +include("Common", "Fabric", "Forge")