Skip to content

Releases: FabricMC/fabric-loom

Loom 1.7

18 Jun 08:12
097fd98
Compare
Choose a tag to compare
  • Update to Gradle 8.8
  • Workaround a Java bug causing the closed zip file system errors
  • Add manifest entry allowing deps to define known bsms
  • Make Vineflower the default decompiler
  • Improve error message when failing to parse FMJ json files
  • Improve the code behind include
  • Improvements to the decompiler cache
  • Fix Mojang mappings with noIntermediateMappings
  • More work towards Gradle configuration caching support, full support to come later
  • Misc smaller fixes/improvements

Loom 1.6

01 Apr 14:39
Compare
Choose a tag to compare
  • Decompiler cache
  • Generics support for injected interfaces
  • Support merging pre 1.3 Minecraft versions
  • Refactor/improve kotlin metadata remapping
  • Print info about locked files during configuration or genSources
  • Improve locking strategy for concurrent loom executions
  • Update to Gradle 8.6
  • Async line number remapping
  • Prepare for SelfResolvingDependency's removal
  • Fallback to maven central for artifacts such as sources or javadocs that are not mirrored on Mojang's repo
  • Introduce SemVer version parsing for included mods/libraries
  • Download intermediary using Gradle
  • Add API to get named minecraft jars
  • Add RemapJarTask.getOptimizeFabricModJson (disabled by default)
  • Prevent Gradle from running vscode task asynchronously
  • Add classname to stracktrace when Kotlin remapping fails
  • Fix datagen run config having incorrect name
  • Don't fail setup if a project fabric.mod.json file is invalid
  • Fix idea sync task group
  • Only set startFirstThread on versions using LWJGL 3
  • Add interface injection unit test
  • Add Offline mode / locking test
  • Fix possible race condition in PrepareJarRemapTask when using MPO
  • Refactor MinecraftJarConfiguration and MinecraftMetadataProvider

Generated/detailed changelog

New Contributors

Full Changelog: 1.5...1.6

Loom 1.5

09 Jan 10:40
480dd5e
Compare
Choose a tag to compare
  • Finish of support for using Tiny Remapper to remap Mixin's, when enabled:
    • Mixin annotation processor is no longer used, mods will not contain a refmap json
    • Tiny Remapper is used to remap Mixin classes in place
    • Tiny Remapper now supports Mixin Extra's
    • Jars contain a new Fabric-Loom-Mixin-Remap-Type manifest entry, used when depending on external libraries.
    • Currently opt-in via loom.mixin.useLegacyMixinAp = false (Hopefully will be the default in future versions)
  • Rewrite "Download sources" hook to support latest Intelij version
  • Skip remapping tasks when the source and target namespace match
  • Removed Minecraft libraries from Tiny Remapper classpath, should improve performance and memory usage
  • No longer resolve source artifacts in CI builds
  • Fix Gradle 9 deprecations, by replacing usage of .getBuildDir() with .getLayout().getBuildDirectory()
  • Filter out realms connection error message from debug log
  • Fix mapping Minecraft version check for mappings
  • Check refmaps exist before adding them to mixin configs
  • Change how include disables transitive dependencies to allow platform dependencies to work
  • Allow disabling RunConfig appending project path
  • Add loom.getMinecraftVersion()
  • Read data generation modid from FMJ by default
  • Improved support on Raspberry Pi systems. Tested on a Pi 5 using Debian Bookworm
  • Process modImplementation first, to mitigate issues where the incorrect loader libraries are used
  • Remove jackson
  • Misc perf improvements, in certain situations loom 1.5 can be up to 50% faster!

Loom 1.4

30 Sep 15:41
b7c8013
Compare
Choose a tag to compare
  • Add https://vineflower.org/ decompiler support.
  • Update to Gradle 8.3, and latest version of all dependencies.
  • Add support for deprecated modules when using fabricApi.module
  • Lazily download decompilers. Also allows changing the decompiler version.
  • Two fixes causing outputs to not be reproducible in certain situations.
  • Add Fabric-Jar-Type manifest entry, either classes or sources. Can be used by mod distribution platforms to ensure that the correct jar is uploaded.
  • Add option to configure known INVOKEDYNAMIC BSMs.
  • Suppress the Failed to verify authentication error in the console log.
  • Share processed Minecraft jars between sub projects when the processor inputs are the same.

Loom 1.3

