Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
Dirty Quilt Hacks

Dirty Quilt Hacks

Gives access to a lot of reflective tooling.

968
5
Cursed
Utility

Compatibility

Minecraft: Java Edition

1.19–1.19.1
1.18.x
1.17.x

Platforms

Fabric
Forge
Quilt

Supported environments

Client-side
Server-side
Client and server (optional)

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

Report issues View source

Creators

sschr15
sschr15 Owner

Details

Licensed MPL-2.0
Published 2 years ago
Updated 2 years ago
DescriptionChangelogVersions

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.

Current features

  • Unsafe.sun() for a sun.misc.Unsafe instance
  • Unsafe.jdk() for a jdk.internal.misc.Unsafe instance (needs export — see below)
  • Unsafe.lookup() for the trusted MethodHandles.Lookup instance
  • Field getting and setting with force
  • Enum widening
  • Function accessor for allowing runtime use of JDK's internal ASM copy
  • Shortcut methods for getting MethodHandle instances through the trusted lookup
  • Runtime module exporting / opening
  • Forceful SecurityManager setting

Exporting modules

At runtime, call ModuleWidener.exportModule with either a class in the requested package, a class in the module and a string of the package, or the module instance and a string of the package.

At compile time, use javac compile arguments:

tasks.withType(JavaCompile).configureEach {
    it.options.compilerArgs << "addExports" << "TheModuleGoesHere/ThePackageToExport=ALL-UNNAMED"
    // This cannot be used with the release field. Instead use source / target compatibility fields in the java object.
}

Modrinth is open source.

feat/theseus/tauri-v2@c5403db

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.