Minecraft - Fabric Server with Carpet Mod

This article contains very basic instructions on how to run a server with Fabric and carpet mod.

BASIC SETUP

1) Download the fabric server from this link https://fabricmc.net/use/server/

2) Download the vanilla server.jar from https://www.minecraft.net/en-us/download/server

3) Modify fabric-server-launcher.properties pointing to the recently downloaded vanilla server.jar

cat fabric-server-launcher.properties
#Fri Mar 04 13:29:12 GMT 2022
serverJar=server.jar

4) Create the mods folder and download the carpet mod for the version in use from https://github.com/gnembon/fabric-carpet/releases

5) Download FabricAPI from https://modrinth.com/mod/fabric-api/versions#all-versions or https://www.curseforge.com/minecraft/mc-mods/fabric-api into the mods folder.

6) Delete the folder .fabric if upgrading fabric versions.

7) Run the fabric launcher downloaded in STEP 01.

java -Xmx2G -jar fabric-server-mc.1.20.1-loader.0.14.22-launcher.0.11.2.jar nogui
[19:53:14] [main/INFO]: Loading Minecraft 1.20.1 with Fabric Loader 0.14.22
[19:53:14] [main/INFO]: Fabric is preparing JARs on first launch, this may take a few seconds...
[19:53:14] [main/INFO]: Loading 42 mods:
        - carpet 1.4.112+v230608
        - fabric-api 0.87.0+1.20.1
           |-- fabric-api-base 0.4.30+7abfd51577
           |-- fabric-api-lookup-api-v1 1.6.35+4d8536c977
           |-- fabric-biome-api-v1 13.0.10+b3afc78b77
           |-- fabric-block-api-v1 1.0.9+e022e5d177
           |-- fabric-blockrenderlayer-v1 1.1.40+b3afc78b77
           |-- fabric-client-tags-api-v1 1.1.1+97bb207577
           |-- fabric-command-api-v1 1.2.33+f71b366f77
           |-- fabric-command-api-v2 2.2.12+b3afc78b77
           |-- fabric-commands-v0 0.2.50+df3654b377
           |-- fabric-containers-v0 0.1.63+df3654b377
           |-- fabric-content-registries-v0 4.0.9+b3afc78b77
           |-- fabric-convention-tags-v1 1.5.4+a1a980da77
           |-- fabric-crash-report-info-v1 0.2.18+aeb40ebe77
           |-- fabric-data-generation-api-v1 12.2.2+1e61dba177
           |-- fabric-dimensions-v1 2.1.53+8536527b77
           |-- fabric-entity-events-v1 1.5.22+b3afc78b77
           |-- fabric-events-interaction-v0 0.6.1+e91849a877
           |-- fabric-events-lifecycle-v0 0.2.62+df3654b377
           |-- fabric-game-rule-api-v1 1.0.38+b04edc7a77
           |-- fabric-item-api-v1 2.1.27+b3afc78b77
           |-- fabric-item-group-api-v1 4.0.10+23d9108177
           |-- fabric-key-binding-api-v1 1.0.36+fb8d95da77
           |-- fabric-keybindings-v0 0.2.34+df3654b377
           |-- fabric-lifecycle-events-v1 2.2.21+b3afc78b77
           |-- fabric-loot-api-v2 1.1.39+b3afc78b77
           |-- fabric-loot-tables-v1 1.1.43+9e7660c677
           |-- fabric-message-api-v1 5.1.7+3265161977
           |-- fabric-mining-level-api-v1 2.1.49+b3afc78b77
           |-- fabric-model-loading-api-v1 1.0.2+709a987177
           |-- fabric-models-v0 0.4.1+9386d8a777
           |-- fabric-networking-api-v1 1.3.10+eeb8eb3677
           |-- fabric-networking-v0 0.3.50+df3654b377
           |-- fabric-object-builder-api-v1 11.1.1+6beca84877
           |-- fabric-particles-v1 1.1.1+201a23a077
           |-- fabric-recipe-api-v1 1.0.20+b3afc78b77
           |-- fabric-registry-sync-v0 2.3.2+4df89eb277
           |-- fabric-renderer-api-v1 3.1.2+6bdb2ed077
           |-- fabric-renderer-indigo 1.4.2+6bdb2ed077
           |-- fabric-renderer-registries-v1 3.2.45+df3654b377
           |-- fabric-rendering-data-attachment-v1 0.3.34+b3afc78b77
           |-- fabric-rendering-fluids-v1 3.0.27+b3afc78b77
           |-- fabric-rendering-v0 1.1.48+df3654b377
           |-- fabric-rendering-v1 3.0.7+b3afc78b77
           |-- fabric-resource-conditions-api-v1 2.3.5+ea08f9d877
           |-- fabric-resource-loader-v0 0.11.9+132c48c177
           |-- fabric-screen-api-v1 2.0.7+b3afc78b77
           |-- fabric-screen-handler-api-v1 1.3.29+b3afc78b77
           |-- fabric-sound-api-v1 1.0.12+b3afc78b77
           |-- fabric-transfer-api-v1 3.3.0+cdf060b277
           \-- fabric-transitive-access-wideners-v1 4.3.0+6c31357e77
        - fabricloader 0.14.22
        - java 20
        - minecraft 1.20.1

