Merge branch 'main' of gitlab.com:jeseibel/minecraft-lod-mod

This commit is contained in:
James Seibel
2023-07-22 12:40:19 -05:00
12 changed files with 40 additions and 52 deletions
+16 -27
View File
@@ -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
+2 -2
View File
@@ -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"
}
@@ -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);
@@ -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 <https://www.gnu.org/licenses/>.
*/
@@ -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
}
@@ -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
@@ -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
}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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
+3 -3
View File
@@ -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