From d4cec7deba3b5f4b23b7f2d4abe82a9a7996432f Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Thu, 6 Aug 2020 09:05:19 -0500 Subject: [PATCH 1/3] Small Bug Fix/General Clean Up --- README.md | 4 ++-- patches/server/0001-Yatopia-Server-Fixes.patch | 14 +++++++------- patches/server/0003-Brandings.patch | 2 +- patches/server/0005-Add-getLastTickMs-api.patch | 2 +- ...config-Yatopia-command-and-basic-settings.patch | 12 ++++++++++++ scripts/applyUpstream.sh | 3 --- scripts/getUpstream.sh | 1 - yatopia | 2 +- 8 files changed, 24 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index ca6b60fd..6b2f1e4f 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ ## Introduction ## * [EMC](https://github.com/starlis/empirecraft) * [Lithium](https://github.com/jellysquid3/lithium-fabric) * [Akarin](https://github.com/Akarin-project/Akarin) -* [Rainforest](https://github.com/Proixmyst/Rainforest) +* [Rainforest](https://github.com/Proximyst/Rainforest) * [Origami](https://github.com/Minebench/Origami) * [Purpur](https://github.com/pl3xgaming/Purpur) @@ -69,7 +69,7 @@ ## LICENSE Everything is licensed under the MIT license and is free to be used in your own fork. -See [EMC](https://github.com/starlis/empirecraft), [Lithium](https://github.com/jellysquid3/lithium-fabric), [Akarin](https://github.com/Akarin-project/Akarin), [Purpur](https://github.com/pl3xgaming/Purpur), [Rainforest](https://github.com/Proixmyst/Rainforest), [Origami](https://github.com/Minebench/Origami), and [Tuinity](https://github.com/Spottedleaf/Tuinity) +See [EMC](https://github.com/starlis/empirecraft), [Lithium](https://github.com/jellysquid3/lithium-fabric), [Akarin](https://github.com/Akarin-project/Akarin), [Purpur](https://github.com/pl3xgaming/Purpur), [Rainforest](https://github.com/Proximyst/Rainforest), [Origami](https://github.com/Minebench/Origami), and [Tuinity](https://github.com/Spottedleaf/Tuinity) for the license of material used/modified by this project. **To use this project you'll have to accept the Mojang EULA!** diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index 6ac42815..3dcd45ae 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -5,15 +5,15 @@ Subject: [PATCH] Yatopia Server Fixes diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java -index 841a8d2b392acdcef90592b841cbbcb2237c6901..1fbbc17f0aa2fc505b87840ffe91ff9a7b4a56fe 100644 +index 841a8d2b392acdcef90592b841cbbcb2237c6901..88513b8830ea666ddf831771680b6e76e7cf95f0 100644 --- a/src/main/java/co/aikar/timings/TimingsExport.java +++ b/src/main/java/co/aikar/timings/TimingsExport.java -@@ -232,6 +232,8 @@ public class TimingsExport extends Thread { +@@ -231,7 +231,7 @@ public class TimingsExport extends Thread { + pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)), pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)), // Tuinity - add config to timings report pair("tuinity", mapAsJSON(Bukkit.spigot().getTuinityConfig(), null)) // Tuinity - add config to timings report - , pair("akarin", mapAsJSON(Bukkit.spigot().getAkarinConfig(), null)) // Akarin - Server config -+ , pair("origami", mapAsJSON(Bukkit.spigot().getOrigamiConfig(), null)) // Origami -+ , pair("rainforest", mapAsJSON(Bukkit.spigot().getRainforestConfig(), null)) // Rainforest +- , pair("akarin", mapAsJSON(Bukkit.spigot().getAkarinConfig(), null)) // Akarin - Server config ++ , pair("purpur", mapAsJSON(Bukkit.spigot().getPurpurConfig(), null)) // Yatopia - add config to timings report )); new TimingsExport(listeners, parent, history).start(); @@ -988,7 +988,7 @@ index 120d0df27e76c9beef9f09e6cdc0972454fdd4ca..00000000000000000000000000000000 - } - diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index afaa6ab4744190b134aeb616a1355cefd1333e37..51c59159e04c6f48cb99f691cb64245973d8e628 100644 +index afaa6ab4744190b134aeb616a1355cefd1333e37..4153c9f6ab5876e96b745f9270ed1003dcfa2950 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -836,6 +836,9 @@ public final class CraftServer implements Server { @@ -1033,7 +1033,7 @@ index afaa6ab4744190b134aeb616a1355cefd1333e37..51c59159e04c6f48cb99f691cb642459 + }*/ + // Purpur end + -+ ++ @Override public void restart() { org.spigotmc.RestartCommand.restart(); diff --git a/patches/server/0003-Brandings.patch b/patches/server/0003-Brandings.patch index d658d489..d6762b87 100644 --- a/patches/server/0003-Brandings.patch +++ b/patches/server/0003-Brandings.patch @@ -57,7 +57,7 @@ index 5960ed2e91008b363dad900c72064055413eafd9..ee6a2dbc1306871d9ba621f199054bef public CrashReport b(CrashReport crashreport) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 51c59159e04c6f48cb99f691cb64245973d8e628..e5aa68bd8c678398c81af96303669f1ec1b1d375 100644 +index 4153c9f6ab5876e96b745f9270ed1003dcfa2950..19d101e02183c04df3f21575356900a262031407 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -217,7 +217,7 @@ import javax.annotation.Nullable; // Paper diff --git a/patches/server/0005-Add-getLastTickMs-api.patch b/patches/server/0005-Add-getLastTickMs-api.patch index 3470bc41..9d364f1d 100644 --- a/patches/server/0005-Add-getLastTickMs-api.patch +++ b/patches/server/0005-Add-getLastTickMs-api.patch @@ -28,7 +28,7 @@ index ee6a2dbc1306871d9ba621f199054befb09744c2..26ee6e9219059c9f7175148e934d2ade this.X = true; // Purpur start - tps catchup diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e5aa68bd8c678398c81af96303669f1ec1b1d375..e1c62bcb9186518d2ad7f95b2d02847f210acd86 100644 +index 19d101e02183c04df3f21575356900a262031407..24b0fe67f2ea0a109fa32feb6ced0290cac7e8b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2420,4 +2420,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0006-Add-config-Yatopia-command-and-basic-settings.patch b/patches/server/0006-Add-config-Yatopia-command-and-basic-settings.patch index f12fd647..c8252378 100644 --- a/patches/server/0006-Add-config-Yatopia-command-and-basic-settings.patch +++ b/patches/server/0006-Add-config-Yatopia-command-and-basic-settings.patch @@ -4,6 +4,18 @@ Date: Wed, 5 Aug 2020 08:05:10 -0500 Subject: [PATCH] Add config Yatopia command and basic settings +diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java +index 88513b8830ea666ddf831771680b6e76e7cf95f0..274c1b5b0c62f5387e7d0301569e07abc0bf35e2 100644 +--- a/src/main/java/co/aikar/timings/TimingsExport.java ++++ b/src/main/java/co/aikar/timings/TimingsExport.java +@@ -232,6 +232,7 @@ public class TimingsExport extends Thread { + pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)), // Tuinity - add config to timings report + pair("tuinity", mapAsJSON(Bukkit.spigot().getTuinityConfig(), null)) // Tuinity - add config to timings report + , pair("purpur", mapAsJSON(Bukkit.spigot().getPurpurConfig(), null)) // Yatopia - add config to timings report ++ , pair("yatopia", mapAsJSON(Bukkit.spigot().getYatopiaConfig(), null)) // Yatopia - add config to timings report + )); + + new TimingsExport(listeners, parent, history).start(); diff --git a/src/main/java/dev/tr7zw/yatopia/YatopiaCommand.java b/src/main/java/dev/tr7zw/yatopia/YatopiaCommand.java new file mode 100644 index 0000000000000000000000000000000000000000..1e88bc1a89eada5008ffe88f7ed32e107b2fb10c diff --git a/scripts/applyUpstream.sh b/scripts/applyUpstream.sh index eb1a93e2..ada245b4 100755 --- a/scripts/applyUpstream.sh +++ b/scripts/applyUpstream.sh @@ -13,12 +13,9 @@ function enableCommitSigningIfNeeded { git config commit.gpgsign false cd $1/patches/$2 for D in ${searchtxts[@]}; do - echo "IMPORTANT:!!! $D" if [ -d $1/patches/$2/$dnoslashlower ]; then echo $D dnoslash=$D - echo "DnoS: $dnoslash" - echo "$1/Yatopia-$dnoslash" cd $1/Yatopia-$dnoslash echo "Appyling $2 $dnoslash files!" dnoslashlower="${dnoslash,,}" diff --git a/scripts/getUpstream.sh b/scripts/getUpstream.sh index 3068305b..fe865dfc 100755 --- a/scripts/getUpstream.sh +++ b/scripts/getUpstream.sh @@ -16,7 +16,6 @@ for D in */; do i=0 rm -rf -f "$1/patches/$dnoslash/$file/" echo "Looking for $file file!" - echo "$(cat $patchdir/$dnoslash/$file.txt)" IFS='&' read -ra ADDR <<< $(cat $patchdir/$dnoslash/$file.txt) for patch in ${ADDR[@]}; do diff --git a/yatopia b/yatopia index cb1365be..c7951a72 100755 --- a/yatopia +++ b/yatopia @@ -51,7 +51,7 @@ case "$1" in basedir $mvncmd -N install surefire-report:report cd ${FORK_NAME}-API - $mvncmd -e clean install && (cd ../Tuinity/Paper/Paper-MojangAPI && $mvncmd -e clean install) && cd ../${FORK_NAME}-Server && $mvncmd -e clean install surefire-report:report + $mvncmd -e clean install && (cd ../Tuinity/Paper/Paper-MojangAPI && $mvncmd -e clean install) && cd ../${FORK_NAME}-Server && $mvncmd -e clean install ) || failed=1 ;; "j" | "launcher" | "jar" | "paperclip") From 318fe9d893d28480d0214f93f1559eeeb2c8cb91 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Thu, 6 Aug 2020 09:09:01 -0500 Subject: [PATCH 2/3] Don't Double Upstream --- scripts/fetchUpstream.sh | 1 + yatopia | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fetchUpstream.sh b/scripts/fetchUpstream.sh index e2427d87..16b753a0 100755 --- a/scripts/fetchUpstream.sh +++ b/scripts/fetchUpstream.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +git submodule update --init -f cd $1 cd Tuinity git clean -fx diff --git a/yatopia b/yatopia index c7951a72..92647e23 100755 --- a/yatopia +++ b/yatopia @@ -87,7 +87,6 @@ case "$1" in "f" | "fu" | "full" | "fullbuild") ( echo "$JAVA_VERSION" - $scriptdir/initUpstream.sh "$basedir" || exit 1 basedir $scriptdir/updateUpstream.sh "$basedir" || exit 1 set -e From ac23b5938fa35a90116f1d150750de37efdd3642 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Thu, 6 Aug 2020 09:33:56 -0500 Subject: [PATCH 3/3] fix --- .../0006-Add-config-Yatopia-command-and-basic-settings.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0006-Add-config-Yatopia-command-and-basic-settings.patch b/patches/server/0006-Add-config-Yatopia-command-and-basic-settings.patch index c8252378..49defd6d 100644 --- a/patches/server/0006-Add-config-Yatopia-command-and-basic-settings.patch +++ b/patches/server/0006-Add-config-Yatopia-command-and-basic-settings.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Add config Yatopia command and basic settings diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java -index 88513b8830ea666ddf831771680b6e76e7cf95f0..274c1b5b0c62f5387e7d0301569e07abc0bf35e2 100644 +index 88513b8830ea666ddf831771680b6e76e7cf95f0..6a110318441a16cc3ff7dfa2364768279b16358f 100644 --- a/src/main/java/co/aikar/timings/TimingsExport.java +++ b/src/main/java/co/aikar/timings/TimingsExport.java @@ -232,6 +232,7 @@ public class TimingsExport extends Thread { pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)), // Tuinity - add config to timings report pair("tuinity", mapAsJSON(Bukkit.spigot().getTuinityConfig(), null)) // Tuinity - add config to timings report , pair("purpur", mapAsJSON(Bukkit.spigot().getPurpurConfig(), null)) // Yatopia - add config to timings report -+ , pair("yatopia", mapAsJSON(Bukkit.spigot().getYatopiaConfig(), null)) // Yatopia - add config to timings report ++ //, pair("yatopia", mapAsJSON(Bukkit.spigot().getYatopiaConfig(), null)) // Yatopia - add config to timings report )); new TimingsExport(listeners, parent, history).start();