Download Dirty Quilt Hacks — Minecraft Mods — MetaMods

Dirty Quilt Hacks

Active

Downloads

0

Last update

3 years ago

Versions

21w19a — 1.19.1
Client
Fabric
Forge
Quilt
Utils

Dirty Quilt Hacks

This small library is developed as a Quilt mod and provides mod developers with access to powerful reflection and low-level programming tools.

Main Features

  • Getting Unsafe instances from sun.misc and jdk.internal.misc packages
  • Access to a trusted MethodHandles.Lookup instance
  • Forced field value getting and setting
  • Enum functionality expansion
  • Using JDK's internal ASM copy during runtime
  • Simplified methods for getting MethodHandle instances through trusted lookup
  • Real-time module exporting and opening
  • Forced SecurityManager configuration

Module Exporting

During runtime, you can use the ModuleWidener.exportModule method by passing it a class from the required package, a class from the module and a string with the package name, or the module instance itself and a string with the package name.

During compilation, use javac compiler arguments:

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

sschr15

Developer

Created: 30 Jul 2022

ID: 11703