Add netty leak detection and server/client folder separation

This commit is contained in:
James Seibel
2024-09-11 17:38:02 -05:00
parent 603200ed8b
commit f080a59b41
3 changed files with 25 additions and 13 deletions
+11 -3
View File
@@ -10,14 +10,17 @@ loom {
client {
client()
setConfigName("Fabric Client")
ideConfigGenerated(true)
runDir("../run")
ideConfigGenerated(true) // When true a run configuration file will be generated for IDE's. By default only set to true for the root project.
runDir("../run/client")
vmArgs("-Dio.netty.leakDetection.level=advanced") // https://netty.io/wiki/reference-counted-objects.html#leak-detection-levels
programArgs("--username", "Dev")
}
server {
server()
setConfigName("Fabric Server")
ideConfigGenerated(true)
runDir("../run")
runDir("../run/server")
vmArgs("-Dio.netty.leakDetection.level=advanced")
}
}
}
@@ -69,6 +72,11 @@ dependencies {
addModJar(fabricApi.module("fabric-events-interaction-v0", rootProject.fabric_api_version))
addModJar(fabricApi.module("fabric-rendering-v1", rootProject.fabric_api_version)) // TODO: Remove this as it is only needed in 1 line (FabricClientProxy)
addModJar(fabricApi.module("fabric-networking-api-v1", rootProject.fabric_api_version))
addModJar(fabricApi.module("fabric-entity-events-v1", rootProject.fabric_api_version))
if (minecraft_version >= "1.19.2")
addModJar(fabricApi.module("fabric-command-api-v2", rootProject.fabric_api_version))
else // < 1.19.2
addModJar(fabricApi.module("fabric-command-api-v1", rootProject.fabric_api_version))
// used by mod menu in MC 1.20.6+
addModJar(fabricApi.module("fabric-screen-api-v1", rootProject.fabric_api_version))