Skip to content

Commit fec44cb

Browse files
committed
Add Paperclip
1 parent 133c880 commit fec44cb

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "tools/yarn"]
2-
path = tools/yarn
3-
url = https://github.com/FabricMC/yarn.git
1+
[submodule "tools/Paperclip"]
2+
path = tools/Paperclip
3+
url = https://github.com/PaperMC/Paperclip

loom

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
mcVersion="20w45a"
4+
35
# resolve shell-specifics
46
case "$(echo "$SHELL" | sed -E 's|/usr(/local)?||g')" in
57
"/bin/zsh")
@@ -40,20 +42,18 @@ case "$1" in
4042
tools/scripts/applyPatches.sh "./tools/decomp/decompiled" || exit 1
4143
) || failed=1
4244
;;
43-
"y" | "yarn")
44-
(
45-
set -e
46-
cd "$basedir"
47-
tools/scripts/decompile.sh "$basedir" || exit 1
48-
) || failed=1
49-
;;
5045
"s" | "setup")
5146
set -e
5247
cd "$basedir"
53-
tools/scripts/decompile.sh "$basedir" || exit 1
48+
tools/scripts/decompile.sh "$basedir" "$mcVersion" || exit 1
5449
cd "$basedir"
5550
tools/scripts/applyPatches.sh "./tools/decomp/decompiled" || exit 1
5651
;;
52+
"jar")
53+
cd "$basedir/tools/Paperclip"
54+
mvn clean package "-Dmcver=$mcVersion" "-Dpaperjar=$basedir/server/target/loom-$mcVersion.jar" "-Dvanillajar=$basedir/tools/decomp/server.jar" || exit 1
55+
cp "$basedir/tools/Paperclip/assembly/target/paperclip-$mcVersion.jar" "$basedir/loom-$mcVersion.jar"
56+
;;
5757
*)
5858
echo "This tool provides a variety of commands to manage a Loom development environment."
5959
echo ""
@@ -63,6 +63,7 @@ case "$1" in
6363
echo " |"
6464
echo " * p, patch | Applies all Loom patches to NMS without building the project."
6565
echo " * rb, rebuild | Rebuilds and creates patches from your existing project source."
66+
echo " * jar | Creates a distributable Loom server JAR."
6667
;;
6768
esac
6869

tools/Paperclip

Submodule Paperclip added at 130e36f

tools/scripts/decompile.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ toolsdir="$basedir/tools"
88
yarndir="$toolsdir/yarn"
99
decompdir="$toolsdir/decomp"
1010

11-
mcVersion="20w45a"
11+
mcVersion="$2"
1212
mcServerJar="https://launcher.mojang.com/v1/objects/043ec38297d0ec58abd6f636bc92f5664a8ccecb/server.jar"
1313
mcServerMappings="https://launcher.mojang.com/v1/objects/e13520140ed6bdbe2ca05f59ce12700e9081a8cf/server.txt"
1414

1515
function setup {
1616
git submodule update --init --recursive
1717

1818
echo "Downloading vanilla server jar and Mojang mappings."
19-
mkdir "$toolsdir/decomp"
19+
mkdir -p "$toolsdir/decomp"
2020
cd "$toolsdir/decomp"
2121
curl -O $mcServerJar
2222
curl -O $mcServerMappings

tools/yarn

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)