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.55k stars 1.55k forks source link

Fabric Mods ignored #993

Closed 19wolf closed 3 years ago

19wolf commented 3 years ago

I'm trying to run this mod but apparently my fabric jar isn't a fabric jar? Unless I've completely misunderstood how to install fabric mods. I've tried using -e MODPACK and putting the files directly in the /mods folder.

Server log: https://pastebin.com/7h0Wqpkg Compose: https://pastebin.com/RsKGppyq

Let me know if you need anything else.

itzg commented 3 years ago

In this context I can see that "modpack" is a confusing term to use in that variable. Unfortunately in this case it doesn't refer to CurseForge modpacks, which have the full directory structure to setup servers. I instead MODPACK is expecting a flat zip structure that contains only mod jars.

Really I need to support CF_SERVER_MOD that contain fabric installers. If there's a forge version of that modpack, that would be an easy workaround for now.

19wolf commented 3 years ago

Thanks, I'll give it a shot. Definitely update me when you figure out how to support the fabric version :)

19wolf commented 3 years ago

I just commented on another issue with a similar problem, but when I try to run the forge version I get an error about using the server version of the modpack (which I am)

hugalafutro commented 3 years ago

Hello, I run different Fabric modpack, but this might be your issue too perhaps. When I download Better+Minecraft+Server+Pack+[FABRIC]+v8.zip from curseforge inside it is a directory [Better Minecraft Server Pack [FABRIC] v8] which has the directories and files actually needed inside of it. If I run the below below docker-compose.yml with the file as downloaded off curseforge the server does not load the mods.

If I repack the Better+Minecraft+Server+Pack+[FABRIC]+v8.zip so that the config, mods etc are in root of the .zip, Fabric server with the full Better Minecraft modpack comes up correctly.

version: '3'

services:
  bettermc:
    ports:
      - "25565:25565"
    environment:
      EULA: "true"
      MAX_MEMORY: "4G"
      TYPE: "FABRIC"
      VERSION: "1.17.1"
      GENERIC_PACK: "/modpacks/Better+Minecraft+Server+Pack+[FABRIC]+v8.zip"
    image: itzg/minecraft-server
    container_name: mc-bettermc
    restart: always
    volumes:
      - ./data:/data
      - ./modpacks:/modpacks
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro

Unrelated, but I also have a RLCraft one if you wanna give some suffering a go :) (this one works with the file from curseforge without repacking)

version: '3'

services:
  rlcraft:
    ports:
      - "25565:25565"
    environment:
      EULA: "true"
      MAX_MEMORY: "4G"
      VERSION: "1.12.2"
      TYPE: "FORGE"
      GENERIC_PACK: "/modpacks/RLCraft+Server+Pack+1.12.2+-+Beta+v2.8.2.zip"
      USE_MODPACK_START_SCRIPT: "false"
      ALLOW_FLIGHT: "true"
      MAX_TICK_TIME: -1
      DIFFICULTY: "hard"
    image: itzg/minecraft-server:java8
    container_name: mc-rlcraft
    restart: always
    volumes:
      - ./data:/data
      - ./modpacks:/modpacks
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
Sigler commented 3 years ago

Thanks @hugalafutro for the notes on repacking the zip. 💯 I was trying to get Better Minecraft 9.5 running in Fabric. That got me past my biggest hurdle getting this setup for the first time.

hugalafutro commented 3 years ago

@Sigler, glad you got it working, if I may I'd suggest Forge version of Better MC as I feel the mod selection is better on Forge especially because I can inject in Biomes O' Plenty. I did some further tweaking to the compose, added aikar flags, timezone, enabled Rcon (as in fabric for w/e reason by default was disabled), OP and Whitelist from .env file etc. You still need to repack the zips for both forge and fabric.

Forge:

version: '3.7'

services:
  mc_bettermc:
    ports:
      - "25565:25565"
    environment:
      TZ: "Europe/London"
      EULA: "true"
      MAX_MEMORY: "8G"
      VERSION: "1.16.5"
      FORGEVERSION: "36.2.2"
      TYPE: "FORGE"
      OPS: ${OPLIST}
      WHITELIST: ${WLIST}
      GENERIC_PACK: "/modpacks/Better+Minecraft+Server+Pack+[FORGE]+v36.zip"
      VIEW_DISTANCE: 10
      MAX_PLAYERS: 5
      PVP: "false"
      OVERRIDE_SERVER_PROPERTIES: "true"
      LEVEL_TYPE: "BIOMESOPLENTY"
      ENABLE_ROLLING_LOGS: "true"
      USE_AIKAR_FLAGS: "true"
    image: itzg/minecraft-server:java8
    container_name: mc-bettermc
    restart: unless-stopped
    volumes:
      - ./data_forge:/data
      - ./modpacks:/modpacks

Fabric:

version: '3.7'

services:
  mc_bettermc:
    ports:
      - 25565:25565
    environment:
      TZ: "Europe/London"
      EULA: "true"
      MAX_MEMORY: "8G"
      TYPE: "FABRIC"
      VERSION: "1.17.1"
      GENERIC_PACK: "/modpacks/Better+Minecraft+Server+Pack+[FABRIC]+v9.5.zip"
      WHITELIST: ${WLIST}
      OPS: ${OPLIST}
      ENABLE_RCON: "true"
      RCON_PASSWORD: "minecraft"
      OVERRIDE_SERVER_PROPERTIES: "true"
      VIEW_DISTANCE: 10
      MAX_PLAYERS: 5
      PVP: "false"
      ENABLE_ROLLING_LOGS: "true"
      USE_AIKAR_FLAGS: "true"
    image: itzg/minecraft-server
    container_name: mc-bettermc
    restart: unless-stopped
    volumes:
      - ./data_fabric:/data
      - ./modpacks:/modpacks

put file named .env along the docker-compose.yml to supply the "secrets"

OPLIST="Player1,Player2,Player3"
WLIST="Player1,Player2,Player3"
Sigler commented 3 years ago

Thanks. If we end up wanting to switch things up I'll check it out. I've been using Fabric because the client loads things so much faster, though I haven't made any recent comparisons. About a year ago when I first started using Fabric it was a difference in actual real time minutes.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open.