docker-minecraft-server icon indicating copy to clipboard operation
docker-minecraft-server copied to clipboard

Option to add java arguments for the Forge/NeoForge installer

Open m00nwtchr opened this issue 10 months ago • 1 comments

Enhancement Type

A completely new feature

Describe the enhancement

It appears that NeoForge enforces java.net.preferIPv4Stack=true which makes the installation fail in an IPv6-only environment. However, from what I can tell it works just fine if you pass the -Djava.net.preferIPv4Stack=false argument. It would be useful if the docker image supported passing these arguments.

m00nwtchr avatar Jan 22 '25 23:01 m00nwtchr

One option is set that in the environment variable JAVA_TOOL_OPTIONS since that will get picked up by all Java invocations within the container, including the neoforge installer

https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars002.html

Otherwise I'll have to give this more thought about how to generalize the various Java tools ran along the way, such as mc-image-helper which in turns calls neoforge installer for modpacks, for example.

itzg avatar Jan 23 '25 00:01 itzg