AMPZNetwork / All-The-Fabric

Official All The Fabric modpack Repo
https://www.ampznetwork.com
3 stars 0 forks source link

Inconcistensies with Modrinth .mrpack, what's actually in Modrinth, and ATF5 provided server files #1

Closed Ogloppi closed 8 months ago

Ogloppi commented 11 months ago

I'm trying to setup a server as suggested by Modrinth using the latest itzg/docker-minecraft-server Docker image. The server will always crash and will not start.

Using ATF5 version v1.2.

The modrinth.index.json in .mrpack specifies many mods with the following information (as defined here):

      "env": {
        "server": "required",
        "client": "required"
      }

while in fact, the mod may not be supported at all in a server environment, e.g. Sodium mod page.

This causes problems to itzg/docker-minecraft-server, as it downloads the mods as specified in .mrpack, which causes it to download mods meant for clients. The Docker image does not have any problems with properly defined modpacks on Modrinth.

I can confirm this by comparing downloaded mods between the Docker image and the modpack provided Server Files - v1.2.zip file.

Also; the Server Files - v1.2.zip file has server-setup-config.yaml with a section ignoreProject: has mods that are not part of the pack.

rehashedsalt commented 8 months ago

I think I may also have just stumbled into this bug. Stacktrace certainly leads me to believe I have client mods installed server-side:

Caused by: java.lang.RuntimeException: Cannot load class net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents$EndWorldTick in environment type SERVER

Same container image with ATF v5.4, version ID hWFPNXRP.

burdoto commented 8 months ago

Hi there, apologies for the late response.

First of all, personally, I would recommend to never, ever run a Minecraft Server using Docker. Javas performance is severely impacted by running inside virtualization, and Docker usually simply is just that.

The server pack has been updated to remove client side mods such as sodium. Generally, said docker starter you noted towards is not supported by AMPZ Packs. If the docker starter you used still uses it, then either your server pack or the docker starter is outdated. Usually however, when it gets to errors like this, resolution is as easy as deleting the culprit mod JAR from the mods folder. Not sure how easy this is for your docker setup.

The pack provides its own startscripts in both SH and CMD format, thus, starting it without docker shouldn't be very hard. If you still need advice starting your server, please feel free to ask on our Discord server.

rehashedsalt commented 8 months ago

The prefabricated server ZIP isn't the issue here, nor is it the container. Rather, the issue is that the .mrpack file on Modrinth is malformed and defines client-side mods as server-side -- simply modifying your modrinth.index.json to set "server": "required" to "server": "unsupported" for mods that can't run server-side would solve the issue, as mentioned in the OP.

It's worth noting that the Docker image we're using isn't the only tool affected here. Modrinth's official mrpack-install utility consumes this information the same way and will fail to produce a runnable server.

LabsZero commented 8 months ago

We export the pack using Modrinth by default so the issue is likely a bug with how their launcher creates the .json file. I recommed you download the provided server files that comes with each version to avoid this issue.