Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f725ff2
build: Update to Gradle 8.8
Johni0702 Jul 8, 2025
4180ba7
tests/fabric: Fix typos
Johni0702 Jul 7, 2025
5273df9
tests/lw: Fix logging
Johni0702 Jul 7, 2025
d2906b2
tests/lw: Move tweaker-specific tests into dedicated file
Johni0702 Jul 7, 2025
d09c317
tests/lw: Move props utils to dedicated class
Johni0702 Jul 7, 2025
669fc86
tests/lw: Move common stage1 tests to fabric project
Johni0702 Jul 7, 2025
e55c093
tests/lw: Move `sun.gg.essential.LoadState` into `minecraft` source set
Johni0702 Jul 7, 2025
f7e408c
tests/lw: Move `dummyInitialized` to `LoadState`
Johni0702 Jul 7, 2025
fbd170e
tests/lw: Make `getBlackboard` work with relaunching
Johni0702 Jul 7, 2025
c53d6bc
stage2/lw: Always relaunch
Johni0702 May 7, 2025
81d8d58
tests/lw: Drop requirement for Essential to be excluded from LaunchCl…
Johni0702 Jul 7, 2025
29d5ec0
stage2/lw: Fix outdated comment
Johni0702 May 7, 2025
ad54c60
stage2/lw: Handle embedded stage1 via transformer instead of modifyin…
Johni0702 May 7, 2025
d5469fa
stage2/lw: Move stage0 tracking to separate class
Johni0702 May 13, 2025
1a84118
stage2/lw: Move mixin tweaker injecting to separate class
Johni0702 May 13, 2025
aa8032a
stage2/lw: Copy additional code for MixinTweakerInjector from stage1
Johni0702 Jul 7, 2025
2ed3605
stage2/lw: Fix mixin appender cleanup with different class loader
Johni0702 Jul 8, 2025
0328875
stage2/lw: Abstract away from always installing Essential
Johni0702 Jul 4, 2025
a095913
mixin: Add
Johni0702 Jul 4, 2025
b37e97a
stage2/lw: Add builtin support for MixinExtras
Johni0702 Jul 4, 2025
e84acdf
stage2/lw: Import third-party mod compatibility patches from Essential
Johni0702 Jul 7, 2025
722b634
stage2/lw: Fix erroneous "corrupt" jars errors emitted by Forge's Jar…
Johni0702 Jul 8, 2025
babb022
misc: Update README for new LaunchWrapper functionality
Johni0702 Jul 8, 2025
d546684
build/mixin: Implement merging of class initializers
Johni0702 Jul 14, 2025
09af2ee
build/mixin: Implement adding fields to target class
Johni0702 Jul 14, 2025
afe19c8
build/mixin: Implement access transformer on shadow methods and fields
Johni0702 Jul 14, 2025
3233ce8
build/mixin: Handle bridge types in shadow method/field descriptor
Johni0702 Jul 14, 2025
9291c06
build/mixin: Support multiple mixins per target class
Johni0702 Jul 14, 2025
d8c172f
build/mixin: Allow creating new classes
Johni0702 Jul 14, 2025
8859e39
mixin: Add support for MixinBooter
Johni0702 Jul 14, 2025
e14af7b
stage2/lw: Support extracting MixinExtras versions from third-party jars
Johni0702 Jul 14, 2025
754c4a1
mixin: Release 0.1.0
Johni0702 Jul 8, 2025
a329659
stage2: Release 1.7.0
Johni0702 Jul 8, 2025
d9d8064
stage1: Release 11
Johni0702 Jul 8, 2025
f8f4974
stage0: Release 1.3.0
Johni0702 Jul 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/publish-mixin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish mixin

on:
push:
tags:
- mixin/v*

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: |
8
16
17

- name: Publish
run: ./gradlew :mixin:publish --stacktrace
env:
ORG_GRADLE_PROJECT_nexus_user: ${{ secrets.NEXUS_USER }}
ORG_GRADLE_PROJECT_nexus_password: ${{ secrets.NEXUS_PASSWORD }}
2 changes: 1 addition & 1 deletion .github/workflows/publish-stage2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
17

- name: Build
run: ./gradlew :stage2:{launchwrapper,fabric,modlauncher{8,9}}:build --stacktrace
run: ./gradlew :stage2:{launchwrapper-legacy,fabric,modlauncher{8,9}}:build --stacktrace

