diff --git a/build.gradle b/build.gradle index de5f663..faf0802 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript { gradlePluginPortal() } dependencies { - classpath "com.github.johnrengelman:shadow:8.1.1" + classpath "io.github.goooler.shadow:shadow-gradle-plugin:8.1.7" classpath 'net.minecraftforge.gradle:ForgeGradle:6.0.+' classpath "org.spongepowered:mixingradle:0.7.+" } @@ -16,13 +16,12 @@ buildscript { apply plugin: 'net.minecraftforge.gradle' // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. -apply plugin: 'eclipse' apply plugin: 'maven-publish' -apply plugin: "com.github.johnrengelman.shadow" +apply plugin: "io.github.goooler.shadow" apply plugin: 'org.spongepowered.mixin' -version "1.3.3-beta" +version "1.3.4-beta" group "gkappa.wrapfix" archivesBaseName = "WrapFix" @@ -111,7 +110,7 @@ dependencies { exclude module: "gson" exclude module: "commons-io" }*/ - shade "com.ibm.icu:icu4j:74.2" + shade "com.ibm.icu:icu4j:75.1" // Common: annotationProcessor 'org.ow2.asm:asm-debug-all:5.2' @@ -196,7 +195,7 @@ shadowJar { configurations = [project.configurations.shade] relocate('com.ibm.icu','repack.com.ibm.icu') dependencies { - include(dependency("com.ibm.icu:icu4j:74.2")) + include(dependency("com.ibm.icu:icu4j:75.1")) } manifest { inheritFrom jar.manifest diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4518132..6e968fa 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip diff --git a/src/main/java/gkappa/wrapfix/WrapFix.java b/src/main/java/gkappa/wrapfix/WrapFix.java index 9e02dd9..2b33e62 100644 --- a/src/main/java/gkappa/wrapfix/WrapFix.java +++ b/src/main/java/gkappa/wrapfix/WrapFix.java @@ -11,7 +11,7 @@ public class WrapFix { public static final String MODID = "wrapfix"; public static final String NAME = "WrapFix"; - public static final String VERSION = "1.3.3-beta"; + public static final String VERSION = "1.3.4-beta"; public static final BreakIterator BREAK_ITERATOR = BreakIterator.getLineInstance(); public static Logger logger; diff --git a/src/main/java/gkappa/wrapfix/WrapFixConfig.java b/src/main/java/gkappa/wrapfix/WrapFixConfig.java index fec835d..17b93b9 100644 --- a/src/main/java/gkappa/wrapfix/WrapFixConfig.java +++ b/src/main/java/gkappa/wrapfix/WrapFixConfig.java @@ -4,7 +4,7 @@ @Config(modid = WrapFix.MODID, name = WrapFix.MODID) public class WrapFixConfig { - @Config.Comment("Do not set to true on Cleanroom") + @Config.Comment("Won't work on Cleanroom") public static boolean patchVanilla = true; public static boolean patchIndustrialWires = true; public static boolean patchBetterQuesting = true; diff --git a/src/main/java/gkappa/wrapfix/WrapFixLoadingPlugin.java b/src/main/java/gkappa/wrapfix/WrapFixLoadingPlugin.java index 5ecf589..e855de7 100644 --- a/src/main/java/gkappa/wrapfix/WrapFixLoadingPlugin.java +++ b/src/main/java/gkappa/wrapfix/WrapFixLoadingPlugin.java @@ -1,6 +1,10 @@ package gkappa.wrapfix; import com.cleanroommc.configanytime.ConfigAnytime; +import net.minecraftforge.fml.common.FMLCommonHandler; +import net.minecraftforge.fml.common.asm.FMLSanityChecker; +import net.minecraftforge.fml.relauncher.FMLLaunchHandler; +import net.minecraftforge.fml.relauncher.FMLSecurityManager; import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin.MCVersion; import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin.SortingIndex; @@ -19,8 +23,14 @@ @MCVersion("1.12.2") public class WrapFixLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader { + private static boolean isCleanroom = true; public WrapFixLoadingPlugin() { ConfigAnytime.register(WrapFixConfig.class); + try { + Class.forName("com.cleanroommc.common.CleanroomVersion"); + } catch (Throwable e) { + isCleanroom = false; + } } public String[] getASMTransformerClass() { return new String[0]; @@ -53,7 +63,7 @@ public List getMixinConfigs() { @Override public boolean shouldMixinConfigQueue(String mixinConfig) { if(mixinConfig.equals("wrapfix.mixins.json")) { - return WrapFixConfig.patchVanilla; + return WrapFixConfig.patchVanilla && !isCleanroom; } return IEarlyMixinLoader.super.shouldMixinConfigQueue(mixinConfig); } diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 507f1a6..f2c1137 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "wrapfix", "name": "WrapFix", "description": "Fix line wrapping", - "version": "1.3.3-beta", + "version": "1.3.4-beta", "mcversion": "1.12.2", "url": "", "updateUrl": "",