From 7066dadaffa66f6c6c93ed129c6925dd3dc87514 Mon Sep 17 00:00:00 2001 From: Ampflower Date: Sat, 23 Dec 2023 16:24:59 -0600 Subject: [PATCH] Version bumps & mute StringInterner by default It's known to transform the entirety of the JVM, no need to log it --- build.gradle.kts | 2 +- gradle.properties | 2 +- src/main/java/gay/ampflower/mcunsafe/asm/StringInterner.java | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b2a9134..139d393 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -39,7 +39,7 @@ dependencies { mappings("net.fabricmc", "yarn", yarnMappings, classifier = "v2") modImplementation("net.fabricmc", "fabric-loader", loaderVersion) // I'm sorry... - include(modImplementation("com.github.Modflower", "bytecode-junkie", "v0.3.1")) + include(modImplementation("com.github.Modflower", "bytecode-junkie", "v0.3.3")) testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") } diff --git a/gradle.properties b/gradle.properties index db4deea..f02e7cb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -projectVersion=0.0.0 +projectVersion=0.0.1 minecraftVersion=1.19.2 yarnMappings=1.19.2+build.28 loaderVersion=0.14.11 diff --git a/src/main/java/gay/ampflower/mcunsafe/asm/StringInterner.java b/src/main/java/gay/ampflower/mcunsafe/asm/StringInterner.java index 5352549..a7aa679 100644 --- a/src/main/java/gay/ampflower/mcunsafe/asm/StringInterner.java +++ b/src/main/java/gay/ampflower/mcunsafe/asm/StringInterner.java @@ -11,6 +11,8 @@ * @since ${version} **/ class StringInterner implements Transformer { + private static final boolean log = Boolean.getBoolean("mcunsafe.log.stringinterner"); + private static final Identifier identifier = new Identifier("mcunsafe", "string-interner"); @Override @@ -40,7 +42,7 @@ public boolean transform(ClassNode classNode, Flags flags) { method.instructions.insertBefore(insn, il); transformed = f = true; } - if (f) + if (f && log) System.out.printf("MCU-SI: Successfully transformed %s/%s%s\n", classNode.name, method.name, method.desc); } if (transformed) {