# MINECRAFT aliases
# alias minecraft='java -Xmx4096M -Xms2048M -jar ~/minecraft/minecraft_server.jar nogui'
minecraft(){
  dir=$MINECRAFT_LOC;
  [ "$1" == "survival" ] && dir=~/minecraft_survival
  cd $dir
	java -Xms512M -Xmx512M -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100\
 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50\
 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=35 -XX:+AlwaysPreTouch\
 -XX:+ParallelRefProcEnabled -Dusing.aikars.flags=mcflags.emc.gs -jar paperclip.jar
}

# minecraft_survival(){
  # cd ~/minecraft_survival; 
	# java -Xms1G -Xmx1G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100\
  # cd $MINECRAFT_LOC; 
	# java -Xms4G -Xmx4G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100\
 # -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50\
 # -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=35 -XX:+AlwaysPreTouch\
 # -XX:+ParallelRefProcEnabled -Dusing.aikars.flags=mcflags.emc.gs -jar paperclip.jar
# }

# minecraft_backup(){
  # backup_dir=~/cloud/backup/minecraft
  # mc_dir=~/minecraft
  # if [ "$1" == "survival" ]; then
    # backup_dir=~/cloud/backup/minecraft_survival
    # mc_dir=~/minecraft_survival
  # fi
  # mkdir -p "$backup_dir"
  # filename=`date +%F`".tar.gz"
  # cd "$mc_dir" && tar -czvf "$filename" world/;
  # mv "$filename" "$backup_dir/"
# }
