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 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" } diff --git a/coreSubProjects b/coreSubProjects index 860374fd1..30b6600b7 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 860374fd1bb35eb3f8770d6f7d0d30ad80f2c01a +Subproject commit 30b6600b7d0e15c3a83d609e01a2ebc1e648cdbb 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/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/wrappers/modAccessor/BCLibAccessor.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/BCLibAccessor.java index a10704bcf..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,9 +1,13 @@ package com.seibel.distanthorizons.fabric.wrappers.modAccessor; -#if POST_MC_1_17_1 && FALSE 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 @@ -16,5 +20,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 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 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 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..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.03.12 +parchment_version=1.19.3:2023.06.25 compatible_minecraft_versions=["1.19.4"] accessWidenerVersion=1_19_4 builds_for=fabric,forge @@ -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..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 @@ -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