logger fix
This commit is contained in:
@@ -53,6 +53,11 @@ public class Logger {
|
|||||||
String error = (INSERT_CLASS?("["+callClsName()+"]: "):"") + Stream.of(args).map(Logger::objToString).collect(Collectors.joining(" "));
|
String error = (INSERT_CLASS?("["+callClsName()+"]: "):"") + Stream.of(args).map(Logger::objToString).collect(Collectors.joining(" "));
|
||||||
LOGGER.error(error, throwable);
|
LOGGER.error(error, throwable);
|
||||||
if (VoxyCommon.IS_IN_MINECRAFT && !VoxyCommon.IS_DEDICATED_SERVER) {
|
if (VoxyCommon.IS_IN_MINECRAFT && !VoxyCommon.IS_DEDICATED_SERVER) {
|
||||||
|
error0(error);//This is done so that on dedicated server, the Minecraft client class isnt loaded
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void error0(String error) {
|
||||||
var instance = Minecraft.getInstance();
|
var instance = Minecraft.getInstance();
|
||||||
if (instance != null) {
|
if (instance != null) {
|
||||||
instance.executeIfPossible(() -> {
|
instance.executeIfPossible(() -> {
|
||||||
@@ -61,7 +66,6 @@ public class Logger {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static void warn(Object... args) {
|
public static void warn(Object... args) {
|
||||||
if (SHUTUP) {
|
if (SHUTUP) {
|
||||||
|
|||||||
Reference in New Issue
Block a user