diff --git a/backups/restore-script.bat b/backups/restore-script.bat index 224216e..62f0188 100644 --- a/backups/restore-script.bat +++ b/backups/restore-script.bat @@ -1,5 +1,5 @@ @echo off -C: -cd "C:\Users\oscar\AppData\Roaming\ModrinthApp\profiles\Modpack Base Modpack\mods" +/: +cd "/data/mods" java -jar "AdvancedBackups-neoforge-1.21-3.7.1.jar" pause diff --git a/backups/restore-script.sh b/backups/restore-script.sh index e1f1fce..2e9db28 100644 --- a/backups/restore-script.sh +++ b/backups/restore-script.sh @@ -1,2 +1,2 @@ -cd "C:\Users\oscar\AppData\Roaming\ModrinthApp\profiles\Modpack Base Modpack\mods" +cd "/data/mods" java -jar "AdvancedBackups-neoforge-1.21-3.7.1.jar" diff --git a/mods/reeses-sodium-options-neoforge-1.8.3+mc1.21.4.jar.disable b/mods/reeses-sodium-options-neoforge-1.8.3+mc1.21.4.jar.disable deleted file mode 100644 index 42863f1..0000000 Binary files a/mods/reeses-sodium-options-neoforge-1.8.3+mc1.21.4.jar.disable and /dev/null differ diff --git a/mods/sable-schematic-api-0.2.6.jar b/mods/sable-schematic-api-0.4.0.jar similarity index 88% rename from mods/sable-schematic-api-0.2.6.jar rename to mods/sable-schematic-api-0.4.0.jar index 2aa6ff7..b7624dc 100644 Binary files a/mods/sable-schematic-api-0.2.6.jar and b/mods/sable-schematic-api-0.4.0.jar differ diff --git a/mods/wakes-1.21.1-NeoForge-1.3.6.jar b/mods/wakes-1.21.1-NeoForge-1.3.6.jar.disabled similarity index 100% rename from mods/wakes-1.21.1-NeoForge-1.3.6.jar rename to mods/wakes-1.21.1-NeoForge-1.3.6.jar.disabled diff --git a/recreate_world.sh b/recreate_world.sh new file mode 100644 index 0000000..48c14f5 --- /dev/null +++ b/recreate_world.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +# ========================================== +# CONFIGURATION +# ========================================== +CONTAINER_NAME="game-servers-mc-1" + +# Path to your world folder on the HOST machine (Change this to your actual path!) +WORLD_PATH="./world" +# ========================================== + +echo "==> Stopping container: $CONTAINER_NAME" +docker stop "$CONTAINER_NAME" + +echo "==> Waiting for container to close completely..." +docker wait "$CONTAINER_NAME" > /dev/null + +echo "==> Deleting the old world folder..." +if [ -d "$WORLD_PATH" ]; then + rm -rf "$WORLD_PATH" + echo " Success: World folder deleted." +else + echo " Warning: World folder not found at $WORLD_PATH." + echo " Please verify the WORLD_PATH variable inside this script!" +fi + +# Capture the current time (in seconds since epoch) BEFORE starting +BOOT_TIME=$(date +%s) + +echo "==> Starting container: $CONTAINER_NAME" +docker start "$CONTAINER_NAME" + +echo "==> Waiting for Minecraft server and BlueMap to fully load..." +sleep 3 + +# Loop until BOTH "Done" and "[BlueMap/]: Loaded!" appear in the logs +while true; do + # Fetch logs since boot time once per loop iteration + CURRENT_LOGS=$(docker logs --since "$BOOT_TIME" "$CONTAINER_NAME" 2>&1) + + # Check for both strings + echo "$CURRENT_LOGS" | grep -q -E "Done \(" + MC_DONE=$? + + echo "$CURRENT_LOGS" | grep -q "\[BlueMap/\]: Loaded!" + BM_DONE=$? + + # If both grep commands succeeded (exit code 0), break the loop + if [ $MC_DONE -eq 0 ] && [ $BM_DONE -eq 0 ]; then + break + fi + + echo -n "." + sleep 3 +done + +echo -e "\n==> Server and BlueMap are up! Connecting and executing commands..." + +# Helper function to send commands using your exact docker rcon command +send_cmd() { + echo " Sending: /$1" + docker exec -i "$CONTAINER_NAME" rcon-cli "$1" + sleep 0.5 +} + +# Executing commands in strict order +send_cmd "worldborder center 0 0" +send_cmd "worldborder set 15000" +send_cmd "chunky world world" +send_cmd "chunky worldborder" +send_cmd "chunky radius +25c" +send_cmd "chunky start" +send_cmd "chunky confirm" +send_cmd "bluemap purge world" + +echo "==> All tasks completed successfully!" \ No newline at end of file diff --git a/run.bat b/run.bat new file mode 100644 index 0000000..40a6749 --- /dev/null +++ b/run.bat @@ -0,0 +1,7 @@ +@echo off +REM Forge requires a configured set of both JVM and program arguments. +REM Add custom JVM arguments to the user_jvm_args.txt +REM Add custom program arguments {such as nogui} to this file in the next line before the %* or +REM pass them to this script directly +java @user_jvm_args.txt @libraries/net/neoforged/neoforge/21.1.234/win_args.txt %* +pause diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..afc6bae --- /dev/null +++ b/run.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env sh +# Forge requires a configured set of both JVM and program arguments. +# Add custom JVM arguments to the user_jvm_args.txt +# Add custom program arguments {such as nogui} to this file in the next line before the "$@" or +# pass them to this script directly +java @user_jvm_args.txt @libraries/net/neoforged/neoforge/21.1.234/unix_args.txt "$@" diff --git a/tacz/.export-state.json b/tacz/.export-state.json index a2b730a..f3bb12f 100644 --- a/tacz/.export-state.json +++ b/tacz/.export-state.json @@ -1,6 +1,6 @@ { "version": 1, "entries": { - "com.tacz.guns.GunMod|/assets/tacz/custom/tacz_default_gun|tacz_default_gun": "3cd654b686254d050d9abbf084473236" + "com.tacz.guns.GunMod|/assets/tacz/custom/tacz_default_gun|tacz_default_gun": "147fb57692d5c9ce428886b81d4263e0" } } \ No newline at end of file diff --git a/updateMods.bat b/updateMods.bat index 7ad083d..559b96d 100644 --- a/updateMods.bat +++ b/updateMods.bat @@ -1,24 +1,24 @@ -@echo off -pushd %~dp0 -git --version > nul 2>&1 -if %errorlevel% neq 0 ( - echo Git no esta instalado - echo Instalalo desde https://git-scm.com/downloads - goto end -) else ( - if not exist .git ( - git init - git remote add origin https://git.sfkao.net/SFKao/Restauradores-modpack.git - git fetch --depth 1 - git checkout -t origin/main -f - ) - call git fetch --depth 1 - call git pull --depth 1 --rebase --autostash - if %errorlevel% neq 0 ( - REM Si pasa algo - echo Han habido errores actualizando, contactar con SFKao - goto end - ) -) -:end -pause +@echo off +pushd %~dp0 +git --version > nul 2>&1 +if %errorlevel% neq 0 ( + echo Git no esta instalado + echo Instalalo desde https://git-scm.com/downloads + goto end +) else ( + if not exist .git ( + git init + git remote add origin https://git.sfkao.net/SFKao/Restauradores-modpack.git + git fetch --depth 1 + git checkout -t origin/main -f + ) + call git fetch --depth 1 + call git pull --depth 1 --rebase --autostash + if %errorlevel% neq 0 ( + REM Si pasa algo + echo Han habido errores actualizando, contactar con SFKao + goto end + ) +) +:end +pause diff --git a/updateMods.sh b/updateMods.sh index 443cb3b..650c490 100644 --- a/updateMods.sh +++ b/updateMods.sh @@ -1,28 +1,28 @@ -#!/bin/bash - -cd "$(dirname "$0")" || exit 1 -echo "Iniciando" -# Check if git is installed -if ! command -v git >/dev/null 2>&1; then - echo "Git no está instalado" - echo "Instálalo desde https://git-scm.com/downloads" - exit 1 -fi - -# If not already a git repo, initialize and fetch -if [ ! -d ".git" ]; then - echo "Git no esta inicializado" - git init - git remote add origin https://git.sfkao.net/SFKao/Restauradores-modpack.git - git fetch --depth 1 - git checkout -t origin/main -f -fi -echo "Bajando..." -# Fetch and pull updates -if ! git fetch --depth 1 --progress || ! git pull --depth 1 --rebase --autostash --progress; then - echo "Han habido errores actualizando, contactar con SFKao" - exit 1 -fi - -# Equivalent to pause (wait for user input before closing) -read -rp "Presiona Enter para salir..." +#!/bin/bash + +cd "$(dirname "$0")" || exit 1 +echo "Iniciando" +# Check if git is installed +if ! command -v git >/dev/null 2>&1; then + echo "Git no está instalado" + echo "Instálalo desde https://git-scm.com/downloads" + exit 1 +fi + +# If not already a git repo, initialize and fetch +if [ ! -d ".git" ]; then + echo "Git no esta inicializado" + git init + git remote add origin https://git.sfkao.net/SFKao/Restauradores-modpack.git + git fetch --depth 1 + git checkout -t origin/main -f +fi +echo "Bajando..." +# Fetch and pull updates +if ! git fetch --depth 1 --progress || ! git pull --depth 1 --rebase --autostash --progress; then + echo "Han habido errores actualizando, contactar con SFKao" + exit 1 +fi + +# Equivalent to pause (wait for user input before closing) +read -rp "Presiona Enter para salir..."