docker-minecraft-server
docker-minecraft-server copied to clipboard
Gently prevent users from using vanilla tweaks resource packs
From https://discord.com/channels/660567679458869252/660569641550217327/1020932539537432666
and looking at https://minecraft.fandom.com/wiki/Server.properties#resource-pack
it seems like rather than or in addition to downloading the resource pack zip the URL of the resource pack should be exported as RESOURCE_PACK
.
since we have the downloaded resource pack locally, it would be great to also sha1 it and insert that into RESOURCE_PACK_SHA1
as well.
I'll have to look at what their API provides back.
Also, I don't think a "local" URL will work since I'm assuming the URL needs to be something the client can resolve.
I checked out the Convo from discord when @shotah discussed with the vt devs. The download links are only valid for ~20m, so simply passing this along into server.properties won't work.
Possible solutions:
- if the sharecode is a resource pack, alert the user and possibly refuse to deploy.
- spin up a sidecar simple httpd container to host the pack. Would have to use some env variable to tell the correct IP or URI stem to prepend to the link for server.properties. I'd expect the user to have to set up port forwards, etc.
- Have some method to upload the file to a filehost. I mention this only to say it's a phenomenally bad idea because you'd have to deal with a mess of upload methods and secrets management.
All in all, I think the second option would be awesome, but the first is workable as well.
Thanks for doing that research. In that case, I'm thinking option 1 is the only thing that can be done. Like you said, 2 would be awesome but sounds very error prone for end users.