Fix some iris issues on Neoforge
This commit is contained in:
+4
-12
@@ -34,22 +34,14 @@ import net.irisshaders.iris.api.v0.IrisApi;
|
||||
public class IrisAccessor implements IIrisAccessor
|
||||
{
|
||||
@Override
|
||||
public String getModName()
|
||||
{
|
||||
return Iris.MODID;
|
||||
}
|
||||
public String getModName() { return Iris.MODID; }
|
||||
|
||||
@Override
|
||||
public boolean isShaderPackInUse()
|
||||
{
|
||||
return IrisApi.getInstance().isShaderPackInUse();
|
||||
}
|
||||
public boolean isShaderPackInUse() { return IrisApi.getInstance().isShaderPackInUse(); }
|
||||
|
||||
@Override
|
||||
public boolean isRenderingShadowPass()
|
||||
{
|
||||
return IrisApi.getInstance().isRenderingShadowPass();
|
||||
}
|
||||
public boolean isRenderingShadowPass() { return IrisApi.getInstance().isRenderingShadowPass(); }
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -65,6 +65,10 @@ dependencies {
|
||||
|
||||
// Neoforge
|
||||
neoForge "net.neoforged:neoforge:${rootProject.neoforge_version}"
|
||||
|
||||
// Iris
|
||||
addMod("maven.modrinth:iris:${rootProject.neo_iris_version}", rootProject.neo_enable_iris)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,10 +31,12 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftRen
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.misc.IPluginPacketSender;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.misc.IServerPlayerWrapper;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IC2meAccessor;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IIrisAccessor;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IModChecker;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IOptifineAccessor;
|
||||
import com.seibel.distanthorizons.coreapi.ModInfo;
|
||||
import com.seibel.distanthorizons.neoforge.wrappers.modAccessor.C2meAccessor;
|
||||
import com.seibel.distanthorizons.neoforge.wrappers.modAccessor.IrisAccessor;
|
||||
import com.seibel.distanthorizons.neoforge.wrappers.NeoforgeMinecraftRenderWrapper;
|
||||
import com.seibel.distanthorizons.neoforge.wrappers.modAccessor.ModChecker;
|
||||
import com.seibel.distanthorizons.neoforge.wrappers.modAccessor.OptifineAccessor;
|
||||
@@ -148,6 +150,11 @@ public class NeoforgeMain extends AbstractModInitializer
|
||||
this.tryCreateModCompatAccessor("optifine", IOptifineAccessor.class, OptifineAccessor::new);
|
||||
this.tryCreateModCompatAccessor("c2me", IC2meAccessor.class, C2meAccessor::new);
|
||||
|
||||
#if MC_VER >= MC_1_20_6
|
||||
// 1.20.6 is the lowest version Iris supports Neoforge
|
||||
this.tryCreateModCompatAccessor("iris", IIrisAccessor.class, IrisAccessor::new);
|
||||
#endif
|
||||
|
||||
#if MC_VER < MC_1_20_6
|
||||
ModLoadingContext.get().registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory.class,
|
||||
() -> new ConfigScreenHandler.ConfigScreenFactory((client, parent) -> GetConfigScreen.getScreen(parent)));
|
||||
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* This file is part of the Distant Horizons mod
|
||||
* licensed under the GNU LGPL v3 License.
|
||||
*
|
||||
* Copyright (C) 2020 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.distanthorizons.neoforge.wrappers.modAccessor;
|
||||
|
||||
// 1.20.6 is the lowest version Iris supports Neoforge
|
||||
#if MC_VER >= MC_1_20_6
|
||||
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IIrisAccessor;
|
||||
|
||||
#if MC_VER != MC_1_21_9
|
||||
import net.irisshaders.iris.Iris;
|
||||
import net.irisshaders.iris.api.v0.IrisApi;
|
||||
#endif
|
||||
|
||||
public class IrisAccessor implements IIrisAccessor
|
||||
{
|
||||
@Override
|
||||
public String getModName()
|
||||
{
|
||||
#if MC_VER == MC_1_21_9
|
||||
return "iris"; // Iris doesn't support this MC version
|
||||
#else
|
||||
return Iris.MODID;
|
||||
#endif
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShaderPackInUse()
|
||||
{
|
||||
#if MC_VER == MC_1_21_9
|
||||
return true; // Iris doesn't support this MC version
|
||||
#else
|
||||
return IrisApi.getInstance().isShaderPackInUse();
|
||||
#endif
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRenderingShadowPass()
|
||||
{
|
||||
#if MC_VER == MC_1_21_9
|
||||
return false; // Iris doesn't support this MC version
|
||||
#else
|
||||
return IrisApi.getInstance().isRenderingShadowPass();
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,10 +45,12 @@ fabric_api_version=0.97.8+1.20.6
|
||||
forge_version=
|
||||
neoforge_version=20.6.136
|
||||
neoforge_version_range=[*,)
|
||||
|
||||
|
||||
# NeoForge mod versions
|
||||
neo_iris_version=1.8.12+1.21.1-neoforge
|
||||
|
||||
# (Neo)Forge mod run
|
||||
# 0 = Don't enable and don't run
|
||||
# 1 = Can be referenced in code but doesn't run
|
||||
# 2 = Can be referenced in code and runs in client
|
||||
neo_enable_iris=1
|
||||
|
||||
@@ -43,12 +43,15 @@ fabric_api_version=0.115.0+1.21.1
|
||||
|
||||
# NeoForge loader
|
||||
forge_version=
|
||||
neoforge_version=21.1.192
|
||||
neoforge_version=21.1.216
|
||||
neoforge_version_range=[*,)
|
||||
|
||||
# NeoForge mod versions
|
||||
|
||||
neo_iris_version=1.8.12+1.21.1-neoforge
|
||||
|
||||
# (Neo)Forge mod run
|
||||
# 0 = Don't enable and don't run
|
||||
# 1 = Can be referenced in code but doesn't run
|
||||
# 2 = Can be referenced in code and runs in client
|
||||
neo_enable_iris=1
|
||||
|
||||
|
||||
@@ -41,12 +41,14 @@ fabric_api_version=0.138.3+1.21.10
|
||||
|
||||
# NeoForge loader
|
||||
forge_version=
|
||||
neoforge_version=21.10.55-beta
|
||||
neoforge_version=21.10.56-beta
|
||||
neoforge_version_range=[21.10.6-beta,)
|
||||
|
||||
# NeoForge mod versions
|
||||
|
||||
neo_iris_version=1.9.6+1.21.10-neoforge
|
||||
|
||||
# (Neo)Forge mod run
|
||||
# 0 = Don't enable and don't run
|
||||
# 1 = Can be referenced in code but doesn't run
|
||||
# 2 = Can be referenced in code and runs in client
|
||||
neo_enable_iris=1
|
||||
|
||||
@@ -47,8 +47,10 @@ neoforge_version=21.3.86
|
||||
neoforge_version_range=[*,)
|
||||
|
||||
# NeoForge mod versions
|
||||
neo_iris_version=1.8.1+1.21.3-neoforge
|
||||
|
||||
# (Neo)Forge mod run
|
||||
# 0 = Don't enable and don't run
|
||||
# 1 = Can be referenced in code but doesn't run
|
||||
# 2 = Can be referenced in code and runs in client
|
||||
neo_enable_iris=1
|
||||
|
||||
@@ -47,8 +47,10 @@ neoforge_version=21.4.147
|
||||
neoforge_version_range=[21.4.147,)
|
||||
|
||||
# NeoForge mod versions
|
||||
neo_iris_version=1.8.8+1.21.4-neoforge
|
||||
|
||||
# (Neo)Forge mod run
|
||||
# 0 = Don't enable and don't run
|
||||
# 1 = Can be referenced in code but doesn't run
|
||||
# 2 = Can be referenced in code and runs in client
|
||||
neo_enable_iris=1
|
||||
@@ -45,10 +45,11 @@ forge_version=
|
||||
neoforge_version=21.5.87
|
||||
neoforge_version_range=[*,)
|
||||
|
||||
|
||||
# NeoForge mod versions
|
||||
neo_iris_version=1.8.11+1.21.5-neoforge
|
||||
|
||||
# (Neo)Forge mod run
|
||||
# 0 = Don't enable and don't run
|
||||
# 1 = Can be referenced in code but doesn't run
|
||||
# 2 = Can be referenced in code and runs in client
|
||||
neo_enable_iris=1
|
||||
@@ -46,8 +46,10 @@ neoforge_version=21.6.20-beta
|
||||
neoforge_version_range=[21.6.19-beta,)
|
||||
|
||||
# NeoForge mod versions
|
||||
neo_iris_version=1.9.6+1.21.8-neoforge
|
||||
|
||||
# (Neo)Forge mod run
|
||||
# 0 = Don't enable and don't run
|
||||
# 1 = Can be referenced in code but doesn't run
|
||||
# 2 = Can be referenced in code and runs in client
|
||||
neo_enable_iris=1
|
||||
|
||||
@@ -41,13 +41,16 @@ fabric_api_version=0.133.4+1.21.8
|
||||
|
||||
# NeoForge loader
|
||||
forge_version=
|
||||
neoforge_version=21.8.2-beta
|
||||
neoforge_version=21.8.52
|
||||
# around 6.19 neo changed how their render API works, failing to meet this causes the game to crash
|
||||
neoforge_version_range=[*,)
|
||||
|
||||
# NeoForge mod versions
|
||||
|
||||
# NeoForge mod run
|
||||
# NeoForge mod versions
|
||||
neo_iris_version=1.9.6+1.21.8-neoforge
|
||||
|
||||
# (Neo)Forge mod run
|
||||
# 0 = Don't enable and don't run
|
||||
# 1 = Can be referenced in code but doesn't run
|
||||
# 2 = Can be referenced in code and runs in client
|
||||
neo_enable_iris=1
|
||||
|
||||
|
||||
@@ -45,10 +45,13 @@ neoforge_version=21.9.15-beta
|
||||
# sometime before 21.9.15-beta Neoforge changed how their rendering API events handle levels
|
||||
# so we can't support both versions at once
|
||||
neoforge_version_range=[21.9.15-beta,)
|
||||
|
||||
# NeoForge mod versions
|
||||
|
||||
# NeoForge mod versions
|
||||
# Iris doesn't exist for this MC version
|
||||
neo_iris_version=
|
||||
|
||||
# (Neo)Forge mod run
|
||||
# 0 = Don't enable and don't run
|
||||
# 1 = Can be referenced in code but doesn't run
|
||||
# 2 = Can be referenced in code and runs in client
|
||||
neo_enable_iris=0
|
||||
|
||||
Reference in New Issue
Block a user