From 2d77efd8ea1225f512b0d28c4bfad56db6c5320b Mon Sep 17 00:00:00 2001 From: coolGi Date: Wed, 19 Jul 2023 22:19:01 +0930 Subject: [PATCH 01/11] Save commit for fog fix --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 3ed226345..5de3df15a 100644 --- a/build.gradle +++ b/build.gradle @@ -98,12 +98,12 @@ forgix { jarLocation = "build/libs/DistantHorizons-forge-${rootProject.versionStr}.jar" } - findProject(":fabric") + if (findProject(":fabric")) fabric { jarLocation = "build/libs/DistantHorizons-fabric-${rootProject.versionStr}.jar" } - findProject(":quilt") + if (findProject(":quilt")) quilt { jarLocation = "build/libs/DistantHorizons-quilt-${rootProject.versionStr}.jar" } From 74058397188610493b79ca26fb761c75ef28c7a7 Mon Sep 17 00:00:00 2001 From: coolGi Date: Wed, 19 Jul 2023 22:19:15 +0930 Subject: [PATCH 02/11] Updated core submodule --- coreSubProjects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreSubProjects b/coreSubProjects index 6a87a8759..fdb470b5b 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 6a87a87597026a69c6639668c8619f3d5690d72d +Subproject commit fdb470b5b388a6f225a0edff1bb0b7968b0aa641 From d8861f6100e7a80407bbf62a6f8f81eaa149b1f5 Mon Sep 17 00:00:00 2001 From: coolGi Date: Wed, 19 Jul 2023 22:40:21 +0930 Subject: [PATCH 03/11] Fixed bclib crash --- .../java/com/seibel/distanthorizons/fabric/FabricMain.java | 2 -- .../fabric/wrappers/modAccessor/BCLibAccessor.java | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java index 90ade3df6..89b5b9d25 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java @@ -84,11 +84,9 @@ public class FabricMain if (SingletonInjector.INSTANCE.get(IModChecker.class).isModLoaded("optifine")) { ModAccessorInjector.INSTANCE.bind(IOptifineAccessor.class, new OptifineAccessor()); } -/* #if POST_MC_1_17_1 if (SingletonInjector.INSTANCE.get(IModChecker.class).isModLoaded("bclib")) { ModAccessorInjector.INSTANCE.bind(IBCLibAccessor.class, new BCLibAccessor()); } - #endif*/ LOGGER.info(ModInfo.READABLE_NAME + " Initialized"); ApiEventInjector.INSTANCE.fireAllEvents(DhApiAfterDhInitEvent.class, null); diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java index a10704bcf..4a60ff671 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java @@ -1,6 +1,5 @@ package com.seibel.distanthorizons.fabric.wrappers.modAccessor; -#if POST_MC_1_17_1 && FALSE import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IBCLibAccessor; import ru.bclib.config.ClientConfig; import ru.bclib.config.Configs; @@ -16,5 +15,4 @@ public class BCLibAccessor implements IBCLibAccessor { // This disabled fog from rendering within bclib Configs.CLIENT_CONFIG.set(ClientConfig.CUSTOM_FOG_RENDERING, newValue); } -} -#endif \ No newline at end of file +} \ No newline at end of file From 2ee087f29d612370396984093faefcbb934ddced Mon Sep 17 00:00:00 2001 From: coolGi Date: Wed, 19 Jul 2023 23:36:25 +0930 Subject: [PATCH 04/11] Fixed bclib for newer versions --- .../fabric/wrappers/modAccessor/BCLibAccessor.java | 5 +++++ versionProperties/1.18.2.properties | 2 +- versionProperties/1.19.2.properties | 2 +- versionProperties/1.19.4.properties | 4 ++-- versionProperties/1.20.1.properties | 4 ++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java index 4a60ff671..2af653ddd 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java @@ -1,8 +1,13 @@ package com.seibel.distanthorizons.fabric.wrappers.modAccessor; import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IBCLibAccessor; +#if PRE_MC_1_19_2 import ru.bclib.config.ClientConfig; import ru.bclib.config.Configs; +#else +import org.betterx.bclib.config.ClientConfig; +import org.betterx.bclib.config.Configs; +#endif public class BCLibAccessor implements IBCLibAccessor { @Override diff --git a/versionProperties/1.18.2.properties b/versionProperties/1.18.2.properties index 6b02cc7f1..29124249f 100644 --- a/versionProperties/1.18.2.properties +++ b/versionProperties/1.18.2.properties @@ -17,7 +17,7 @@ fabric_api_version=0.76.0+1.18.2 lithium_version=mc1.18.2-0.10.3 sodium_version=mc1.18.2-0.4.1 iris_version=1.18.x-v1.6.4 - bclib_version=1.4.5 + bclib_version=1.4.6 immersive_portals_version=v1.4.11-1.18 canvas_version=mc118:1.0.2616 diff --git a/versionProperties/1.19.2.properties b/versionProperties/1.19.2.properties index 120f7b43a..8807dcf7a 100644 --- a/versionProperties/1.19.2.properties +++ b/versionProperties/1.19.2.properties @@ -16,7 +16,7 @@ fabric_api_version=0.76.0+1.19.2 lithium_version= sodium_version=mc1.19.2-0.4.4 iris_version=1.6.4+1.19.2 - bclib_version=1.4.5 + bclib_version=2.1.6 immersive_portals_version= canvas_version=mc119-1.0.2480 diff --git a/versionProperties/1.19.4.properties b/versionProperties/1.19.4.properties index 348fc2543..5182f16b7 100644 --- a/versionProperties/1.19.4.properties +++ b/versionProperties/1.19.4.properties @@ -16,7 +16,7 @@ fabric_api_version=0.83.0+1.19.4 lithium_version= sodium_version=mc1.19.4-0.4.10 iris_version=1.6.4+1.19.4 - bclib_version= + bclib_version=2.3.3 immersive_portals_version= canvas_version= @@ -29,7 +29,7 @@ fabric_api_version=0.83.0+1.19.4 enable_sodium=1 enable_lithium=0 enable_iris=0 - enable_bclib=0 + enable_bclib=1 enable_immersive_portals=0 enable_canvas=0 diff --git a/versionProperties/1.20.1.properties b/versionProperties/1.20.1.properties index b5944c061..da1956dd5 100644 --- a/versionProperties/1.20.1.properties +++ b/versionProperties/1.20.1.properties @@ -16,7 +16,7 @@ fabric_api_version=0.85.0+1.20.1 lithium_version= sodium_version=mc1.20-0.4.10 iris_version=1.6.4+1.20.1 - bclib_version= + bclib_version=3.0.11 immersive_portals_version= canvas_version= @@ -29,7 +29,7 @@ fabric_api_version=0.85.0+1.20.1 enable_sodium=1 enable_lithium=0 enable_iris=0 - enable_bclib=0 + enable_bclib=1 enable_immersive_portals=0 enable_canvas=0 From eaa61098fa09902851567e7674c3837f25f329f8 Mon Sep 17 00:00:00 2001 From: coolGi Date: Wed, 19 Jul 2023 23:37:21 +0930 Subject: [PATCH 05/11] Made ci bit smaller --- .gitlab-ci.yml | 43 ++++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 89d777e94..d58c6e3c6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ # use Eclipse's JDK image: gradle:eclipse-temurin -# The ci should always use an unix/unix-like OS to work +# The ci should always use a unix(-like) OS to work # all stages need to be defined here @@ -14,18 +14,26 @@ stages: - pages variables: - # Pull core when building - GIT_SUBMODULE_STRATEGY: recursive + # Pull core when building + GIT_SUBMODULE_STRATEGY: recursive -# This can be extended so code is a bit less duplicated +# These can be extended so code is a bit less duplicated +.build_java: + image: eclipse-temurin:17 + cache: + key: "gradleCache" + policy: pull-push + paths: + - .gradle + - cache/ + allow_failure: true .build_mc: script: # this both runs the unit tests and assembles the code - ./gradlew clean -PmcVer="${MC_VER}" --gradle-user-home cache/; - ./gradlew build -PmcVer="${MC_VER}" --gradle-user-home cache/; - ./gradlew mergeJars -PmcVer="${MC_VER}" --gradle-user-home cache/; - image: eclipse-temurin:17 artifacts: name: "NightlyBuild_${MC_VER}-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}" paths: @@ -43,13 +51,7 @@ variables: - quilt/build/libs/*-sources.jar expire_in: 1 day when: always - cache: - key: "gradleCache" - policy: pull-push - paths: - - .gradle - - cache/ - allow_failure: true + extends: .build_java # 1.18.2 build @@ -92,7 +94,6 @@ api: # this also runs unit tests - ./gradlew api:build --gradle-user-home cache/; - ./gradlew api:addSourcesToCompiledJar --gradle-user-home cache/; - image: eclipse-temurin:17 artifacts: name: "Api_NightlyBuild-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}" paths: @@ -104,13 +105,7 @@ api: - coreSubProjects/api/build/libs/merged/*-sources.jar expire_in: 1 day when: always - cache: - key: "gradleCache" - policy: pull-push - paths: - - .gradle - - cache/ - allow_failure: true + extends: .build_java # generate and publish API javadocs @@ -124,17 +119,11 @@ pages: - ./gradlew api:javadoc --gradle-user-home cache/; - mkdir public - cp -r $CI_PROJECT_DIR/coreSubProjects/api/build/docs/javadoc/. public - image: eclipse-temurin:17 artifacts: paths: - public - cache: - key: "gradleCache" - policy: pull-push - paths: - - .gradle - - cache/ allow_failure: false + extends: .build_java From 30d3d8c52ed80ff7b36b7e3dc372357dd107fde6 Mon Sep 17 00:00:00 2001 From: coolGi Date: Thu, 20 Jul 2023 20:12:53 +0930 Subject: [PATCH 06/11] Updated parchment version --- versionProperties/1.19.4.properties | 2 +- versionProperties/1.20.1.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/versionProperties/1.19.4.properties b/versionProperties/1.19.4.properties index 5182f16b7..f5c1bf17d 100644 --- a/versionProperties/1.19.4.properties +++ b/versionProperties/1.19.4.properties @@ -1,7 +1,7 @@ # 1.19.4 version java_version=17 minecraft_version=1.19.4 -parchment_version=1.19.3:2023.03.12 +parchment_version=1.19.3:2023.05.25 compatible_minecraft_versions=["1.19.4"] accessWidenerVersion=1_19_4 builds_for=fabric,forge diff --git a/versionProperties/1.20.1.properties b/versionProperties/1.20.1.properties index da1956dd5..1ee01acec 100644 --- a/versionProperties/1.20.1.properties +++ b/versionProperties/1.20.1.properties @@ -1,7 +1,7 @@ # 1.20.1 version java_version=17 minecraft_version=1.20.1 -parchment_version=1.19.3:2023.03.12 +parchment_version=1.19.3:2023.06.25 compatible_minecraft_versions=["1.20", "1.20.1"] accessWidenerVersion=1_20 builds_for=fabric,forge From eeaa836c458be8c29ed07ffec1e9e4b055eedf35 Mon Sep 17 00:00:00 2001 From: coolGi Date: Thu, 20 Jul 2023 20:13:44 +0930 Subject: [PATCH 07/11] Fixed improper location for remap (fixing forge 1.20.1) --- .../fabric/mixins/client/MixinLevelRenderer.java | 8 ++++---- .../fabric/mixins/client/MixinTextureUtil.java | 2 +- .../forge/mixins/client/MixinTextureUtil.java | 6 ++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java index c4a135d98..569d6c2c5 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java @@ -1,19 +1,19 @@ /* * This file is part of the Distant Horizons mod (formerly the LOD Mod), - * licensed under the GNU GPL v3 License. + * licensed under the GNU LGPL v3 License. * * Copyright (C) 2020-2022 James Seibel * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by + * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License + * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java index 6335fcd43..d37c22905 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java @@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.Redirect; @Mixin(TextureUtil.class) public class MixinTextureUtil { @Redirect(method = "Lcom/mojang/blaze3d/platform/TextureUtil;prepareImage(Lcom/mojang/blaze3d/platform/NativeImage$InternalGlFormat;IIII)V", - at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_texParameter(IIF)V", remap=false)) + at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_texParameter(IIF)V"), remap=false) private static void setLodBias(int target, int pname, float param) { float biasValue = Config.Client.Advanced.Graphics.AdvancedGraphics.lodBias.get().floatValue(); if (biasValue != 0) { diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinTextureUtil.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinTextureUtil.java index 553fda49e..dfc87e030 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinTextureUtil.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinTextureUtil.java @@ -12,11 +12,10 @@ import org.spongepowered.asm.mixin.injection.Redirect; * * @author coolGi */ - #if PRE_MC_1_20_1 // FIXME: Forge seems to be missing the mapping for this ,and remap=false doesn't work... Help @Mixin(TextureUtil.class) public class MixinTextureUtil { @Redirect(method = "Lcom/mojang/blaze3d/platform/TextureUtil;prepareImage(Lcom/mojang/blaze3d/platform/NativeImage$InternalGlFormat;IIII)V", - at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_texParameter(IIF)V", remap=false)) + at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_texParameter(IIF)V"), remap=false) private static void setLodBias(int target, int pname, float param) { float biasValue = Config.Client.Advanced.Graphics.AdvancedGraphics.lodBias.get().floatValue(); @@ -26,5 +25,4 @@ public class MixinTextureUtil { GlStateManager._texParameter(target, pname, biasValue); } } -} - #endif +} \ No newline at end of file From 93cfc644939087ed8d7d1f37a6fdffa1f622c05a Mon Sep 17 00:00:00 2001 From: coolGi Date: Thu, 20 Jul 2023 20:35:29 +0930 Subject: [PATCH 08/11] Fixed parchment version --- versionProperties/1.19.4.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionProperties/1.19.4.properties b/versionProperties/1.19.4.properties index f5c1bf17d..7ecad56ea 100644 --- a/versionProperties/1.19.4.properties +++ b/versionProperties/1.19.4.properties @@ -1,7 +1,7 @@ # 1.19.4 version java_version=17 minecraft_version=1.19.4 -parchment_version=1.19.3:2023.05.25 +parchment_version=1.19.3:2023.06.25 compatible_minecraft_versions=["1.19.4"] accessWidenerVersion=1_19_4 builds_for=fabric,forge From f1a7e69c638554c1625f0fb0de87e1e8226c1188 Mon Sep 17 00:00:00 2001 From: coolGi Date: Thu, 20 Jul 2023 21:06:20 +0930 Subject: [PATCH 09/11] Updated core submodule --- coreSubProjects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreSubProjects b/coreSubProjects index 7f51aef38..675682d63 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 7f51aef384e2982345d8264a7c69512ffecab3a7 +Subproject commit 675682d631ff09157119e6b13be8dfb812b5dc0e From 084bf635cb4504912b15f8c0e33eb566f29a84e3 Mon Sep 17 00:00:00 2001 From: coolGi Date: Fri, 21 Jul 2023 03:18:11 +0930 Subject: [PATCH 10/11] Fixed fabric crash --- .../distanthorizons/fabric/mixins/client/MixinTextureUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java index d37c22905..6335fcd43 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java @@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.Redirect; @Mixin(TextureUtil.class) public class MixinTextureUtil { @Redirect(method = "Lcom/mojang/blaze3d/platform/TextureUtil;prepareImage(Lcom/mojang/blaze3d/platform/NativeImage$InternalGlFormat;IIII)V", - at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_texParameter(IIF)V"), remap=false) + at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_texParameter(IIF)V", remap=false)) private static void setLodBias(int target, int pname, float param) { float biasValue = Config.Client.Advanced.Graphics.AdvancedGraphics.lodBias.get().floatValue(); if (biasValue != 0) { From 3f26a7016974bbd7e5bf680fe66b13cf82971704 Mon Sep 17 00:00:00 2001 From: coolGi Date: Fri, 21 Jul 2023 17:06:14 +0930 Subject: [PATCH 11/11] Fixed fog not being properly removed on forged --- .../distanthorizons/forge/mixins/client/MixinFogRenderer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinFogRenderer.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinFogRenderer.java index fcf609988..b51aaddc7 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinFogRenderer.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinFogRenderer.java @@ -50,7 +50,7 @@ public class MixinFogRenderer { @Inject(at = @At("RETURN"), method = "setupFog(Lnet/minecraft/client/Camera;Lnet/minecraft/client/renderer/FogRenderer$FogMode;FZF)V", - remap = #if MC_1_16_5 true #else false #endif) // Remap messiness due to this being added by forge. + remap = #if MC_1_16_5 || POST_AND_MC_1_19_2 true #else false #endif) // Remap messiness due to this being added by forge. private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, float partTick, CallbackInfo callback) { #if PRE_MC_1_17_1