MODS

1) MCDiscordChat

1.1) Download the .jar from https://github.com/Xujiayao/MCDiscordChat/releases into the mods folder.

1.2) Create the below config file in config/mcdiscordchat.json

{
  "generic": {
    "language": "en_us",
    "botToken": "XXXXX",
    "botPlayingStatus": "Minecraft (%onlinePlayerCount%/%maxPlayerCount%)",
    "botListeningStatus": "",
    "useWebhook": true,
    "channelId": "XXXX",
    "consoleLogChannelId": "XXXX",
    "updateNotificationChannelId": "",
    "useUuidInsteadOfName": true,
    "avatarApi": "https://mc-heads.net/avatar/%player%.png",
    "broadcastPlayerCommandExecution": true,
    "broadcastSlashCommandExecution": true,
    "announceServerStartStop": true,
    "announcePlayerJoinLeave": true,
    "announceDeathMessages": true,
    "announceAdvancements": true,
    "broadcastChatMessages": true,
    "formatChatMessages": true,
    "allowedMentions": [
      "everyone",
      "users",
      "roles"
    ],
    "useServerNickname": true,
    "discordNewlineLimit": 3,
    "announceHighMspt": true,
    "msptCheckInterval": 5000,
    "msptLimit": 45,
    "notifyUpdates": true,
    "mentionAdminsForUpdates": true,
    "updateChannelTopic": true,
    "channelTopicUpdateInterval": 600000,
    "shutdownImmediately": false,
    "excludedCommands": [
      "/register",
      "/login"
    ],
    "adminsIds": [
      "XXXXX"
    ]
  },
  "multiServer": {
    "enable": false,
    "host": "127.0.0.1",
    "port": 5000,
    "name": "SMP",
    "botIds": []
  },
  "customMessage": {
    "unformattedResponseMessage": "",
    "unformattedChatMessage": "",
    "unformattedOtherMessage": "",
    "unformattedCommandNotice": "",
    "formattedResponseMessage": "",
    "formattedChatMessage": "",
    "formattedOtherMessage": "",
    "formattedCommandNotice": "",
    "serverStarted": "",
    "serverStopped": "",
    "joinServer": "",
    "leftServer": "",
    "deathMessage": "",
    "advancementTask": "",
    "advancementGoal": "",
    "advancementChallenge": "",
    "highMspt": "",
    "offlineChannelTopic": "",
    "onlineChannelTopic": "",
    "onlineChannelTopicForMultiServer": ""
  },
  "latestVersion": "2.2.0",
  "latestCheckTime": 1691748601631
}

2) EasyAuth

2.1) Download the .jar into the mods folder from https://modrinth.com/mod/easyauth.

2.2) Add the below configuration to mods/EasyAuth/config.json.

