Skip to content

Commit

Permalink
Remove MixinExtras from GTNHMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
drori200 committed Oct 14, 2023
1 parent 618bd0d commit 81e2fa1
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 24 deletions.
3 changes: 0 additions & 3 deletions module-gtnhmixins/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
dependencies {
compileOnly('org.spongepowered:mixin:0.8.5')
compileOnly("com.github.LlamaLad7:MixinExtras:$mixinExtrasVersion")
shadow("com.github.LlamaLad7:MixinExtras:$mixinExtrasVersion")
shadow(project(":module-common")) {
transitive = false
}
Expand All @@ -15,7 +13,6 @@ shadowJar {
classifier = ''
configurations = [project.configurations.shadow]

relocate 'com.llamalad7.mixinextras', 'com.gtnewhorizon.mixinextras'
relocate 'org.objectweb.asm', 'org.spongepowered.asm.lib'
relocate 'io.github.legacymoddingmc.unimixins.common', 'io.github.legacymoddingmc.unimixins.gtnhmixins.repackage.common'

Expand Down
1 change: 0 additions & 1 deletion module-gtnhmixins/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
mixinExtrasVersion=0.1.1
extraVersion=2.1.13
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.google.common.util.concurrent.Runnables;
import com.gtnewhorizon.gtnhmixins.IEarlyMixinLoader;
import com.gtnewhorizon.gtnhmixins.Reflection;
import com.llamalad7.mixinextras.MixinExtrasBootstrap;

import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
import net.minecraft.launchwrapper.Launch;
Expand Down Expand Up @@ -45,9 +44,6 @@ public class GTNHMixinsCore implements IFMLLoadingPlugin {
LOGGER.info("Initializing GTNHMixins Core");

GTNHMixinsModule.init();
if(GTNHMixinsModule.isMixinExtrasEnabled()) {
MixinExtrasBootstrap.init();
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
import java.util.Arrays;
import java.util.List;

import io.github.legacymoddingmc.unimixins.common.abstraction.ComparableVersion;
import io.github.legacymoddingmc.unimixins.common.sanitycheck.SanityCheckHelper;
import net.minecraft.launchwrapper.Launch;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

Expand All @@ -21,20 +19,6 @@ public static void init() {
}
registerASMRemapPackage("com.gtnewhorizon.mixinextras");
}

public static boolean isMixinExtrasEnabled() {
String requiredVersion = "0.8.5";
String mixinVersion = (String)Launch.blackboard.get("mixin.initialised");
if(mixinVersion != null && new ComparableVersion(mixinVersion).compareTo(new ComparableVersion(requiredVersion)) >= 0) {
LOGGER.debug("Initializing MixinExtras");
return true;
} else if(!SanityCheckHelper.isEnabled()){
LOGGER.warn("Skipping MixinExtras because Mixin version (" + mixinVersion + ") is lower than the required (" + requiredVersion + ")");
return false;
} else {
throw new RuntimeException("Cannot load MixinExtras because Mixin version (" + mixinVersion + ") is lower than the required (" + requiredVersion + ")");
}
}

private static void registerASMRemapPackage(String pkg) {
try {
Expand Down

0 comments on commit 81e2fa1

Please sign in to comment.