feat: disable cache dex

This commit is contained in:
Reider745
2026-04-25 18:19:47 +03:00
parent 8b9718723b
commit ed01e12987
2 changed files with 7 additions and 2 deletions
@@ -508,6 +508,10 @@ public class InnerCoreServer {
return getPropertyBoolean("display-ticking-errors-to-players", true);
}
public static boolean canReconvertJava() {
return getPropertyBoolean("reconvert-java", false);
}
public static boolean canOverridePlayerUUID(){
return getPropertyBoolean("override-player-uuid", true);
}
@@ -689,7 +693,7 @@ public class InnerCoreServer {
public static void printStackTrace(String message) {
try {
throw Context.reportRuntimeError("Error");
throw Context.reportRuntimeError(message);
} catch (Exception e) {
System.out.println(ICLog.getStackTrace(e));
}
@@ -2,6 +2,7 @@ package com.zhekasmirnov.innercore.mod.executable;
import com.googlecode.d2j.dex.Dex2jar;
import com.googlecode.dex2jar.tools.Jar2Dex;
import com.reider745.InnerCoreServer;
import com.zhekasmirnov.innercore.api.log.ICLog;
import com.zhekasmirnov.innercore.api.mod.API;
import com.zhekasmirnov.innercore.mod.build.BuildConfig;
@@ -196,7 +197,7 @@ public class Compiler {
File jarFile = new File(
(dexFileAbsolute.endsWith(".dex") ? dexFileAbsolute.substring(0, dexFileAbsolute.length() - 4)
: dexFileAbsolute) + ".jar");
if (!jarFile.isFile()) {
if (!jarFile.isFile() || InnerCoreServer.canReconvertJava()) {
Dex2jar dex2jar = Dex2jar.from(dexFile);
dex2jar.to(jarFile.toPath());
}