{
  "main": {
    "allowEntityInteract": false,
    "maxLoginTries": 3,
    "kickTime": 240,
    "enableGlobalPassword": false,
    "globalPassword": null,
    "tryPortalRescue": true,
    "minPasswordChars": 6,
    "maxPasswordChars": 24,
    "usernameRegex": "^[a-zA-Z0-9_]{3,16}$",
    "sessionTimeoutTime": 7200,
    "spawnOnJoin": false,
    "databaseType": "",
    "MySQLHost": "localhost",
    "MySQLUser": "root",
    "MySQLPassword": "",
    "MySQLDatabase": "easyauth",
    "MySQLTableName": "easyauth",
    "MongoDBConnectionString": "mongodb://username:password@host:port/?options",
    "MongoDBDatabase": "easyauth",
    "premiumAutologin": true,
    "floodgateAutologin": false,
    "forcedOfflinePlayers": [],
    "hideUnauthenticatedPLayersFromPlayerList": false
  },
  "worldSpawn": {
    "dimension": "minecraft:overworld",
    "x": 0.0,
    "y": 64.0,
    "z": 0.0,
    "yaw": 0.0,
    "pitch": 0.0
  },
  "lang": {
    "enterPassword": "§6Você precisa inserir sua senha!",
    "enterNewPassword": "§4Você precisa inserir uma nova senha!",
    "wrongPassword": "§4Senha incorreta!",
    "matchPassword": "§6As senhas devem coincidir!",
    "passwordUpdated": "§aSua senha foi atualizada com sucesso!",
    "loginRequired": "§cVocê não está autenticado!\n§6Use /login, /l para autenticar!",
    "loginTriesExceeded": "§4Muitas tentativas de login.",
    "globalPasswordSet": "§aSenha global definida com sucesso!",
    "cannotChangePassword": "§cVocê não pode mudar a senha!",
    "cannotUnregister": "§cVocê não pode remover essa conta!",
    "notAuthenticated": "§cVocê não está autenticado!\n§6Tente com /login, /l ou /register.",
    "alreadyAuthenticated": "§6Você já está autenticado.",
    "successfullyAuthenticated": "§aVocê foi autenticado.",
    "successfulLogout": "§Desconectado com sucesso.",
    "timeExpired": "§cTempo de autenticação expirado.",
    "registerRequired": "§6Digite /register \u003csenha\u003e \u003csenha\u003e para reivindicar essa conta.",
    "alreadyRegistered": "§6O nome dessa conta já está registrado!",
    "registerSuccess": "§aVocê foi autenticado.",
    "userdataDeleted": "§aDados do usuário deletados.",
    "userdataUpdated": "§aDados do usuário atualizados.",
    "accountDeleted": "§aSua conta foi deletada com sucesso!",
    "configurationReloaded": "§aArquivo de configuração recarregado com sucesso.",
    "maxPasswordChars": "§6A senha deve possuir até %d caracteres!",
    "minPasswordChars": "§6A senha deve possuir pelo menos %d caracteres!",
    "disallowedUsername": "§6Caracteres inválidos no nome de usuário! Expressão regular permitida: %s",
    "playerAlreadyOnline": "§cO jogador %s já está online!",
    "worldSpawnSet": "§aPonto de surgimento para login definido com sucesso.",
    "corruptedPlayerData": "§cSeus dados estão provavelmente corrompidos. Por favor contate um administrador.",
    "userNotRegistered": "§cEsse jogador não está registrado!",
    "cannotLogout": "§cVocê não pode deslogar!",
    "offlineUuid": "Offline UUID para %s é ",
    "registeredPlayers": "Lista de Players registrados:",
    "addToForcedOffline": "Player adicionado com sucesso a lista forcedOfflinePlayers"
  },
  "experimental": {
    "preventAnotherLocationKick": true,
    "playerInvulnerable": true,
    "playerInvisible": true,
    "allowChat": false,
    "allowCommands": false,
    "allowedCommands": [],
    "allowMovement": false,
    "allowBlockUse": false,
    "allowBlockPunch": false,
    "allowItemDrop": false,
    "allowItemMoving": false,
    "allowItemUse": false,
    "allowEntityPunch": false,
    "debugMode": false,
    "useBCryptLibrary": false,
    "forcedOfflineUuids": false,
    "useSimpleAuthDatabase": false,
    "teleportationTimeoutInMs": 5,
    "enableAliases": true,
    "enableServerSideTranslation": true,
    "resetLoginAttemptsTime": 120,
    "floodgateLoaded": false,
    "floodgateBypassUsernameRegex": false,
    "verifiedOnlinePlayer": [],
    "skipAllAuthChecks": false
  }
}

3) Performance Mods

Download the mods below into the mods folder. The below does not require configuration.

3.1) Lithium download from https://modrinth.com/mod/lithium

Lithium is a modern, general-purpose optimization mod for Minecraft

3.2) Krypton download from https://modrinth.com/mod/krypton

Krypton (from Ancient Greek kryptos, "the hidden one") is a Fabric mod that attempts to optimize the Minecraft networking stack

List of mods 1.20.1