diff --git a/coreSubProjects b/coreSubProjects index 5ec874d4a..61564d891 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 5ec874d4a0df3e81767c210e62feac41334503af +Subproject commit 61564d89146b8e70b2bbfca46dcd6aa952766f00 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 b29afbc16..f06b7374a 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/FabricMain.java @@ -99,6 +99,15 @@ public class FabricMain { ModAccessorInjector.INSTANCE.bind(IBCLibAccessor.class, new BCLibAccessor()); } + + #if MC_1_16_5 || MC_1_18_2 || MC_1_19_2 || MC_1_19_4 || MC_1_20_1 + // 1.17.1 won't support this since there isn't a matching Iris version + if (SingletonInjector.INSTANCE.get(IModChecker.class).isModLoaded("iris")) + { + ModAccessorInjector.INSTANCE.bind(IIrisAccessor.class, new IrisAccessor()); + } + #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/IrisAccessor.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java new file mode 100644 index 000000000..37fe1b2a0 --- /dev/null +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/wrappers/modAccessor/IrisAccessor.java @@ -0,0 +1,50 @@ +/* + * This file is part of the Distant Horizons mod + * licensed under the GNU LGPL v3 License. + * + * Copyright (C) 2020-2023 James Seibel + * + * This program is free software: you can redistribute it and/or modify + * 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +package com.seibel.distanthorizons.fabric.wrappers.modAccessor; + +#if MC_1_16_5 || MC_1_18_2 || MC_1_19_2 || MC_1_19_4 || MC_1_20_1 + +import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IIrisAccessor; +import net.coderbot.iris.Iris; +import net.irisshaders.iris.api.v0.IrisApi; + +public class IrisAccessor implements IIrisAccessor +{ + @Override + public String getModName() + { + //return "Iris-Fabric"; + return Iris.MODID; + } + + @Override + public boolean isShaderPackInUse() + { + return IrisApi.getInstance().isShaderPackInUse(); + } + + @Override + public boolean isRenderingShadowPass() + { + return IrisApi.getInstance().isRenderingShadowPass(); + } +} + +#endif diff --git a/versionProperties/1.16.5.properties b/versionProperties/1.16.5.properties index c3683be84..4d9b764c6 100644 --- a/versionProperties/1.16.5.properties +++ b/versionProperties/1.16.5.properties @@ -15,7 +15,7 @@ fabric_api_version=0.42.0+1.16 phosphor_version_fabric= lithium_version=mc1.16.5-0.6.6 sodium_version=mc1.16.5-0.2.0 - iris_version=1.16.x-v1.2.5 + iris_version=1.4.4+1.16.5 bclib_version= immersive_portals_version= canvas_version= @@ -30,7 +30,7 @@ fabric_api_version=0.42.0+1.16 enable_phosphor=0 enable_lithium=0 enable_sodium=1 - enable_iris=0 + enable_iris=1 # not available via github, use curse.maven if necessary enable_bclib=0 enable_immersive_portals=0 diff --git a/versionProperties/1.18.2.properties b/versionProperties/1.18.2.properties index 62c33f7aa..6c188d603 100644 --- a/versionProperties/1.18.2.properties +++ b/versionProperties/1.18.2.properties @@ -16,7 +16,7 @@ fabric_api_version=0.76.0+1.18.2 phosphor_version_fabric=3573395 lithium_version=mc1.18.2-0.10.3 sodium_version=mc1.18.2-0.4.1 - iris_version=1.18.x-v1.6.4 + iris_version=1.6.6+1.18.2 bclib_version=1.4.6 immersive_portals_version=v1.4.11-1.18 canvas_version=mc118:1.0.2616 @@ -31,7 +31,7 @@ fabric_api_version=0.76.0+1.18.2 enable_phosphor=0 enable_sodium=1 enable_lithium=0 - enable_iris=0 + enable_iris=1 enable_bclib=1 enable_immersive_portals=0 enable_canvas=0 diff --git a/versionProperties/1.19.2.properties b/versionProperties/1.19.2.properties index cdde6a134..5f2da8945 100644 --- a/versionProperties/1.19.2.properties +++ b/versionProperties/1.19.2.properties @@ -15,7 +15,7 @@ fabric_api_version=0.76.0+1.19.2 phosphor_version_fabric= lithium_version= sodium_version=mc1.19.2-0.4.4 - iris_version=1.6.4+1.19.2 + iris_version=1.6.6+1.19.2 bclib_version=2.1.6 immersive_portals_version= canvas_version=mc119-1.0.2480 @@ -30,7 +30,7 @@ fabric_api_version=0.76.0+1.19.2 enable_phosphor=0 enable_sodium=1 enable_lithium=0 - enable_iris=0 + enable_iris=1 enable_bclib=1 enable_immersive_portals=0 enable_canvas=0 diff --git a/versionProperties/1.19.4.properties b/versionProperties/1.19.4.properties index 2783daeab..5763b87c8 100644 --- a/versionProperties/1.19.4.properties +++ b/versionProperties/1.19.4.properties @@ -15,7 +15,7 @@ fabric_api_version=0.83.0+1.19.4 phosphor_version_fabric= lithium_version= sodium_version=mc1.19.4-0.4.10 - iris_version=1.6.4+1.19.4 + iris_version=1.6.6+1.19.4 bclib_version=2.3.3 immersive_portals_version= canvas_version= @@ -30,7 +30,7 @@ fabric_api_version=0.83.0+1.19.4 enable_phosphor=0 enable_sodium=1 enable_lithium=0 - enable_iris=0 + enable_iris=1 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 0e88c741d..da1395f4d 100644 --- a/versionProperties/1.20.1.properties +++ b/versionProperties/1.20.1.properties @@ -15,7 +15,7 @@ fabric_api_version=0.85.0+1.20.1 phosphor_version_fabric= lithium_version= sodium_version=mc1.20.1-0.5.1 - iris_version=1.6.4+1.20.1 + iris_version=1.6.8+1.20.1 bclib_version=3.0.12 immersive_portals_version= canvas_version= @@ -30,7 +30,7 @@ fabric_api_version=0.85.0+1.20.1 enable_phosphor=0 enable_sodium=1 enable_lithium=0 - enable_iris=0 + enable_iris=1 enable_bclib=1 enable_immersive_portals=0 enable_canvas=0