diff --git a/buildSrc/src/main/groovy/dh-loader.gradle b/buildSrc/src/main/groovy/dh-loader.gradle index 59ee54ad4..09268cf07 100644 --- a/buildSrc/src/main/groovy/dh-loader.gradle +++ b/buildSrc/src/main/groovy/dh-loader.gradle @@ -393,7 +393,8 @@ if (isNotCommonProject) { //"-XX:+ZGenerational", rootProject.minecraftMemoryJavaArg, ) - if (isClient) { + if (isClient) + { runTask.jvmArgs( "-Dminecraft.api.auth.host=https://nope.invalid", "-Dminecraft.api.account.host=https://nope.invalid", @@ -404,9 +405,17 @@ if (isNotCommonProject) { // use a consistent username for easier debugging in a given world (vs randomly teleporting to a new user each time the game boots) "--username", "Dev", // "--renderDebugLabels" is a Mojang command to show render names in RenderDoc - "--renderDebugLabels", + "--renderDebugLabels" + ) + + // enabling tracy causes constant memory growth so it isn't always desired + if (rootProject.minecraftEnableTracy == "true") + { // "--tracy" is a Mojang command to allow individual frames to be debugged using Tracy https://github.com/wolfpld/tracy/releases/tag/v0.13.1 - "--tracy") + runTask.args("--tracy") + } + + } } } diff --git a/gradle.properties b/gradle.properties index 9ca5b4bc9..e0e78d7b0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -51,3 +51,6 @@ mcVer=26.1.2 # Defines the maximum amount of memory Minecraft is allowed when run in a development environment minecraftMemoryJavaArg=-Xmx6G +# can be enabled for use with the Tracy profiler, disabled by default since it causes constant memory growth when running +minecraftEnableTracy=false +