Created
May 16, 2017 02:08
-
-
Save chand1012/9dc06fb4d70e38489b2a75c53f8ddac2 to your computer and use it in GitHub Desktop.
My batch script for my modded Minecraft server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: this is the file that handles the server for my modded Minecraft on my 6-core PC | |
:: ParallelGCThreads can be changed to accomodate any number of cores, just give it the number of threads needed | |
:: if you are hosting a vanilla server, change forge.jar to the name of the Minecraft server jar | |
:: change Xmx to the amount of RAM your computer has | |
:: change 'world3' to the name of your Minecraft world to backup the world automatically | |
:: lines 10, 13-15 have to do with automatic restart on crash | |
@echo off | |
color 0a | |
title MWServer | |
:a | |
java -server -Xmx7G -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=6 -XX:+AggressiveOpts -jar forge.jar nogui | |
xcopy C:\Users\chizz\Desktop\MWServer\world3 C:\Users\chizz\Desktop\MWServer\backup\world3 /i /r /s /y | |
echo You have 10 seconds to Ctrl-C the server before restart! | |
ping localhost -n 10 > nul | |
goto a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment