mirror of
https://github.com/neoforged/NeoForge.git
synced 2026-02-04 03:16:50 -06:00
Co-authored-by: Matyrobbrt <matyrobbrt@gmail.com> Co-authored-by: Sebastian Hartte <shartte@users.noreply.github.com> Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com> Co-authored-by: TelepathicGrunt <40846040+TelepathicGrunt@users.noreply.github.com> Co-authored-by: XFactHD <xfacthd@gmx.de>
21 lines
1.2 KiB
Diff
21 lines
1.2 KiB
Diff
--- a/net/minecraft/SharedConstants.java
|
|
+++ b/net/minecraft/SharedConstants.java
|
|
@@ -123,7 +_,8 @@
|
|
public static final boolean USE_WORKFLOWS_HOOKS = false;
|
|
public static final boolean USE_DEVONLY = false;
|
|
public static boolean CHECK_DATA_FIXER_SCHEMA = true;
|
|
- public static boolean IS_RUNNING_IN_IDE;
|
|
+ public static boolean IS_RUNNING_IN_IDE = !net.neoforged.fml.loading.FMLEnvironment.isProduction();
|
|
+ public static final boolean IS_RUNNING_WITH_JDWP = java.lang.management.ManagementFactory.getRuntimeMXBean().getInputArguments().stream().anyMatch(str -> str.startsWith("-agentlib:jdwp"));
|
|
public static final int WORLD_RESOLUTION = 16;
|
|
public static final int MAX_CHAT_LENGTH = 256;
|
|
public static final int MAX_USER_INPUT_COMMAND_LENGTH = 32500;
|
|
@@ -216,6 +_,7 @@
|
|
}
|
|
|
|
static {
|
|
+ if (System.getProperty("io.netty.leakDetection.level") == null) // Forge: allow level to be manually specified
|
|
ResourceLeakDetector.setLevel(NETTY_LEAK_DETECTION);
|
|
CommandSyntaxException.ENABLE_COMMAND_STACK_TRACES = COMMAND_STACK_TRACES;
|
|
CommandSyntaxException.BUILT_IN_EXCEPTIONS = new BrigadierExceptions();
|