Skip to content

Commit

Permalink
Patch aa late loader
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Oct 30, 2024
1 parent 6faee99 commit 5efe13c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ dependencies {
//Better Records
compileOnly(fg.deobf("curse.maven:br-222722:2930159"))

//Aqua Acrobatics
compileOnly(fg.deobf("curse.maven:aqua-321792:5225456"))

implementation("com.cleanroommc:groovyscript:1.1.1") {
transitive = false
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package com.cleanroommc.fugue.common;

import com.cleanroommc.fugue.config.FugueConfig;
import com.fuzs.aquaacrobatics.core.AquaAcrobaticsCore;
import net.minecraft.launchwrapper.Launch;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.ModContainer;
import zone.rong.mixinbooter.ILateMixinLoader;

import java.util.ArrayList;
Expand All @@ -15,14 +18,39 @@
public class FugueLateMixinLoader implements ILateMixinLoader {
@Override
public List<String> getMixinConfigs() {
List<String> configs = new ArrayList<>();
if (FugueConfig.modPatchConfig.fixTahumicSpeedup && Loader.isModLoaded("thaumicspeedup")) {
List<String> configs = new ArrayList<>();
configs.add("mixins.thaumicspeedup.json");
if (Loader.isModLoaded("betterwithmods")) {
configs.add("mixins.thaumicspeedup_bwmcompat.json");
}
return configs;
}
return List.of();
if (FugueConfig.modPatchConfig.enableAquaAcrobatics && Loader.isModLoaded("aquaacrobatics")) {
AquaAcrobaticsCore.LOGGER.info("Aqua Acrobatics is loading mod compatibility mixins");
if(Loader.isModLoaded("galacticraftcore")) {
configs.add("META-INF/mixins.aquaacrobatics.galacticraft.json");
}
if(Loader.isModLoaded("journeymap")) {
ModContainer jmMod = FMLCommonHandler.instance().findContainerFor("journeymap");
if(jmMod != null) {
String version = jmMod.getVersion();
if(version.equals("1.12.2-5.5.4")) {
configs.add("META-INF/mixins.aquaacrobatics.journeymap55.json");
} else if(version.equals("1.12.2-5.7.1")) {
configs.add("META-INF/mixins.aquaacrobatics.journeymap57.json");
} else {
AquaAcrobaticsCore.LOGGER.warn("You have JourneyMap " + version + " installed. Only 1.12.2-5.5.4 and 1.12.2-5.7.1 are patched for water color compatibility.");
}
}
}
if(Loader.isModLoaded("xaerominimap")) {
configs.add("META-INF/mixins.aquaacrobatics.xaerosminimap.json");
}
if(Loader.isModLoaded("thaumcraft")) {
configs.add("META-INF/mixins.aquaacrobatics.thaumcraft.json");
}
AquaAcrobaticsCore.isModCompatLoaded = true;
}
return configs;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,6 @@ public class ModPatchConfig {
public boolean enableLitematica = true;
@Config.Name("Enable Better Records Patch")
public boolean enableBetterRecords = true;
@Config.Name("Enable Aqua Acrobatics Patch")
public boolean enableAquaAcrobatics = true;
}

0 comments on commit 5efe13c

Please sign in to comment.