Fix for CurseForge Generic egg
Description
This PR proposes a change to fix CurseForge Generic servers from not starting. It attempts to grab an Egg Variable from when the server was getting setup, however there is no prompt for it. That's it. This PR just adds an Egg Variable so the server can startup properly. Note: The default set is 4096 MB or 4 GB, and it is required. This does also change SERVER_MEMORY into just MEMORY as Pelican does not like it for whatever reason.
Checklist for all submissions
- [ X] Have you followed the guidelines in our Contributing document?
- [X ] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
- [X ] Have you tested and reviewed your changes with confidence that everything works?
- [X ] Did you branch your changes and PR from that branch and not from your master branch?
- If not, why?:
- [X ] You verify that the start command applied does not use a shell script
- [ ] If some script is needed then it is part of a current yolk or a PR to add one
- [X ] The egg was exported from the panel
I see the issue now.
Setting the memory to unlimited when making a server during the Enviroment Configuarion doesn't set an arbitary max memory, instead it doesn't pass one, which is why it interperts it as 0
Instead, it should pass the -XX:MaxRAMPercentage=100 arguement to allow the server to grow to 100% usage if needed
This is what other eggs do, (Forge Minecraft as an example) regardless if you wanted to set the memory or not
This isn't really beneficial for the end user and isn't even supported on older versions of Java, so this is a very minor fix Instead, if it is Java 21 the user can pass it themselves or add some special checks for it, however out of the scope for me
I successfully testet the egg with the following settings:
- Modpack File ID
520914 - Modpack Project ID
latest - Allocated Memory
4096 - Memory Limited
10Gb - Image
ghcr.io/parkervcp/yolks:java_17