itzg / docker-minecraft-server

Docker image that provides a Minecraft Server that will automatically download selected version at startup
https://docker-minecraft-server.readthedocs.io/
Apache License 2.0
9.56k stars 1.56k forks source link

Allow curse forge mod files to be downloaded separately #3150

Open TheAceMan opened 5 days ago

TheAceMan commented 5 days ago

Enhancement Type

Improve an existing feature

Describe the enhancement

Modpack has logic to use the CF_DOWNLOADS_REPO and install mods that do not allow automated downloads from a downloads folder. But individual mods supplied to CURSEFORGE_FILES do not allow this. As a workaround it appears that manually downloading the file and placing it in the mods folder does work. But for re-usability it would be nice to allow it to look locally for the file and not have to worry about it when creating a new server.

rhullah commented 5 days ago

There were changes done to the image (earlier this year?) to get around the blocked mods and to download them w/out issue. I honestly cannot remember the last time I've seen the table of mods that needed to be manually downloaded because it should be able to download them now.

Have you pulled the latest image recently? What mod is it not able to auto download?

TheAceMan commented 4 days ago

@rhullah I am using the helm chart and deploying tag: itzg/minecraft-server:2024.10.2-java17

Parts of the helm chart:

minecraftServer:
  version: "1.20.1"
  type: "AUTO_CURSEFORGE"
  autoCurseForge:
    apiKey:
      existingSecret: "minecraft-secret"
      secretKey: "cf_api_key"
    slug: "create-and-farmers-delight"

extraEnv:
  CURSEFORGE_FILES: |
    https://www.curseforge.com/minecraft/mc-mods/craftable-smithing-templates-armor-trims

As you suggest there are files in the modpack that do not allow automated downloads that are downloading fine. It's when I want to add an additional mod in addition to the modpack. Maybe this is not the correct or supported way to do this?

NOTE if you do test the above, there is a broken mod (https://github.com/AverageAnime/create-food/issues/1) in the modpack that I do need to also use the CF_DOWNLOADS_REPO: /data/downloads to get around. But you should be able to use any modpack to replicate.

rhullah commented 1 day ago

CURSEFORGE_FILES is the way to add additional mods to a server running a modpack. Though I'm not familiar with the helm chart and if it does anything that might prevent the use of the CURSEFORGE_FILES environment variable. Are you able to verify that it sees that you set that? Are there any logs and/or errors reported in the logs? If nothing shows, you can get more log information with the DEBUG option.