Skip to content

Commit

Permalink
Should have a way to trigger cinit
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Nov 23, 2023
1 parent e4344e3 commit 821cc5e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -1035,10 +1035,10 @@ project(':cleanroom') {
// TODO: MDK Task

userdevConfig {
/*def artifacts = Util.getArtifacts(project, project.configurations.installer, true)
def artifacts = Util.getArtifacts(project, project.configurations.installer, true)
artifacts.each { key, lib ->
libraries.add(lib.name)
}*/
}
libraries.add('net.minecraftforge:legacydev:0.2.3.+:fatjar')
universalFilters.add('^(?!binpatches\\.pack\\.lzma$).*$')

Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ org.gradle.parallel=true
# Allow Gradle to cache build to avoid recompiling classes that did not change.
org.gradle.caching=true
# Set java home when gradle refuse to respect IDE setting
# org.gradle.java.home=/usr/lib/jvm/java-1.17.0-openjdk-amd64
# org.gradle.java.home=/usr/lib/jvm/java-1.17.0-openjdk-amd64
# Daemon
org.gradle.daemon=false
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ static void setField(Field field, @Nullable Object instance, Object thing) throw
{

try {
field.get(instance);
} catch (InaccessibleObjectException ignored) {}
field.getDeclaringClass().newInstance();
} catch (Throwable ignored) {}
unsafe.putObject(unsafe.staticFieldBase(field), unsafe.staticFieldOffset(field), thing);
}
}
Expand Down

0 comments on commit 821cc5e

Please sign in to comment.