mirror of
https://github.com/GTNewHorizons/GTNHLib.git
synced 2026-11-26 14:53:14 +00:00
Dont CapturingTessalator if OF/FC is loaded (#50)
* Dont CapturingTessalator if OF/FC is loaded * spotless
This commit is contained in:
1 parent
5157c9c6ad
commit
48c62819dc
2 files changed
+6
-3
No files matched your search
@@ -9,6 +9,7 @@ import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.core.transformer.TessellatorRedirectorTransformer;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.relauncher.FMLLaunchHandler;
|
||||
|
||||
public class MixinCompatHackTweaker implements ITweaker {
|
||||
@@ -34,7 +35,7 @@ public class MixinCompatHackTweaker implements ITweaker {
|
||||
final boolean rfbLoaded = Launch.blackboard.getOrDefault("gtnhlib.rfbPluginLoaded", Boolean.FALSE)
|
||||
== Boolean.TRUE;
|
||||
|
||||
if (!rfbLoaded) {
|
||||
if (!rfbLoaded && !(Loader.isModLoaded("Optifine") || Loader.isModLoaded("FastCraft"))) {
|
||||
// Run after Mixins, but before LWJGl3ify
|
||||
Launch.classLoader.registerTransformer(TessellatorRedirectorTransformer.class.getName());
|
||||
}
|
||||
|
||||
@@ -15,9 +15,11 @@ import cpw.mods.fml.relauncher.FMLLaunchHandler;
|
||||
public enum Mixins {
|
||||
|
||||
TESSELLATOR(new Builder("Sodium").addTargetedMod(TargetedMod.VANILLA).setSide(Side.CLIENT).setPhase(Phase.EARLY)
|
||||
.setApplyIf(() -> true).addMixinClasses("MixinTessellator")),
|
||||
.setApplyIf(() -> true).addExcludedMod(TargetedMod.OPTIFINE).addExcludedMod(TargetedMod.FASTCRAFT)
|
||||
.addMixinClasses("MixinTessellator")),
|
||||
WAVEFRONT_VBO(new Builder("WavefrontObject").addTargetedMod(TargetedMod.VANILLA).setSide(Side.CLIENT)
|
||||
.setPhase(Phase.EARLY).setApplyIf(() -> true).addMixinClasses("MixinWavefrontObject")),;
|
||||
.setPhase(Phase.EARLY).setApplyIf(() -> true).addExcludedMod(TargetedMod.OPTIFINE)
|
||||
.addExcludedMod(TargetedMod.FASTCRAFT).addMixinClasses("MixinWavefrontObject")),;
|
||||
|
||||
private final List<String> mixinClasses;
|
||||
private final Supplier<Boolean> applyIf;
|
||||
|
||||
Reference in new issue
Block a user