05 Jul 19:00
Compare
Choose a tag to compare
  • Rework how the generate sources task applies line mappings, making it more consistent.
  • Remaped jar/source output jars are now reproducible by default.
  • Don't allow running game/genSources tasks in parallel with each other. (Ever tried to run 10 copies of Minecraft at once :D)
  • Ensure jar manifest entries are first when reprocessing zip files.
  • Inner class interface injection fixes
  • Don't publish none main source sets by default
  • Support Kotlin 1.9.0 beta
  • Fix idea run configs with spaces in the name
  • Eclipse is added to the ANSI supported IDEs
  • Improvements to Minecraft metadata downloading, will now handle recently released Minecraft versions better.
  • Fix IncludedJarFactory using a shared cache dir, and fix including libraries not producing a reproducible output jar.
  • Apply AW's when remapping mods, fixes a few mods not working as expected in dev.
  • Fix custom intermediate mapping providers using the same cache key.
  • Improve genSources error messages.
  • Don't use arg files when running in a none ASCII file path.
  • Fix constructor mappings in layered mappings.
  • Create RunConfigurationSettings with Gradle's object factory.
  • Other smaller fixes and improvements.

Loom 1.2

27 Apr 12:02
Compare
Choose a tag to compare

This is mostly a small manintaince release to update the depedencies and fix some bugs.

  • Updated to Gradle 8.1.
  • Rewritten the Minecraft library handling:
    • Upgrades LWJGL when using Java 19 or later.
    • Supports the official Windows arm64 natives added in the 1.20 snapshots.
    • The code is now much easier to maintain and test.
  • Rewritten the Kotlin metadata remapping to support the latest metadata library.
  • Set roles on Loom's configurations.
  • Fix @Environment(EnvType.CLIENT) not being added to the named minecraft client jar when using split sources.
  • RunConfigSettings allow specifying the main class name.
  • Set a min heap size for the JVM used by the decompiler.

Loom 1.1

28 Jan 13:02
Compare
Choose a tag to compare
  • Generate and attach Minecraft sources when clicking 'Download Sources' in intelij, no 3rd party plugin required.
  • New MinecraftJarProcessor API replacing the deprecated JarProcessor API.
  • Add new fabric.loom.multiProjectOptimisation property to opt into complex optimistations for certain projects. This simplifies the logic used in simple projects, removing the prepareRemapJarTask. You should only enable this option when all of your sub projects share the same Minecraft and mappings versions.
  • Read Fabric-Loom-Remap from a dependencies manifest, this allows it to opt-in/out of remapping, even if it does not have a fabric.mod.json file.
  • Jar processor inputs such as interface injection or access wideners are now also read from project dependencies.
  • Support MinimalExternalModuleDependency as a FileSpec input. This allows using version catalogs with layered mappings.
  • Rework how memory intensive objects are handled, should hopefully reduece memory usage for certain project setups.
  • Fix a number of bugs with the mod configuration remapping, it should now have the same behaviour as the default Gradle configurations.
  • Large internal changes to prepare for supporting upcoming fabric loader and Gradle features.
  • Many smaller bug fixes and changes.

Full changelog / diff:
dev/1.0...dev/1.1

Loom 1.0

28 Aug 10:38
Compare
Choose a tag to compare
  • Split incoming mod dependencies when using split common/client sourcesets.
  • Improvements to error handling/reporting and bad state recovery, reducing the need for clearing caches or --refresh-dependencies.
  • Add API to configure mod remapping configurations (clientModImplementation is added when using split sourcesets)
  • Improve VSCode launch configurations for multi project builds.
  • Use Java argfiles to support long command lines (Lots of dependencies). (Also worksaround a crash with newer AMD drivers)
  • Include client only entries manifest entry in sources jar.
  • Add stable APIs for use by the "MinecraftDev" intelij plugin.
  • Add DSL for the Mixin annotation processor message levels.
  • Support setting environment variables in run configurations.
  • Use TinyRemapper's Ref counting FileSystemHandler.
  • Rewrite download handling to be more resilient and maintainable.
  • Add (opt-in) ValidateMixinNames task to validate mixin class names match their target.
  • A wide range of smaller bug fixes and performance improvements.

This update is focused around finalising the split sourceset feature and improving the reliability of loom overall. Loom will now attempt to recover from a previously failed or canceled build. The move to version 1.0 will allow us to better denote any breaking API changes to future loom versions.

Split common/client code

Loom 1.0 provides a full suite of tools to build a mod with split common/client code. The previous loom version introduced compile time safety when compiling against Minecraft code. Loom 1.0 expands this to incoming mod dependencies such as Fabric API. Any mod dependency that was also built with this will be split and applied to the correct sourceset, this ensures that you cannot depend on a client only API from your common code.

