A Loom addon that adds Quiltflower as a Loom decompiler for non-Quilt distributions of Loom (upstream, Architectury etc.).
For the latest Fabric Loom 0.10 versions (0.10.28+), use loom-quiltflower-mini instead.
Loom variant | Plugin ID | Supported versions |
---|---|---|
Fabric Loom | fabric-loom |
0.8, 0.9, 0.11 |
Architectury Loom | dev.architectury.loom |
0.7.2, 0.7.4, 0.10.0¹, 0.11.0 |
Quilt Loom | org.quiltmc.loom |
0.12 |
¹ From build 0.10.0.206 onwards
Older versions might be compatible, but using them is unsupported. Bugs caused by outdated Loom versions will not be fixed.
- Add the Cotton maven repository to settings.gradle:
pluginManagement {
repositories {
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
+ maven {
+ name = 'Cotton'
+ url = 'https://server.bbkr.space/artifactory/libs-release/'
+ }
gradlePluginPortal()
}
}
- Add loom-quiltflower to your plugins:
plugins {
id 'fabric-loom' version '0.11-SNAPSHOT'
+ id 'io.github.juuxel.loom-quiltflower' version '1.7.0'
id 'maven-publish'
}
- Instead of
genSources
, you can now usegenSourcesWithQuiltflower
.
- Add the Cotton maven repository to settings.gradle:
pluginManagement {
repositories {
maven { url "https://maven.fabricmc.net/" }
maven { url "https://maven.architectury.dev/" }
maven { url "https://maven.minecraftforge.net/" }
+ maven {
+ name = 'Cotton'
+ url = 'https://server.bbkr.space/artifactory/libs-release/'
+ }
gradlePluginPortal()
}
}
- Add loom-quiltflower to your
plugins
block:
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "0.11.0-SNAPSHOT" apply false
+ id 'io.github.juuxel.loom-quiltflower' version '1.7.0' apply false
}
- Apply loom-quiltflower to subprojects:
subprojects {
apply plugin: "dev.architectury.loom"
+ apply plugin: "io.github.juuxel.loom-quiltflower"
Note: this can also be done in the subprojects'
plugins
blocks.
- Instead of
genSources
, you can now usegenSourcesWithQuiltflower
.
You can configure the used version of Quiltflower with the quiltflower
extension (called loomQuiltflower
before 1.2.0):
quiltflower {
// This is the default; 1.4.0 and above should work
quiltflowerVersion.set("1.8.0")
// If you're using Groovy DSL, you can also specify the version like this:
quiltflowerVersion = '1.8.0'
}
Added in LQF 1.2.0.
In addition to specifying a version, you can also use a completely different Quiltflower source.
They are configured with the quiltflower.source
property.
quiltflower {
// Downloads the wanted QF version from the QuiltMC Maven repo.
// This is the default behaviour.
fromQuiltMaven()
// Downloads the wanted QF version from the project repositories.
fromProjectRepositories()
// Resolves QF using a Gradle dependency.
// The parameter can be any dependency notation supported by Gradle.
fromDependency("a:b:1.2.3")
// Downloads or copies the wanted QF version from a URL.
fromUrl("https://address.to/the/quiltflower.jar")
// Uses a local QF file
fromFile("my-quiltflower.jar")
}
Added in LQF 1.2.0.
You can also change the preferences used to decompile the game. For changing the properties, you can either use their 3-letter names or, with some properties, a preset method.
Preset methods as of 1.4.0:
Method | ID | Description | Default |
---|---|---|---|
inlineSimpleLambdas |
isl |
Collapse single-line lambdas | 1 |
useJadVarnaming |
jvn |
Use JAD-style local variable naming from ForgeFlower | 0 |
patternMatching |
pam |
Experimental pattern matching support | 1 |
experimentalTryLoopFix |
tlf |
Experimental fix for interactions between try and loops |
1 |
quiltflower {
preferences {
// fake options: don't try at home
abc = 1
ghi = 'thing'
inlineSimpleLambdas 0
}
}
quiltflower {
preferences(
// fake options: don't try at home
"abc" to 1,
"ghi" to "thing",
)
preferences.inlineSimpleLambdas(0)
}
Added in LQF 1.3.0.
Preferences can also be declared in gradle.properties files using their 3-letter names, prefixed
with loom-quiltflower.preference.
.
# Fake option here too :^)
loom-quiltflower.preference.abc = 1
You can use the global gradle.properties file in the Gradle user home directory to set your wanted properties, like the indentation string, for each project that uses LQF.
Added in LQF 1.6.0. Only works on Fabric Loom 0.11+!
You can also configure the options with Loom's new decompiler options API:
Groovy DSL
loom {
decompilers {
quiltflower {
options += [
// optionName: "value"
abc: "a"
]
}
}
}
Kotlin DSL
loom {
decompilers {
getByName("quiltflower") {
options.put("<option name>", "<value>")
}
}
}