diff --git a/build.gradle b/build.gradle index 2052a109b9..30c56939ff 100644 --- a/build.gradle +++ b/build.gradle @@ -27,6 +27,7 @@ plugins { id 'com.github.ben-manes.versions' version '0.46.0' id 'net.minecraftforge.gradleutils' version '[2.2,2.3)' id 'eclipse' + id 'idea' id 'de.undercouch.download' version '5.4.0' id 'net.minecraftforge.gradle.patcher' version '[6.0.11,6.2)' apply false id 'net.minecraftforge.gradle.mcp' version '[6.0.11,6.2)' apply false @@ -53,12 +54,12 @@ ext { SPI_VERSION = '7.0.1' MERGETOOL_VERSION = '1.1.5' ACCESSTRANSFORMERS_VERSION = '8.0.4' - COREMODS_VERSION = '5.1.6' + COREMODS_VERSION = '5.2.1' EVENTBUS_VERSION = '6.0.5' MODLAUNCHER_VERSION = '10.0.9' SECUREJARHANDLER_VERSION = '2.1.10' BOOTSTRAPLAUNCHER_VERSION = '1.1.2' - ASM_VERSION = '9.7' + ASM_VERSION = '9.7.1' INSTALLER_VERSION = '2.2.+' MIXIN_VERSION = '0.8.5' TERMINALCONSOLEAPPENDER_VERSION = '1.2.0' @@ -302,7 +303,7 @@ def sharedDeps = { installer "org.jline:jline-reader:${JLINE_VERSION}" // Dep of TerminalConsoleAppender installer "org.jline:jline-terminal:${JLINE_VERSION}" // Dep of TerminalConsoleAppender installer "org.spongepowered:mixin:${MIXIN_VERSION}" - installer 'org.openjdk.nashorn:nashorn-core:15.3' + installer 'org.openjdk.nashorn:nashorn-core:15.4' installer "net.minecraftforge:JarJarSelector:${JARJAR_VERSION}" installer "net.minecraftforge:JarJarMetadata:${JARJAR_VERSION}" @@ -1820,3 +1821,11 @@ if (System.env.TEAMCITY_VERSION) { } } } + +idea { + module { + // IntelliJ IDEA does not do this by itself anymore... + downloadJavadoc = true + downloadSources = true + } +} diff --git a/fmlloader/src/main/java/net/minecraftforge/fml/loading/FMLLoader.java b/fmlloader/src/main/java/net/minecraftforge/fml/loading/FMLLoader.java index 721b9a18f8..40bc3c4250 100644 --- a/fmlloader/src/main/java/net/minecraftforge/fml/loading/FMLLoader.java +++ b/fmlloader/src/main/java/net/minecraftforge/fml/loading/FMLLoader.java @@ -65,6 +65,9 @@ public class FMLLoader throw new IncompatibleEnvironmentException("Incompatible modlauncher found "+modLauncherPackage.getSpecificationVersion()); } + // Allows us to communicate properties with other services through ModLauncher + setupBlackboardKeys(); + accessTransformer = (AccessTransformerService) environment.findLaunchPlugin("accesstransformer").orElseThrow(()-> { LOGGER.error(CORE, "Access Transformer library is missing, we need this to run"); return new IncompatibleEnvironmentException("Missing AccessTransformer, cannot run"); @@ -126,6 +129,12 @@ public class FMLLoader } } + private static void setupBlackboardKeys() { + LOGGER.debug(CORE, "Requesting CoreMods to not apply the fix for ASMAPI.findFirstInstructionBefore by default"); + var blackboardKey = TypesafeMap.Key.getOrCreate(Launcher.INSTANCE.blackboard(), "coremods.use_old_findFirstInstructionBefore", Boolean.class); + Launcher.INSTANCE.blackboard().computeIfAbsent(blackboardKey, k -> true); + } + static void setupLaunchHandler(final IEnvironment environment, final Map arguments) { final String launchTarget = environment.getProperty(IEnvironment.Keys.LAUNCHTARGET.get()).orElse("MISSING");