Please see the updated Loom wiki page with details on how to enable this for your project. https://fabricmc.net/wiki/documentation:fabric_loom

To update please set your loom version to 1.0-SNAPSHOT at the top of your build.gradle file.

Loom 0.12

24 May 17:43
Compare
Choose a tag to compare
  • Support Minecraft 1.19
  • Add opt-in option to split client code into its own source set (experimental)
  • Add DSL for mod classpath groups (experimental)
  • Major improvements and fixes to Kotlin metadata remapping
  • Support all older versions of Minecraft (1.13.2 -> a1.2.5 tested)
    • Fabric does not offer mappings or APIs for these versions, you will need to supply your own.
  • Dependent mods can provide addional javadoc comments
  • Many bug fixes and smaller improvements

See full list of changes here

Split Sourcesets

For years a common source of server crashes has been from mods accidentally calling client only code when installed on a server. Starting with Loom 0.12 and Loader 0.14 an experimental option has been added to require all client code to be moved into its own sourceset. This is done to provide a compile-time guarantee against calling client only Minecraft code on the server. A single jar file that works on both the client and server is built from the two sourcesets.

The following snippet from a build.gradle file shows how you can enable this for your mod. As your mod will now be split across two sourcesets, you will need to use the new DSL to define your mods sourcesets. This enables Fabric Loader to group your mods classpath together. This DSL is also useful for some other complex multi-project setups.

loom {
   splitEnvironmentSourceSets()

    mods {
        modid {
            sourceSet sourceSets.main
            sourceSet sourceSets.client
        }
    }
 }

This feature has been in development for almost 6 months, requiring major changes to Loom and Loader. Due to the fundamental changes issues are expected, so if you do find an issue please make sure to report it.

Even though this is still an experimental feature Fabric API already makes use of this in the 1.19 branch. There are still some improvements and related features that are planned for future loom versions, that will allow modders to get the most out of this. Meanwhile for more advanced modders that like trying out new things it should be in a good enough state to use.

Loom 0.11

24 Jan 19:51
Compare
Choose a tag to compare

Loom 0.11

  • Interface Injection
    • Provides a simple way for mods to add an interface to Minecraft classes.
    • Mixin should be used to implement the interface on the class at runtime.
    • Comments are added to the decompiled source noting the mod id for the injected interface.
  • Add server only option for mods that only target the server.
    • Compile-time safety to prevent accidental usage of client only classes.
    • Improved performance as there is less to download, process and decompile.
  • Full support for computers using the ARM processor architecture.
    • Supports MacOS (Apple silicon), Windows and Linux
    • Updates LWJGL to 3.3.0 and uses the official ARM natives.
    • Automatically includes a small mod to fix a MacOS only issue for older Minecraft versions.
  • Kotlin class metadata remapping.
    • Fixes issues with kotlinx.serialization and issues when depending on kotlin libraries.
  • Exclude client only Minecraft libraries from server run configurations in Inteliij or Gradle.
  • Add an option to remove log4j from the compile classpath.
    • Mods should move over to using SLF4j
  • Highly experimental support for splitting the minecraft jar into common and client only jar files.
    • Currently unsupported by fabric-loader, future loom versions will build upon this.
  • Improvements to the decompiler API.
    • Additional functionality exposed for 3rd party decompilers.
    • Register default decompilers earlier so they can be configured without using afterEvaluate.
    • Better support for multiple decompile tasks.
  • Update to Java 17 and Gradle 7.3
  • Continued work on performance improvements
    • Project configuration time has been reduced by moving some launch requirements such as extracting natives and writing dli/log4j configuration files to pre launch tasks.
    • Remap jar and sources tasks have been rewritten to run asynchronously when Parallel execution is enabled.
    • More resources are now shared between multi-project setups, reducing memory consumption. Even when the shared caches option is not possible.
  • A number of other misc bug fixes and smaller improvements.

Interface Injection

Interface injection is a compile time only feature, this means that a Mixin should also be used to implement the interface onto the target class. The following snippet can be added to your fabric.mod.json file to add an interface to the net/minecraft/block/Block class.

{
  "custom": {
    "loom:injected_interfaces": {
      "net/minecraft/class_2248": ["net/fabricmc/example/ExampleInterface"]
    }
  }
}

New Options

loom {
    // Disables client related features and resources.
    serverOnlyMinecraftJar()
    // Enable runtime only log4j, forces mods to use SLF4J for logging.
    runtimeOnlyLog4j = true
}

Loom 0.11 contains major rewrites to a number of core functions to make a lot of these new features possible, if you find any issues please make sure to report them.