Compare commits
4 Commits
6e66a28656
...
526fb856dc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
526fb856dc | ||
|
|
27bbf7b1d4 | ||
|
|
02c750068e | ||
|
|
a692df0d42 |
@ -1,5 +1,5 @@
|
|||||||
@echo off
|
@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"
|
java -jar "AdvancedBackups-neoforge-1.21-3.7.1.jar"
|
||||||
pause
|
pause
|
||||||
|
|||||||
@ -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"
|
java -jar "AdvancedBackups-neoforge-1.21-3.7.1.jar"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
76
recreate_world.sh
Normal file
76
recreate_world.sh
Normal file
@ -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!"
|
||||||
7
run.bat
Normal file
7
run.bat
Normal file
@ -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
|
||||||
6
run.sh
Normal file
6
run.sh
Normal file
@ -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 "$@"
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"entries": {
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user