- name: Upload Artifacts
uses: actions/upload-artifact@v4
Expand Down
119 changes: 118 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,118 @@
[Docs](https://github.com/EssentialGG/EssentialLoader/tree/master/docs)
## Internals
For an explanation of how the internals of Essential Loader on various platforms function, see the [docs](https://github.com/EssentialGG/EssentialLoader/tree/master/docs) folder.

## Using Essential Loader with your mod on 1.8.9 - 1.12.2
Essential Loader for Minecraft 1.8.9 through 1.12.2 (commonly called "legacy Forge" or "LaunchWrapper") provides support
for Mixin 0.8.x (even on 1.8.9, and with improved third-party mod compatibility on 1.12.2) and Jar-in-Jar style
dependency management (e.g. if two mods ship different versions of the same dependency, it will automatically select
the more recent one).

### Setup
To use it with your mod, firstly you must declare a dependency in your build script and include it in your jar file:
```kotlin
repositories {
maven("https://repo.essential.gg/repository/maven-public/")
}

val embed by configurations.creating
configurations.implementation.get().extendsFrom(embed)

dependencies {
embed("gg.essential:loader-launchwrapper:1.3.0")
}

tasks.jar {
// Embed the contents of the Essential Loader jar into your mod jar.
dependsOn(embed)
from(embed.files.map { zipTree(it) })
// Set Essential Loader as the Tweaker for your mod.
// If you already have a custom Tweaker, you can have it extend the class instead.
// If you previously used the Mixin Tweaker, you can simply use Essential Loader instead, it'll automatically
// initialize Mixin for any mod with a `MixinConfigs` attribute.
manifest.attributes(mapOf("TweakClass" to "gg.essential.loader.stage0.EssentialSetupTweaker"))
}
```
You then need to create a `essential.mod.json` file in your `src/main/resources` folder which defines some metadata and
specifies which libraries your mod includes and where inside the mod jar they can be found:
```json
{
"id": "your_mod_id_goes_here",
"version": "1.0.0",
"jars": [
{
"id": "com.example:examplelib",
"version": "0.1.0",
"file": "META-INF/jars/examplelib-0.1.0.jar"
}
]
}
```
If you don't have any special needs, you can auto-generate the `version` and `jars` entries and automate the inclusion
of the libraries in your mod based on Gradle dependencies with the following snippet in your build script:
```kotlin
val jij by configurations.creating
configurations.implementation.get().extendsFrom(jij)

dependencies {
// Add all the dependencies you wish to jar-in-jar to the custom `jij` configuration
jij("com.example:examplelib:0.1.0")
}

tasks.processResources {
val expansions = mapOf(
"version" to version,
"jars" to provider {
jij.resolvedConfiguration.resolvedArtifacts.joinToString(",\n") { artifact ->
val id = artifact.moduleVersion.id
"""
{
"id": "${id.group}:${id.name}",
"version": "${id.version}",
"file": "META-INF/jars/${artifact.file.name}"
}
""".trimIndent()
}
},
)
inputs.property("expansions", expansions)
filesMatching("essential.mod.json") {
expand(expansions)
}
}

tasks.jar {
dependsOn(jij)
from(jij.files) {
into("META-INF/jars")
}
}
```
and the following `essential.mod.json` template file:
```json
{
"id": "your_mod_id_goes_here",
"version": "${version}",
"jars": [
${jars.get()}
]
}
```

### Mixin 0.8.x

To use our Mixin with your mod, assuming you've already included Essential Loader as per above instructions, and you've
already set up Mixin's annotation processor and refmap generation via your build system (this is done the same way as
it would be done with stock Mixin 0.8.x or 0.7.10, Essential Loader only affects things at runtime), simply
add it as a jar-in-jar dependency:
```kotlin
dependencies {
jij("gg.essential:mixin:0.1.0+mixin.0.8.4")

// MixinExtras may be added in the same way:
// Essential Loader will automatically initialize it for you, no need to call `MixinExtrasBootstrap`.
// `annotationProcessor` is necessary to generate refmaps if your build system does not setup MixinExtras for you.
jij(annotationProcessor("io.github.llamalad7:mixinextras-common:0.4.1")!!)
// or if you've previously used Essential's relocated MixinExtras version:
jij(annotationProcessor("gg.essential.lib:mixinextras:0.4.0")!!)
}
```
2 changes: 2 additions & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ repositories {

dependencies {
api("gradle.plugin.com.github.johnrengelman:shadow:7.1.2")

implementation("org.ow2.asm:asm-commons:9.3")
}
Loading