From 150f0144dee0ccecebe66ebc3fb20a0f0464c9d9 Mon Sep 17 00:00:00 2001 From: RedVortex <58099979+RedVortexDev@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:32:38 +0200 Subject: [PATCH] fix /importfile erroring & update char limit --- src/main/java/io/github/homchom/recode/Main.java | 2 ++ .../recode/mod/commands/impl/item/ImportFileCommand.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/homchom/recode/Main.java b/src/main/java/io/github/homchom/recode/Main.java index 7805ec01e..f9a9a4732 100644 --- a/src/main/java/io/github/homchom/recode/Main.java +++ b/src/main/java/io/github/homchom/recode/Main.java @@ -6,6 +6,8 @@ public final class Main implements ClientModInitializer { @Override public void onInitializeClient() { + System.setProperty("java.awt.headless", "false"); // Enable AWT features + Recode.INSTANCE.initialize(); } } \ No newline at end of file diff --git a/src/main/java/io/github/homchom/recode/mod/commands/impl/item/ImportFileCommand.java b/src/main/java/io/github/homchom/recode/mod/commands/impl/item/ImportFileCommand.java index da209a803..304f95284 100644 --- a/src/main/java/io/github/homchom/recode/mod/commands/impl/item/ImportFileCommand.java +++ b/src/main/java/io/github/homchom/recode/mod/commands/impl/item/ImportFileCommand.java @@ -58,8 +58,8 @@ public void register(Minecraft mc, CommandDispatcher while (sc.hasNextLine()) { String line = sc.nextLine(); - if (line.length() > 2000) { - ChatUtil.sendMessage("Line " + (lines.size() + 1) + " is too long! (" + line.length() + " > 2000)", ChatType.FAIL); + if (line.length() > 10_000) { + ChatUtil.sendMessage("Line " + (lines.size() + 1) + " is too long! (" + line.length() + " > 10,000)", ChatType.FAIL); continue files; } lines.add(line);