From 7fb5e958099add33fcfc1f0cb1b4a6d7e18edaee Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sun, 1 Dec 2024 17:43:09 -0600 Subject: [PATCH] Add Fabric 1.21.3 support Also fixes: `Mod was built with a newer version of Loom (1.8.9), you are using Loom (1.7.415)` --- fabric/build.gradle | 2 +- .../wrappers/modAccessor/IrisAccessor.java | 19 +------------------ gradle.properties | 5 ++++- gradle/wrapper/gradle-wrapper.properties | 2 +- versionProperties/1.21.3.properties | 18 ++++++------------ 5 files changed, 13 insertions(+), 33 deletions(-) diff --git a/fabric/build.gradle b/fabric/build.gradle index b86aeaef6..bd88ccbfc 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -1,5 +1,5 @@ plugins { - id "fabric-loom" version "1.7-SNAPSHOT" + id "fabric-loom" version "1.8-SNAPSHOT" } loom { diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java index e89df759e..05bce2210 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java @@ -26,11 +26,9 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IIrisAccess #if MC_VER <= MC_1_20_4 import net.coderbot.iris.Iris; import net.irisshaders.iris.api.v0.IrisApi; -#elif MC_VER < MC_1_21_3 +#else import net.irisshaders.iris.Iris; import net.irisshaders.iris.api.v0.IrisApi; -#else -// TODO fabric/iris needs fixing for MC 1.21.3 #endif public class IrisAccessor implements IIrisAccessor @@ -38,34 +36,19 @@ public class IrisAccessor implements IIrisAccessor @Override public String getModName() { - // TODO - #if MC_VER < MC_1_21_3 return Iris.MODID; - #else - return "Iris-Fabric"; - #endif } @Override public boolean isShaderPackInUse() { - // TODO - #if MC_VER < MC_1_21_3 return IrisApi.getInstance().isShaderPackInUse(); - #else - return false; - #endif } @Override public boolean isRenderingShadowPass() { - // TODO - #if MC_VER < MC_1_21_3 return IrisApi.getInstance().isRenderingShadowPass(); - #else - return false; - #endif } } diff --git a/gradle.properties b/gradle.properties index 18cee0f89..a02af788d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -34,6 +34,9 @@ log4j_version=2.23.1 lwjgl_version=3.3.1 joml_version=1.10.2 +# Architectury config +# this is necessary for MC 1.21.3 because including Sodium and Iris throws "Mod was built with a newer version of Loom (1.8.9), you are using Loom (1.7.415)" +loom.ignoreDependencyLoomVersionValidation=true # These are here so they can be changed with cmd arguments @@ -48,7 +51,7 @@ versionStr= # This defines what MC version Intellij will use for the preprocessor # and what version is used automatically by build and run commands -mcVer=1.21.1 +mcVer=1.21.3 # Defines the maximum amount of memory Minecraft is allowed when run in a development environment #minecraftMemoryJavaArg="-Xmx4G" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a4413138c..9355b4155 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/versionProperties/1.21.3.properties b/versionProperties/1.21.3.properties index d0720a4f2..87fd7d1c7 100644 --- a/versionProperties/1.21.3.properties +++ b/versionProperties/1.21.3.properties @@ -4,13 +4,7 @@ minecraft_version=1.21.3 parchment_version=1.21:2024.07.28 compatible_minecraft_versions=["1.21.3"] accessWidenerVersion=1_21_3 -builds_for=neoforge -# fabric is broken due to an issue with their rendering event, issue link: https://github.com/FabricMC/fabric/issues/4195 - # Iris/Sodium are also broken due to some Fabric/Architectury issue - # attempting to activate either will throw the following error: - # "Mod was built with a newer version of Loom (1.8.9), you are using Loom (1.7.414)" - # IrisAccessor will need to be re-enabled when this is fixed - # updating to fabric-loom 1.8 (and gradle-8.10) prevent building/cleaning in Intellij due to file locks +builds_for=neoforge,fabric # forge is broken due to gradle/build script issues # Netty @@ -18,14 +12,14 @@ netty_version=4.1.97.Final # Fabric loader fabric_loader_version=0.16.9 -fabric_api_version=0.107.0+1.21.3 +fabric_api_version=0.110.0+1.21.3 # Fabric mod versions modmenu_version=12.0.0-beta.1 starlight_version_fabric= phosphor_version_fabric= lithium_version= - sodium_version=mc1.21.3-0.6.0-beta.4-fabric - iris_version=1.8.0-beta.6+1.21.2-fabric + sodium_version=mc1.21.3-0.6.0-fabric + iris_version=1.8.0+1.21.3-fabric bclib_version= immersive_portals_version= canvas_version= @@ -39,9 +33,9 @@ fabric_api_version=0.107.0+1.21.3 # 2 = Can be referenced in code and runs in client enable_starlight=0 enable_phosphor=0 - enable_sodium=0 + enable_sodium=1 enable_lithium=0 - enable_iris=0 + enable_iris=1 enable_bclib=0 enable_immersive_portals=0 enable_canvas=0