Dirty Quilt Hacks
by sschr15
Dirty Quilt Hacks is a small library for modders that gives code access to JDK internals through reflection, Unsafe and module exporting.
What it does
The library exposes tooling for reflective access. It offers field getting and setting with forced access, widening of enums, and a function accessor that lets code call the JDK's internal copy of ASM at runtime. Modders who need these low-level hooks can use them without writing the reflection code themselves.
Access to Unsafe is provided for both the sun and jdk internal versions, assuming the package is exported at compile time. A runtime module exporting feature can open packages through ModuleWidener.exportModule, and a forceful SecurityManager setter is included. The library is built as a Quilt mod and is published for Fabric, Forge and Quilt across seven game versions, 1.17 – 1.19.1.
Environment: the mod is optional on either side, so a client, a server or both can run it, and neither needs it. Files for 1.19.1 were last updated on 2022-08-02, and the project is released under the Mozilla Public License 2.0, which makes it open source.
Key features
Forced field access
Fields can be read and written through reflection with access forced past normal visibility checks.
Enum widening
The library can widen an enum so that new constants can be added at runtime by other code.
Runtime module exporting
Packages can be exported or opened at runtime through ModuleWidener, from a class, a module and a package string.
Unsafe access
Both the sun and jdk internal versions of Unsafe are reachable, for code that needs direct memory operations.
Compatibility
Latest build for each game version and loader.
This mod also publishes snapshot builds. Snapshots are not shown in the matrix.
Questions
Does Dirty Quilt Hacks need to be installed on servers?
Which loaders does Dirty Quilt Hacks support?
Can the library be used with the Java compiler's module options?
In the catalog
Dirty Quilt Hacks is one of 7,555 Cursed mods on ModsFinder, and one of 4,235 Cursed mods for Fabric. 5,930 mods support Minecraft 1.19.1.
More from sschr15
Similar mods
What the author says
A small library built as a Quilt mod which gives modders access to Unsafe (both the sun one and the jdk internal one, assuming it's exported at compile time) and easily supports runtime module exporting and trusted MethodHandles.Lookup calls. At runtime, call ModuleWidener.exportModule with either a class in the…
Official listing
- Modrinth page
- modrinth.com/mod/qblo
- Owner
- sschr15
- Published
- 2022-07-30
- Updated on Modrinth
- 2022-08-02
- Facts verified
- 2026-10-15