From bd2041a88688836450b96f93d2a92533a53b0068 Mon Sep 17 00:00:00 2001
From: Salt <rehashedsalt@cock.li>
Date: Sat, 6 Nov 2021 14:27:29 -0500
Subject: [PATCH 1/2] Ignore existing files when unpacking server zippies

---
 start-server.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/start-server.sh b/start-server.sh
index 1fe29c7..af6a7ce 100755
--- a/start-server.sh
+++ b/start-server.sh
@@ -16,7 +16,7 @@ if [ -n "$FORGE_PACK_ZIP" ]; then
 	unzip pack.zip
 	directory="$(find . -type d -iname "mods" -execdir pwd \; | sort -n | head -n 1)"
 	echo "Found modpack directory: $directory"
-	rsync -av "$directory"/ /minecraft/
+	rsync -av --ignore-existing "$directory"/ /minecraft/
 	popd > /dev/null 2>&1
 fi
 
@@ -27,7 +27,7 @@ if [ -n "$CONFIG_REPO" ]; then
 	pushd "$tmpdir" > /dev/null 2>&1
 	git clone "$CONFIG_REPO" .
 	rm -rf .git
-	rsync -av ./ /minecraft/
+	rsync -av --delete ./ /minecraft/
 	popd > /dev/null 2>&1
 fi
 

From 2e03a1faf875dc1845a0b35be8aeeb29140c867e Mon Sep 17 00:00:00 2001
From: Salt <rehashedsalt@cock.li>
Date: Mon, 20 Dec 2021 12:26:22 -0600
Subject: [PATCH 2/2] Update Forge for 1.16 I uh... hope this fixes the log4j
 issue

---
 Dockerfile | 2 +-
 build.sh   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 88f8e20..0cdefb7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,7 +3,7 @@ FROM alpine:latest AS build
 
 # Args
 ARG MINECRAFT_VERSION="1.16.5"
-ARG FORGE_VERSION="36.1.13"
+ARG FORGE_VERSION="36.2.22"
 
 # The actual setup work
 COPY start-server.sh /minecraft/start-server.sh
diff --git a/build.sh b/build.sh
index ca1cc9a..e2f1001 100755
--- a/build.sh
+++ b/build.sh
@@ -10,7 +10,7 @@ declare -a mcversions=(
 
 # Forge version dictionary (we only support one version per)
 declare -A forgeversions=(
-	["1.16.5"]="36.1.13"
+	["1.16.5"]="36.2.22"
 )
 
 # Build images