From bb5946ac1353457053e4924622bcc7b0b8102805 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Tue, 4 Aug 2020 17:08:51 -0500 Subject: [PATCH 01/25] remove origami(s) --- .gitmodules | 5 ----- Origami | 1 - Origami2 | 1 - 3 files changed, 7 deletions(-) delete mode 160000 Origami delete mode 160000 Origami2 diff --git a/.gitmodules b/.gitmodules index 63879fe3..2f885026 100644 --- a/.gitmodules +++ b/.gitmodules @@ -23,11 +23,6 @@ url = https://github.com/Minevictus/Papercut.git branch = ver/1.16 update = merge -[submodule "Origami"] - path = Origami - url = https://github.com/MrIvanPlays/Origami/ - branch = master - update = merge [submodule "Origami2"] path = Origami2 url = https://github.com/Minebench/Origami.git diff --git a/Origami b/Origami deleted file mode 160000 index 7510dd6f..00000000 --- a/Origami +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7510dd6fb0bacf10d86de38599b24b3bee4771fa diff --git a/Origami2 b/Origami2 deleted file mode 160000 index 2a9f9291..00000000 --- a/Origami2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2a9f9291df1953d16b21cdac79d24f99a7c895f9 From 2dc33b16521733461660f20724c0ddf53c41cf83 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Tue, 4 Aug 2020 17:09:56 -0500 Subject: [PATCH 02/25] Removed submodule Origami2 --- .gitmodules | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 2f885026..9580ca10 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,9 +22,4 @@ path = Papercut url = https://github.com/Minevictus/Papercut.git branch = ver/1.16 - update = merge -[submodule "Origami2"] - path = Origami2 - url = https://github.com/Minebench/Origami.git - branch = 1.16 update = merge \ No newline at end of file From 3e5cc3a957d01735188ac608a3e4fa2909bb4d18 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Tue, 4 Aug 2020 17:10:44 -0500 Subject: [PATCH 03/25] re-add better origami --- .gitmodules | 5 ++++- Origami | 1 + patches/Origami/api.txt | 1 - patches/Origami/server.txt | 2 +- patches/Origami2/api.txt | 0 patches/Origami2/server.txt | 1 - 6 files changed, 6 insertions(+), 4 deletions(-) create mode 160000 Origami delete mode 100644 patches/Origami2/api.txt delete mode 100644 patches/Origami2/server.txt diff --git a/.gitmodules b/.gitmodules index 9580ca10..7f37fff3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,4 +22,7 @@ path = Papercut url = https://github.com/Minevictus/Papercut.git branch = ver/1.16 - update = merge \ No newline at end of file + update = merge +[submodule "Origami"] + path = Origami + url = https://github.com/Minebench/Origami.git diff --git a/Origami b/Origami new file mode 160000 index 00000000..2a9f9291 --- /dev/null +++ b/Origami @@ -0,0 +1 @@ +Subproject commit 2a9f9291df1953d16b21cdac79d24f99a7c895f9 diff --git a/patches/Origami/api.txt b/patches/Origami/api.txt index 9af0df19..e69de29b 100644 --- a/patches/Origami/api.txt +++ b/patches/Origami/api.txt @@ -1 +0,0 @@ -Remove-reload-command \ No newline at end of file diff --git a/patches/Origami/server.txt b/patches/Origami/server.txt index b5104344..a23f4f46 100644 --- a/patches/Origami/server.txt +++ b/patches/Origami/server.txt @@ -1 +1 @@ -Origami-config&Port-optimized-redstone-algorithm&Optimize-Pathfinder&Optimize-BehaviorController&Better-handling-of-tracker-timings-in-PlayerChunkMap \ No newline at end of file +Origami-Server-Config&Optimize-inventory-API-item-handling&Don-t-load-chunk-with-seed-based-feature-search&Hopper-Optimizations&Don-t-wake-up-entities-when-damage-event-is-cancelle diff --git a/patches/Origami2/api.txt b/patches/Origami2/api.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/patches/Origami2/server.txt b/patches/Origami2/server.txt deleted file mode 100644 index a23f4f46..00000000 --- a/patches/Origami2/server.txt +++ /dev/null @@ -1 +0,0 @@ -Origami-Server-Config&Optimize-inventory-API-item-handling&Don-t-load-chunk-with-seed-based-feature-search&Hopper-Optimizations&Don-t-wake-up-entities-when-damage-event-is-cancelle From 85252e3d9e7fb9fad3e206f3ab2ed1489affdea1 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Tue, 4 Aug 2020 17:13:15 -0500 Subject: [PATCH 04/25] Removed submodule Papercut --- .gitmodules | 7 +------ Papercut | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 160000 Papercut diff --git a/.gitmodules b/.gitmodules index 7f37fff3..426e57db 100644 --- a/.gitmodules +++ b/.gitmodules @@ -18,11 +18,6 @@ url = https://github.com/starlis/empirecraft.git branch = master update = merge -[submodule "Papercut"] - path = Papercut - url = https://github.com/Minevictus/Papercut.git - branch = ver/1.16 - update = merge [submodule "Origami"] path = Origami - url = https://github.com/Minebench/Origami.git + url = https://github.com/Minebench/Origami.git \ No newline at end of file diff --git a/Papercut b/Papercut deleted file mode 160000 index f521235d..00000000 --- a/Papercut +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f521235dc2dd5deaf57631fe4aa52cbe4d06d64a From edb2ca49bc24ab8bc080b29c71e175a3a1ef72ad Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Tue, 4 Aug 2020 17:14:16 -0500 Subject: [PATCH 05/25] add rain forest --- .gitmodules | 5 ++++- Rainforest | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 160000 Rainforest diff --git a/.gitmodules b/.gitmodules index 426e57db..db7d8c9a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -20,4 +20,7 @@ update = merge [submodule "Origami"] path = Origami - url = https://github.com/Minebench/Origami.git \ No newline at end of file + url = https://github.com/Minebench/Origami.git +[submodule "Rainforest"] + path = Rainforest + url = https://github.com/Proximyst/Rainforest.git diff --git a/Rainforest b/Rainforest new file mode 160000 index 00000000..789cc1df --- /dev/null +++ b/Rainforest @@ -0,0 +1 @@ +Subproject commit 789cc1df962877c293716cc86ddeaf8ef06baffd From 50c42e9b81bbe855c6466e0bb757ceda11b93286 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Tue, 4 Aug 2020 17:19:15 -0500 Subject: [PATCH 06/25] patch stuff --- .gitignore | 9 +++------ patches/Papercut/api.txt | 1 - patches/Papercut/server.txt | 1 - patches/Rainforest/api.txt | 1 + patches/Rainforest/server.txt | 1 + 5 files changed, 5 insertions(+), 8 deletions(-) delete mode 100644 patches/Papercut/api.txt delete mode 100644 patches/Papercut/server.txt create mode 100644 patches/Rainforest/api.txt create mode 100644 patches/Rainforest/server.txt diff --git a/.gitignore b/.gitignore index 5fa7c456..6d157b29 100644 --- a/.gitignore +++ b/.gitignore @@ -14,19 +14,16 @@ target/site/surefire-report.html /patches/Akarin/** /patches/Purpur/** /patches/Empirecraft/** -/patches/Papercut/** +/patches/Rainforest/** /patches/Origami/** -/patches/Origami2/** !/patches/Purpur/server.txt !/patches/Purpur/api.txt !/patches/Empirecraft/server.txt !/patches/Empirecraft/api.txt !/patches/Akarin/server.txt !/patches/Akarin/api.txt -!/patches/Papercut/server.txt -!/patches/Papercut/api.txt +!/patches/Rainforest/server.txt +!/patches/Rainforest/api.txt !/patches/Origami/server.txt !/patches/Origami/api.txt -!/patches/Origami2/server.txt -!/patches/Origami2/api.txt yatopia-1.16.1-paperclip.jar diff --git a/patches/Papercut/api.txt b/patches/Papercut/api.txt deleted file mode 100644 index 38835306..00000000 --- a/patches/Papercut/api.txt +++ /dev/null @@ -1 +0,0 @@ -Ban-EntityTrackerFixer \ No newline at end of file diff --git a/patches/Papercut/server.txt b/patches/Papercut/server.txt deleted file mode 100644 index f21d9336..00000000 --- a/patches/Papercut/server.txt +++ /dev/null @@ -1 +0,0 @@ -Add-Papercut-config&Apply-advancements-async \ No newline at end of file diff --git a/patches/Rainforest/api.txt b/patches/Rainforest/api.txt new file mode 100644 index 00000000..58ab0496 --- /dev/null +++ b/patches/Rainforest/api.txt @@ -0,0 +1 @@ +Ban-certain-plugins \ No newline at end of file diff --git a/patches/Rainforest/server.txt b/patches/Rainforest/server.txt new file mode 100644 index 00000000..dc39c396 --- /dev/null +++ b/patches/Rainforest/server.txt @@ -0,0 +1 @@ +Ban-certain-plugins&Apply-advancements-async&Optimize-Pathfinder-Remove-Streams-Optimized-collect&Optimize-redstone-algorithm&Async-navigation \ No newline at end of file From ace99fdac232ea33c67491a046c2d2fcc4d4c8d3 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Tue, 4 Aug 2020 17:21:08 -0500 Subject: [PATCH 07/25] update upsteam --- Tuinity | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tuinity b/Tuinity index 650532ad..475ca7cb 160000 --- a/Tuinity +++ b/Tuinity @@ -1 +1 @@ -Subproject commit 650532ad9f1d74ee6324e4c63d5e0eaf2ccfdcf3 +Subproject commit 475ca7cbf73456c570adfb0573ea02b87ba5cef4 From 4235442138fe350b7858bcc8fddf8f79f1d30486 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Tue, 4 Aug 2020 17:22:01 -0500 Subject: [PATCH 08/25] remove old asnyc pathfinding --- .../server/0026-Akarin-updated-Async-Path-Finding.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename patches/{ => removed}/server/0026-Akarin-updated-Async-Path-Finding.patch (100%) diff --git a/patches/server/0026-Akarin-updated-Async-Path-Finding.patch b/patches/removed/server/0026-Akarin-updated-Async-Path-Finding.patch similarity index 100% rename from patches/server/0026-Akarin-updated-Async-Path-Finding.patch rename to patches/removed/server/0026-Akarin-updated-Async-Path-Finding.patch From 16690df3b67a3aa3ce1d324e89c02099b9fe11ff Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Tue, 4 Aug 2020 19:27:24 -0500 Subject: [PATCH 09/25] update patches --- .../server/0001-Yatopia-Server-Fixes.patch | 282 +++++++++++------- patches/server/0003-Brandings.patch | 2 +- .../server/0005-Add-getLastTickMs-api.patch | 4 +- ...g-Yatopia-command-and-basic-settings.patch | 13 +- ...only-players-to-have-collisions-with.patch | 4 +- .../0010-Player-saving-async-FileIO.patch | 10 +- .../server/0011-Modify-default-configs.patch | 4 +- patches/server/0014-lithium-enum_values.patch | 4 +- .../0016-lithium-MixinLandPathNodeMaker.patch | 6 +- .../server/0021-Optimize-Hopper-logic.patch | 10 +- .../0022-Optimize-TileEntity-loading.patch | 2 +- ...figs.patch => 0026-Redirect-Configs.patch} | 95 +----- 12 files changed, 222 insertions(+), 214 deletions(-) rename patches/server/{0027-Redirect-Configs.patch => 0026-Redirect-Configs.patch} (62%) diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index b38f3315..4b6363ef 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -1,37 +1,21 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Bud Gidiere -Date: Fri, 31 Jul 2020 22:39:43 -0500 +Date: Tue, 4 Aug 2020 19:15:55 -0500 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..c9cd3f6e6bb779ecaf0412c21e0dc654321eb44f 100644 +index 841a8d2b392acdcef90592b841cbbcb2237c6901..ff2351b57e96c8c17701a0608c9f2596d0adae6e 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 { +@@ -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("akarin", mapAsJSON(Bukkit.spigot().getAkarinConfig(), null)) // Akarin - Server config -+ , pair("papercut", mapAsJSON(Bukkit.spigot().getPapercutConfig(), null)) // Papercut + , pair("origami", mapAsJSON(Bukkit.spigot().getOrigamiConfig(), null)) // Origami )); new TimingsExport(listeners, parent, history).start(); -diff --git a/src/main/java/co/aikar/timings/TimingsExport.java.rej b/src/main/java/co/aikar/timings/TimingsExport.java.rej -deleted file mode 100644 -index aad8019b2c23b72bfad58a507671cd750bdc1a20..0000000000000000000000000000000000000000 ---- a/src/main/java/co/aikar/timings/TimingsExport.java.rej -+++ /dev/null -@@ -1,9 +0,0 @@ --diff a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java (rejected hunks) --@@ -231,6 +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("papercut", mapAsJSON(Bukkit.spigot().getPapercutConfig(), null)) // Papercut -- )); -- -- new TimingsExport(listeners, parent, history).start(); diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java index dee9655b89d061ec8218ea2c54660c6003e8548f..253b73cfc597d4c7106d969be7b18c68166128ae 100644 --- a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java @@ -62,26 +46,26 @@ index c9fa39c5b4b013b56720e339463ffcb5fd3c13f9..00000000000000000000000000000000 - - for (final NextTickListEntry toTick : this.toTickThisTick) { diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java -index fe7330fabe386966c2d203a190a00a785ea21be0..3b3c7053c73ac31eb00585c4e1fc19933467205a 100644 +index fe7330fabe386966c2d203a190a00a785ea21be0..bd107a376eaf660ba1ad61c035f8ed2d9d04749c 100644 --- a/src/main/java/de/minebench/origami/OrigamiConfig.java +++ b/src/main/java/de/minebench/origami/OrigamiConfig.java @@ -112,6 +112,19 @@ public final class OrigamiConfig { config.addDefault("worlds.default." + path, Double.valueOf(dfl)); return config.getDouble("worlds." + worldName + "." + path, config.getDouble("worlds.default." + path, dfl)); } -+ ++ + public boolean tickEmptyHoppers = false; + public int fullHopperCooldown = 128; + private void hopperOptimizations() { + tickEmptyHoppers = getBoolean("tick-empty-hoppers", tickEmptyHoppers); + fullHopperCooldown = getInt("ticks-per.full-hopper-cooldown", fullHopperCooldown); + } -+ ++ + public boolean fastFeatureSearchDontLoad = false; + private void fastFeatureSearchDontLoad() { -+ fastFeatureSearchDontLoad = getBoolean("fast-feature-search-dont-load", fastFeatureSearchDontLoad); ++ fastFeatureSearchDontLoad = getBoolean("fast-feature-search-dont-load", fastFeatureSearchDontLoad); + } -+ ++ } } @@ -145,34 +129,42 @@ index d1152585c5f482e554966f965561626c78ac4d3a..00000000000000000000000000000000 - this.world.timings.countNaturalMobs.startTiming(); // Paper - timings - int l = this.chunkMapDistance.b(); - // Paper start - per player mob spawning -diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 77b6e4dd34893f0959574f95078bc3fa6896e69c..ad1af2905e4f3e3d05a0dc63859a6e2f3bc43327 100644 ---- a/src/main/java/net/minecraft/server/DedicatedServer.java -+++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -181,6 +181,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - // Paper end - com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config - app.akarin.server.Config.init((java.io.File) options.valueOf("akarin-settings")); // Akarin - Server Config -+ us.minevict.papercut.PapercutConfig.init((java.io.File) options.valueOf("papercut-settings")); // Papercut -+ com.mrivanplays.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings")); // Origami - server config - - this.setPVP(dedicatedserverproperties.pvp); - this.setAllowFlight(dedicatedserverproperties.allowFlight); -diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java.rej b/src/main/java/net/minecraft/server/DedicatedServer.java.rej +diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java +index e19bb5ce5c32d9c08336f802fa9058603e23c6ab..d73ef98330c4ae643950b16341b3cde0d52928ce 100644 +--- a/src/main/java/net/minecraft/server/EntityInsentient.java ++++ b/src/main/java/net/minecraft/server/EntityInsentient.java +@@ -758,7 +758,11 @@ public abstract class EntityInsentient extends EntityLiving { + this.goalSelector.doTick(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("navigation"); // Akarin - remove caller +- this.navigation.c(); ++ // Paper start - async navigation ++ if (this.navigation instanceof AsyncNavigationAbstract) ++ ((AsyncNavigationAbstract) this.navigation).asyncTick(); ++ else ++ // Paper end + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("mob tick"); // Akarin - remove caller + this.mobTick(); +diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java.rej b/src/main/java/net/minecraft/server/EntityInsentient.java.rej deleted file mode 100644 -index 6b1dd973eb1e44e530d525981fbe4c698088b9b8..0000000000000000000000000000000000000000 ---- a/src/main/java/net/minecraft/server/DedicatedServer.java.rej +index de5ec59cb607030703e7b0361b1fa615b95e289e..0000000000000000000000000000000000000000 +--- a/src/main/java/net/minecraft/server/EntityInsentient.java.rej +++ /dev/null -@@ -1,9 +0,0 @@ --diff a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java (rejected hunks) --@@ -171,6 +171,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer -- com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now -- // Paper end -- com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config --+ us.minevict.papercut.PapercutConfig.init((java.io.File) options.valueOf("papercut-settings")); // Papercut -- -- this.setPVP(dedicatedserverproperties.pvp); -- this.setAllowFlight(dedicatedserverproperties.allowFlight); +@@ -1,13 +0,0 @@ +-diff a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java (rejected hunks) +-@@ -757,6 +758,11 @@ public abstract class EntityInsentient extends EntityLiving { +- this.goalSelector.doTick(); +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().enter("navigation"); +-+ // Paper start - async navigation +-+ if (this.navigation instanceof AsyncNavigationAbstract) +-+ ((AsyncNavigationAbstract) this.navigation).asyncTick(); +-+ else +-+ // Paper end +- this.navigation.c(); +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().enter("mob tick"); diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java index 70ae2923e21d7a0312e629a903ca9e380d6c6114..d906c5e530c2e7f779df079223aee619a73b5d51 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java @@ -292,8 +284,103 @@ index b005dd817e9ecffcf2172b4a807b0ecc632570b0..00000000000000000000000000000000 - this.sleepForTick(); - this.methodProfiler.exit(); - this.methodProfiler.b(); +diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java +index 2f2f8d74acef3cdaeda0faab67ace0d28e2d4627..d155d843c03ee1e16180657886a87844e6b34aa6 100644 +--- a/src/main/java/net/minecraft/server/NavigationAbstract.java ++++ b/src/main/java/net/minecraft/server/NavigationAbstract.java +@@ -8,25 +8,25 @@ import javax.annotation.Nullable; + + public abstract class NavigationAbstract { + +- protected final EntityInsentient a; public Entity getEntity() { return a; } // Paper - OBFHELPER +- protected final World b; ++ protected final EntityInsentient a; public EntityInsentient getEntity() { return a; } // Paper - OBFHELPER ++ protected final World b; protected final World getWorld() { return this.b; } // Paper - OBFHELPER + @Nullable +- protected PathEntity c; protected final PathEntity getCurrentPath() { return this.c; } // Paper - OBFHELPER +- protected double d; +- protected int e; +- protected int f; +- protected Vec3D g; +- protected BaseBlockPosition h; +- protected long i; +- protected long j; +- protected double k; +- protected float l; ++ protected PathEntity c; protected final PathEntity getCurrentPath() { return this.c; } protected final void setCurrentPath(PathEntity path) { this.c = path; } // Paper - OBFHELPER ++ protected double d; protected final double getSpeed() { return this.d; } // Paper - OBFHELPER ++ protected int e; protected final int getCurrentTick() { return this.e; } protected final void incrementTick() { ++this.e; } // Paper - OBFHELPER ++ protected int f; protected final int getCurrentPathStartTime() { return this.f; } protected final void setCurrentPathStartTime(int time) { this.f = time; } // Paper - OBFHELPER ++ protected Vec3D g; protected final Vec3D getCurrentPathStartPosition() { return this.g; } protected final void setCurrentPathStartPosition(Vec3D position) { this.g = position; } // Paper - OBFHELPER ++ protected BaseBlockPosition h; protected final BaseBlockPosition getLastNodePosition() { return this.h; } protected final void setLastNodePosition(BaseBlockPosition position) { this.h = position; } // Paper - OBFHELPER ++ protected long i; protected final long getCurrentNodeStartTickMs() { return this.i; } protected final void addToCurrentNodeStartTickMs(long amount) { this.i += amount; } // Paper - OBFHELPER ++ protected long j; protected final long getLastActiveTickMs() { return this.j; } protected final void setLastActiveTickMs(long ms) { this.j = ms; } // Paper - OBFHELPER ++ protected double k; protected final double getCurrentNodeTimeout() { return this.k; } protected final void setCurrentNodeTimeout(double timeout) { this.k = timeout; } // Paper - OBFHELPER ++ protected float l; protected final float getChebyshevMinimumReachProximity() { return this.l; } protected final void setChebyshevMinimumReachProximity(float proximity) { this.l = proximity; } // Paper - OBFHELPER + protected boolean m; protected final boolean needsPathRecalculation() { return this.m; } // Tuinity - OBFHELPER + protected long n; +- protected PathfinderAbstract o; +- private BlockPosition p; +- private int q; +- private float r; ++ protected PathfinderAbstract o; protected final PathfinderAbstract getNodeCreator() { return this.o; } // Paper - OBFHELPER ++ private BlockPosition p; protected final BlockPosition getCurrentTarget() { return this.p; } protected final void setCurrentTarget(BlockPosition target) { this.p = target; } // Paper - OBFHELPER ++ private int q; protected final int getCurrentDistance() { return this.q; } // Paper - OBFHELPER ++ private float r; protected final float getRangeMultiplier() { return this.r; } // Paper - OBFHELPER + private final Pathfinder s; public Pathfinder getPathfinder() { return this.s; } // Paper - OBFHELPER + + // Tuinity start +diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java.rej b/src/main/java/net/minecraft/server/NavigationAbstract.java.rej +deleted file mode 100644 +index 3b706d3951c187dfdd158b7c4c73014d271855ca..0000000000000000000000000000000000000000 +--- a/src/main/java/net/minecraft/server/NavigationAbstract.java.rej ++++ /dev/null +@@ -1,43 +0,0 @@ +-diff a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java (rejected hunks) +-@@ -8,25 +8,25 @@ import javax.annotation.Nullable; +- +- public abstract class NavigationAbstract { +- +-- protected final EntityInsentient a; public Entity getEntity() { return a; } // Paper - OBFHELPER +-- protected final World b; +-+ protected final EntityInsentient a; public EntityInsentient getEntity() { return a; } // Paper - OBFHELPER +-+ protected final World b; protected final World getWorld() { return this.b; } // Paper - OBFHELPER +- @Nullable +-- protected PathEntity c; protected final PathEntity getCurrentPath() { return this.c; } // Paper - OBFHELPER +-- protected double d; +-- protected int e; +-- protected int f; +-- protected Vec3D g; +-- protected BaseBlockPosition h; +-- protected long i; +-- protected long j; +-- protected double k; +-- protected float l; +-+ protected PathEntity c; protected final PathEntity getCurrentPath() { return this.c; } protected final void setCurrentPath(PathEntity path) { this.c = path; } // Paper - OBFHELPER +-+ protected double d; protected final double getSpeed() { return this.d; } // Paper - OBFHELPER +-+ protected int e; protected final int getCurrentTick() { return this.e; } protected final void incrementTick() { ++this.e; } // Paper - OBFHELPER +-+ protected int f; protected final int getCurrentPathStartTime() { return this.f; } protected final void setCurrentPathStartTime(int time) { this.f = time; } // Paper - OBFHELPER +-+ protected Vec3D g; protected final Vec3D getCurrentPathStartPosition() { return this.g; } protected final void setCurrentPathStartPosition(Vec3D position) { this.g = position; } // Paper - OBFHELPER +-+ protected BaseBlockPosition h; protected final BaseBlockPosition getLastNodePosition() { return this.h; } protected final void setLastNodePosition(BaseBlockPosition position) { this.h = position; } // Paper - OBFHELPER +-+ protected long i; protected final long getCurrentNodeStartTickMs() { return this.i; } protected final void addToCurrentNodeStartTickMs(long amount) { this.i += amount; } // Paper - OBFHELPER +-+ protected long j; protected final long getLastActiveTickMs() { return this.j; } protected final void setLastActiveTickMs(long ms) { this.j = ms; } // Paper - OBFHELPER +-+ protected double k; protected final double getCurrentNodeTimeout() { return this.k; } protected final void setCurrentNodeTimeout(double timeout) { this.k = timeout; } // Paper - OBFHELPER +-+ protected float l; protected final float getChebyshevMinimumReachProximity() { return this.l; } protected final void setChebyshevMinimumReachProximity(float proximity) { this.l = proximity; } // Paper - OBFHELPER +- protected boolean m; +- protected long n; +-- protected PathfinderAbstract o; +-- private BlockPosition p; +-- private int q; +-- private float r; +-+ protected PathfinderAbstract o; protected final PathfinderAbstract getNodeCreator() { return this.o; } // Paper - OBFHELPER +-+ private BlockPosition p; protected final BlockPosition getCurrentTarget() { return this.p; } protected final void setCurrentTarget(BlockPosition target) { this.p = target; } // Paper - OBFHELPER +-+ private int q; protected final int getCurrentDistance() { return this.q; } // Paper - OBFHELPER +-+ private float r; protected final float getRangeMultiplier() { return this.r; } // Paper - OBFHELPER +- private final Pathfinder s; public Pathfinder getPathfinder() { return this.s; } // Paper - OBFHELPER +- +- public NavigationAbstract(EntityInsentient entityinsentient, World world) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index a91b540a9e35efc8746f74f039a8ab6cfbd37206..546f4c942b047a39e0aec10cc2009b90573484dd 100644 +index 3da442fca229f4abae5c1f7725e60286140061b4..038f4e85e7a7e612d72f21f530f9160dc2f7474f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -1169,7 +1169,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -361,10 +448,10 @@ index 8b5d001fb8ecb4a5b96bda6532cf8d5900816290..00000000000000000000000000000000 - IChunkAccess ichunkaccess = iworldreader.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, ChunkStatus.STRUCTURE_STARTS, !(iworldreader instanceof World) || !((World) iworldreader).origamiConfig.onlyFindGeneratedFeatures); - if (ichunkaccess == null) { diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index 7e06324777617d38be18e80b8498a74b1b0eb97f..d87d3f274ba1525c13875a92eec9d4c1bd265fa5 100644 +index 2fbbc1588c2943c8998550db4da6642e666650d8..3ff61141aede4b5a09bf83153222de0d14db5ad0 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java -@@ -514,6 +514,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -508,6 +508,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi entityitem = (EntityItem) iterator.next(); } while (!a((IInventory) ihopper, entityitem)); @@ -440,7 +527,7 @@ index bada470cba41cce9beb9eb04227b42c1d489d731..00000000000000000000000000000000 - private int c; - private TileEntityShulkerBox.AnimationPhase i; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ce7a742f2a3b5c169b956c1a91819882b9b57955..542b7cb89ac6b216d02bac6563df60d53cc7e9f1 100644 +index b32638165798a4b6022fc41e9c9ac8d5dac507a5..5111875cdb28b6958dec09215d4d4b8c8cbaad5a 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -96,6 +96,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -464,37 +551,46 @@ index ce7a742f2a3b5c169b956c1a91819882b9b57955..542b7cb89ac6b216d02bac6563df60d5 this.generator = gen; this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit -@@ -646,6 +653,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -636,6 +643,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + + public void b(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {} + ++ + public void applyPhysics(BlockPosition blockposition, Block block) { + if (captureBlockStates) { return; } // Paper - Cancel all physics during placement + this.a(blockposition.west(), block, blockposition); +@@ -645,7 +653,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + this.a(blockposition.north(), block, blockposition); this.a(blockposition.south(), block, blockposition); } - -+ public void neighborChanged(BlockPosition pos, Block block, BlockPosition parent) { a(pos, block, parent); } // Origami - OBFHELPER +- ++ public void a(BlockPosition blockposition, Block block, EnumDirection enumdirection) { if (enumdirection != EnumDirection.WEST) { this.a(blockposition.west(), block, blockposition); +@@ -673,6 +681,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + + } + ++ public void neighborChanged(BlockPosition pos, Block blockIn, BlockPosition fromPos) { a(pos, blockIn, fromPos); } // Paper - OBFHELPER + public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { + if (!this.isClientSide) { + IBlockData iblockdata = this.getTypeIfLoaded(blockposition); // EMC diff --git a/src/main/java/net/minecraft/server/World.java.rej b/src/main/java/net/minecraft/server/World.java.rej deleted file mode 100644 -index 6f7cf093021998e6ae0178fa851e82437d4f7f86..0000000000000000000000000000000000000000 +index c632cd030e36d8abfd92a14948e4893d885823ad..0000000000000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/World.java.rej +++ /dev/null -@@ -1,17 +0,0 @@ +@@ -1,9 +0,0 @@ -diff a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java (rejected hunks) --@@ -95,6 +95,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { -- public final ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray +-@@ -646,6 +646,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - -- public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config --+ public final net.pl3x.purpur.PurpurWorldConfig purpurConfig; // Purpur +- } - -- public final co.aikar.timings.WorldTimingsHandler timings; // Paper -- public static BlockPosition lastPhysicsProblem; // Spigot --@@ -124,6 +125,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { -- this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.spigotConfig); // Paper -- this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this.paperConfig, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray -- this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config --+ this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((WorldDataServer)worlddatamutable).getName())); // Purpur -- this.generator = gen; -- this.world = new CraftWorld((WorldServer) this, gen, env); -- this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit +-+ public void neighborChanged(BlockPosition pos, Block blockIn, BlockPosition fromPos) { a(pos, blockIn, fromPos); } // Paper - OBFHELPER +- public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { +- if (!this.isClientSide) { +- IBlockData iblockdata = this.getType(blockposition); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java index 64f7fc40a6847ebc6c84b3c179614e186f861e1f..3782d329dc62a9e834f16a9009f4102b5b4aad6f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java @@ -696,21 +792,19 @@ 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..b06f72228df2bd047e378ba750936a1138e72ade 100644 +index d290bc1b8bea4fac9d4e14a1ccdf954055291e66..5bdde162b6f2aa81d136d82504ab5890e5262279 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -836,6 +836,10 @@ public final class CraftServer implements Server { +@@ -842,6 +842,8 @@ public final class CraftServer implements Server { com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config app.akarin.server.Config.init((File) console.options.valueOf("akarin-settings")); // Akarin - Server Config -+ us.minevict.papercut.PapercutConfig.init((File) console.options.valueOf("papercut-settings")); // Papercut + net.pl3x.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur -+ com.mrivanplays.origami.OrigamiConfig.init((File) console.options.valueOf("origami-settings")); // Origami + de.minebench.origami.OrigamiConfig.init((File) console.options.valueOf("origami-settings")); // Origami - Server Config for (WorldServer world : console.getWorlds()) { world.worldDataServer.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -872,6 +876,9 @@ public final class CraftServer implements Server { +@@ -878,6 +880,9 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper world.tuinityConfig.init(); // Tuinity - Server Config world.akarinConfig.init(); // Akarin - Server Config @@ -720,7 +814,7 @@ index afaa6ab4744190b134aeb616a1355cefd1333e37..b06f72228df2bd047e378ba750936a11 } Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper -@@ -2249,6 +2256,25 @@ public final class CraftServer implements Server { +@@ -2255,6 +2260,25 @@ public final class CraftServer implements Server { } // Akarin End - Server Config @@ -746,7 +840,7 @@ index afaa6ab4744190b134aeb616a1355cefd1333e37..b06f72228df2bd047e378ba750936a11 @Override public void restart() { org.spigotmc.RestartCommand.restart(); -@@ -2388,4 +2414,11 @@ public final class CraftServer implements Server { +@@ -2394,4 +2418,11 @@ public final class CraftServer implements Server { return mobGoals; } // Paper end @@ -777,7 +871,7 @@ index b9d3fb83434a48b328cf0a0ae1ec29d93e87aa3e..00000000000000000000000000000000 - // Purpur end - } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 5d9197e6b27c5fcb5ef5244a82b45052a5dd5b40..2c3f96e9d5e7c2cfd4a3d1aeba27f25c6e8b891b 100644 +index 2d12ad72be927712d38d6fb6991f4af7a196fb9b..1a454f74b322605b1006da5be13760b13cc5f931 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -138,6 +138,7 @@ public class Main { @@ -792,13 +886,13 @@ index 5d9197e6b27c5fcb5ef5244a82b45052a5dd5b40..2c3f96e9d5e7c2cfd4a3d1aeba27f25c .describedAs("Yml file"); // Akarin End - Server Config -+ // Papercut start -+ acceptsAll(asList("papercut", "papercut-settings"), "File for papercut settings") ++ // Origami Start - Server Config ++ acceptsAll(asList("origami", "origami-settings"), "File for origami settings") + .withRequiredArg() -+ .ofType(File.class) -+ .defaultsTo(new File("papercut.yml")) -+ .describedAs("Yml file"); -+ // Papercut end ++ .ofType(File.class) ++ .defaultsTo(new File("origami.yml")) ++ .describedAs("Yml file"); ++ // Origami end - Server Config + + // Purpur Start + acceptsAll(asList("purpur", "purpur-settings"), "File for purpur settings") @@ -811,20 +905,6 @@ index 5d9197e6b27c5fcb5ef5244a82b45052a5dd5b40..2c3f96e9d5e7c2cfd4a3d1aeba27f25c // Paper start acceptsAll(asList("server-name"), "Name of the server") .withRequiredArg() -@@ -168,6 +185,13 @@ public class Main { - .defaultsTo(new File("origami.yml")) - .describedAs("Yml file"); - // Origami end -+ // Origami Start - Server Config -+ acceptsAll(asList("origami", "origami-settings"), "File for origami settings") -+ .withRequiredArg() -+ .ofType(File.class) -+ .defaultsTo(new File("origami.yml")) -+ .describedAs("Yml file"); -+ // Origami end - Server Config - } - }; - diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java.rej b/src/main/java/org/bukkit/craftbukkit/Main.java.rej deleted file mode 100644 index 5d35899d1bedbb8643a601a2e1731a9bc66c7b61..0000000000000000000000000000000000000000 diff --git a/patches/server/0003-Brandings.patch b/patches/server/0003-Brandings.patch index 42a62ab5..5f471362 100644 --- a/patches/server/0003-Brandings.patch +++ b/patches/server/0003-Brandings.patch @@ -57,7 +57,7 @@ index e17119d37577de42f8d52afcfdfee64c33996941..7cc402a4dfaa2a4bb123c897b05c0919 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 b06f72228df2bd047e378ba750936a1138e72ade..e9b5140dbac0516c8900f32d686bb812c11562aa 100644 +index 5bdde162b6f2aa81d136d82504ab5890e5262279..a4802d89f601ef38a1235fb162cec9aef94851ee 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 aa2f7e08..9235fc5e 100644 --- a/patches/server/0005-Add-getLastTickMs-api.patch +++ b/patches/server/0005-Add-getLastTickMs-api.patch @@ -28,10 +28,10 @@ index 7cc402a4dfaa2a4bb123c897b05c09190cbdd489..8e5284fd39be45055bec1609f6b8dd05 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 e9b5140dbac0516c8900f32d686bb812c11562aa..dc7cd8c22b7edd6e63167421a565aca8dddbd102 100644 +index a4802d89f601ef38a1235fb162cec9aef94851ee..1263bba4e41b8f60ee52ea569159db9d52dfe0fb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2421,4 +2421,11 @@ public final class CraftServer implements Server { +@@ -2425,4 +2425,11 @@ public final class CraftServer implements Server { return getServer().lagging; } // Purpur end 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 0cd76c0e..445b7e88 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 @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: tr7zw -Date: Sun, 2 Aug 2020 11:17:08 -0500 +Date: Tue, 4 Aug 2020 19:19:20 -0500 Subject: [PATCH] Add config Yatopia command and basic settings @@ -357,7 +357,7 @@ index 0000000000000000000000000000000000000000..19bea6ee83d8b25da022662253328fb6 +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index ad1af2905e4f3e3d05a0dc63859a6e2f3bc43327..9ba65a7528755f54b9a1c4b1323b6e75de867f14 100644 +index 77b6e4dd34893f0959574f95078bc3fa6896e69c..f8033f57cdf8528199203506a9db92be7b1351ac 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -7,6 +7,7 @@ import com.mojang.authlib.GameProfileRepository; @@ -368,9 +368,9 @@ index ad1af2905e4f3e3d05a0dc63859a6e2f3bc43327..9ba65a7528755f54b9a1c4b1323b6e75 import java.io.IOException; import java.io.InputStreamReader; import java.net.InetAddress; -@@ -184,6 +185,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - us.minevict.papercut.PapercutConfig.init((java.io.File) options.valueOf("papercut-settings")); // Papercut - com.mrivanplays.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings")); // Origami - server config +@@ -182,6 +183,16 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config + app.akarin.server.Config.init((java.io.File) options.valueOf("akarin-settings")); // Akarin - Server Config + // Yatopia start + try { @@ -381,6 +381,7 @@ index ad1af2905e4f3e3d05a0dc63859a6e2f3bc43327..9ba65a7528755f54b9a1c4b1323b6e75 + } + dev.tr7zw.yatopia.YatopiaConfig.registerCommands(); + // Yatopia end ++ this.setPVP(dedicatedserverproperties.pvp); this.setAllowFlight(dedicatedserverproperties.allowFlight); this.setResourcePack(dedicatedserverproperties.resourcePack, this.aY()); @@ -398,7 +399,7 @@ index 98c5ecdf8b59670c872cb43593054f5a91d5e9fe..c77bb0b092cf4198edb6334520fd5704 }); StreamAccumulator streamaccumulator = new StreamAccumulator<>(Stream.concat(stream1, stream)); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d83ad80c08ef7c8a55bae6fd86aefa128c9c8a20..9f2aab1cb100cb6f9048d840db6fc15947a26847 100644 +index c52afcb107c4d444d9553ed186899adf0bc248ba..a1cbdd38925e2e6e530c8ec4d319a9ea34a542f8 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -266,6 +266,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/server/0007-Add-option-for-only-players-to-have-collisions-with.patch b/patches/server/0007-Add-option-for-only-players-to-have-collisions-with.patch index 189bba51..ad2711ac 100644 --- a/patches/server/0007-Add-option-for-only-players-to-have-collisions-with.patch +++ b/patches/server/0007-Add-option-for-only-players-to-have-collisions-with.patch @@ -19,10 +19,10 @@ index 19bea6ee83d8b25da022662253328fb6384f40d9..2cee6e02a7dcbacb5f002f9c5917a2e2 } \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 9f2aab1cb100cb6f9048d840db6fc15947a26847..ac029aed60e90072d214399d1f8901957af46ba3 100644 +index a1cbdd38925e2e6e530c8ec4d319a9ea34a542f8..2d0e7de93edaea2bf1791b8d0192d2e3eece739c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2843,40 +2843,46 @@ public abstract class EntityLiving extends Entity { +@@ -2844,40 +2844,46 @@ public abstract class EntityLiving extends Entity { if (i <= 0 && world.paperConfig.maxCollisionsPerEntity <= 0) { return; } diff --git a/patches/server/0010-Player-saving-async-FileIO.patch b/patches/server/0010-Player-saving-async-FileIO.patch index 8a258e21..818547d2 100644 --- a/patches/server/0010-Player-saving-async-FileIO.patch +++ b/patches/server/0010-Player-saving-async-FileIO.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Player-saving-async-FileIO diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java -index 2e88442e13546e9005e3783b09feaddbed7cea16..0f05c8887f5ecd639021e90389e53891b6ad80fc 100644 +index cf539c98073b475eb5b769c8cc11d48a7e6d58f1..5442c28c56f933c63bd611f579d0392876ecc2ef 100644 --- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java +++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java @@ -27,6 +27,8 @@ import java.util.List; @@ -176,10 +176,10 @@ index 2cada09ced1660526e9c112c2c8d92bbf9d6ea98..767ecf5fe63d86522ef8de4c0b4cda28 nbttagcompound.set("ShoulderEntityLeft", this.getShoulderEntityLeft()); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 8b64720f4acf5deb341074cd75f99ca7816f1e41..2e24e2210f91e69ead4f21f2426e5230fb887e53 100644 +index 33c40bf94e74d1ee268fb8ffb809f45b31621df9..c10a1d15bcfe0cb1c2ff6ee7f2881bc2040bcd1d 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -20,6 +20,7 @@ import java.util.Optional; +@@ -19,6 +19,7 @@ import java.util.Optional; import java.util.Set; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -187,7 +187,7 @@ index 8b64720f4acf5deb341074cd75f99ca7816f1e41..2e24e2210f91e69ead4f21f2426e5230 import javax.annotation.Nullable; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -1262,6 +1263,28 @@ public abstract class PlayerList { +@@ -1260,6 +1261,28 @@ public abstract class PlayerList { if (team != null) scoreboard.removeTeam(team); } // Paper end @@ -216,7 +216,7 @@ index 8b64720f4acf5deb341074cd75f99ca7816f1e41..2e24e2210f91e69ead4f21f2426e5230 } // Paper end -@@ -1299,13 +1322,13 @@ public abstract class PlayerList { +@@ -1297,13 +1320,13 @@ public abstract class PlayerList { File file = this.server.a(SavedFile.STATS).toFile(); File file1 = new File(file, uuid + ".json"); diff --git a/patches/server/0011-Modify-default-configs.patch b/patches/server/0011-Modify-default-configs.patch index be072543..ff9edb2c 100644 --- a/patches/server/0011-Modify-default-configs.patch +++ b/patches/server/0011-Modify-default-configs.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Modify default configs diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 56e4359ba32339e1bef58061585ff3e12e4215f3..5465f13cdedcf71310838e8505e94e975180919b 100644 +index 29200d223cf7c5948ebd0907ef5a1d9ea8114c81..1febe2aff4eab2f15e9bc4b21e6d0c350f122c87 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -201,7 +201,7 @@ public class PaperConfig { @@ -18,7 +18,7 @@ index 56e4359ba32339e1bef58061585ff3e12e4215f3..5465f13cdedcf71310838e8505e94e97 TimingsManager.privacy = getBoolean("timings.server-name-privacy", false); TimingsManager.hiddenConfigs = getList("timings.hidden-config-entries", Lists.newArrayList("database", "settings.bungeecord-addresses")); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index e471e764935e2a89560de56959a782b02e5e8fe1..5b9fef2b47b752897ea9153fe818a9c476e689ea 100644 +index 8cc8134f701d2517d134077b2fcd223106c09478..c2d5f7d22beb4c4829dfcb55fa842eaf727e906c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -600,7 +600,7 @@ public class PaperWorldConfig { diff --git a/patches/server/0014-lithium-enum_values.patch b/patches/server/0014-lithium-enum_values.patch index bc236954..e47cb930 100644 --- a/patches/server/0014-lithium-enum_values.patch +++ b/patches/server/0014-lithium-enum_values.patch @@ -37,10 +37,10 @@ index 4f10ca5ada741b4f5ef941bb9d92a2fa6a7c44ff..3d6f8d948d293ca57bf158bcd1f58e28 if (enumdirection2 != EnumDirection.DOWN && world.isBlockFacePowered(blockposition1.shift(enumdirection2), enumdirection2)) { return true; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index ac029aed60e90072d214399d1f8901957af46ba3..9780b8602984b5d8fce7d5b38ebcd70955097a56 100644 +index 2d0e7de93edaea2bf1791b8d0192d2e3eece739c..b664652df0035f89397d792f0a19f4c40b94b069 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2566,11 +2566,14 @@ public abstract class EntityLiving extends Entity { +@@ -2567,11 +2567,14 @@ public abstract class EntityLiving extends Entity { } } diff --git a/patches/server/0016-lithium-MixinLandPathNodeMaker.patch b/patches/server/0016-lithium-MixinLandPathNodeMaker.patch index 61211652..225f4c39 100644 --- a/patches/server/0016-lithium-MixinLandPathNodeMaker.patch +++ b/patches/server/0016-lithium-MixinLandPathNodeMaker.patch @@ -7,7 +7,7 @@ Original code by JellySquid, licensed under GNU Lesser General Public License v3 you can find the original code on https://github.com/jellysquid3/lithium-fabric/tree/1.15.x/fabric (Yarn mappings) diff --git a/src/main/java/net/minecraft/server/PathfinderNormal.java b/src/main/java/net/minecraft/server/PathfinderNormal.java -index 49fc87b6e196d4bde8b99929a4a42f00d2f462e8..97d2b88570037ad9f4efe037ae7410598b031c40 100644 +index 29c978aaa2b9f50f5dba70943653af7658d98fc7..595fb84f280bb10997992cc41ebc512ceaf2d696 100644 --- a/src/main/java/net/minecraft/server/PathfinderNormal.java +++ b/src/main/java/net/minecraft/server/PathfinderNormal.java @@ -4,12 +4,23 @@ import it.unimi.dsi.fastutil.longs.Long2ObjectMap; @@ -34,7 +34,7 @@ index 49fc87b6e196d4bde8b99929a4a42f00d2f462e8..97d2b88570037ad9f4efe037ae741059 protected float j; private final Long2ObjectMap k = new Long2ObjectOpenHashMap(); private final Object2BooleanMap l = new Object2BooleanOpenHashMap(); -@@ -508,13 +519,44 @@ public class PathfinderNormal extends PathfinderAbstract { +@@ -509,13 +520,44 @@ public class PathfinderNormal extends PathfinderAbstract { protected static PathType b(IBlockAccess iblockaccess, BlockPosition blockposition) { IBlockData iblockdata = iblockaccess.getTypeIfLoaded(blockposition); // Paper if (iblockdata == null) return PathType.BLOCKED; // Paper @@ -84,7 +84,7 @@ index 49fc87b6e196d4bde8b99929a4a42f00d2f462e8..97d2b88570037ad9f4efe037ae741059 return PathType.DAMAGE_CACTUS; } else if (iblockdata.a(Blocks.SWEET_BERRY_BUSH)) { return PathType.DAMAGE_OTHER; -@@ -540,7 +582,10 @@ public class PathfinderNormal extends PathfinderAbstract { +@@ -541,7 +583,10 @@ public class PathfinderNormal extends PathfinderAbstract { } else { Fluid fluid = iblockdata.getFluid(); // Tuinity - remove another getType call diff --git a/patches/server/0021-Optimize-Hopper-logic.patch b/patches/server/0021-Optimize-Hopper-logic.patch index 76ddfab8..44fd26df 100644 --- a/patches/server/0021-Optimize-Hopper-logic.patch +++ b/patches/server/0021-Optimize-Hopper-logic.patch @@ -35,7 +35,7 @@ index a29294fbc7cd6fcfff0df9eadd11de3bd7f1405e..7918382f26807f945dc7966b81c3c1e2 private void a(World world, BlockPosition blockposition, IBlockData iblockdata) { diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index d87d3f274ba1525c13875a92eec9d4c1bd265fa5..7e5e72d06f2b073dd98bb03d57618bdf7d269f91 100644 +index 3ff61141aede4b5a09bf83153222de0d14db5ad0..a5a8528db91c15afcf8c77d5e4727c8e0212bb63 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -46,7 +46,7 @@ index d87d3f274ba1525c13875a92eec9d4c1bd265fa5..7e5e72d06f2b073dd98bb03d57618bdf import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.IntStream; -@@ -667,14 +668,44 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -661,14 +662,44 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi @Nullable private IInventory l() { @@ -93,7 +93,7 @@ index d87d3f274ba1525c13875a92eec9d4c1bd265fa5..7e5e72d06f2b073dd98bb03d57618bdf } public static List c(IHopper ihopper) { -@@ -689,14 +720,15 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -683,14 +714,15 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi } @Nullable @@ -114,7 +114,7 @@ index d87d3f274ba1525c13875a92eec9d4c1bd265fa5..7e5e72d06f2b073dd98bb03d57618bdf BlockPosition blockposition = new BlockPosition(d0, d1, d2); if ( !world.isLoaded( blockposition ) ) return null; // Spigot IBlockData iblockdata = world.getType(blockposition); -@@ -714,8 +746,9 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -708,8 +740,9 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi } } } @@ -125,7 +125,7 @@ index d87d3f274ba1525c13875a92eec9d4c1bd265fa5..7e5e72d06f2b073dd98bb03d57618bdf List list = world.getEntities((Entity) null, new AxisAlignedBB(d0 - 0.5D, d1 - 0.5D, d2 - 0.5D, d0 + 0.5D, d1 + 0.5D, d2 + 0.5D), IEntitySelector.d); if (!list.isEmpty()) { -@@ -785,4 +818,21 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -779,4 +812,21 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi protected Container createContainer(int i, PlayerInventory playerinventory) { return new ContainerHopper(i, playerinventory, this); } diff --git a/patches/server/0022-Optimize-TileEntity-loading.patch b/patches/server/0022-Optimize-TileEntity-loading.patch index 458349b7..0d680c73 100644 --- a/patches/server/0022-Optimize-TileEntity-loading.patch +++ b/patches/server/0022-Optimize-TileEntity-loading.patch @@ -32,7 +32,7 @@ index c2c19a6fbfa2a4aba21aa71789071c69a6246556..7dfd36e22a896ae440bbda6db0628c44 } \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 542b7cb89ac6b216d02bac6563df60d53cc7e9f1..811b02d36416b41f7dfa0d3b8a94c159fe77c911 100644 +index 5111875cdb28b6958dec09215d4d4b8c8cbaad5a..c0429637d72d95b4f52d9eb69606b4b15eb7d390 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -2,6 +2,8 @@ package net.minecraft.server; diff --git a/patches/server/0027-Redirect-Configs.patch b/patches/server/0026-Redirect-Configs.patch similarity index 62% rename from patches/server/0027-Redirect-Configs.patch rename to patches/server/0026-Redirect-Configs.patch index ee7a522f..fa8f0caa 100644 --- a/patches/server/0027-Redirect-Configs.patch +++ b/patches/server/0026-Redirect-Configs.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: tr7zw -Date: Mon, 3 Aug 2020 17:38:07 +0200 +Date: Tue, 4 Aug 2020 19:26:12 -0500 Subject: [PATCH] Redirect Configs @@ -39,43 +39,9 @@ index 1742facec843dd87897d62e4aab819835fab4a38..358ac3361c814b7cf5f9650a6a49c6ef + Config.load(YatopiaConfig.config); } - public static void load(final YamlConfiguration config) { -diff --git a/src/main/java/com/mrivanplays/origami/OrigamiConfig.java b/src/main/java/com/mrivanplays/origami/OrigamiConfig.java -index 111fa3cd586c31eb0ab9fd425179d1f54a40a0f4..9038b3324c50982e85c5e1992de99df6ba902a89 100644 ---- a/src/main/java/com/mrivanplays/origami/OrigamiConfig.java -+++ b/src/main/java/com/mrivanplays/origami/OrigamiConfig.java -@@ -2,6 +2,8 @@ package com.mrivanplays.origami; - - import com.destroystokyo.paper.util.SneakyThrow; - -+import dev.tr7zw.yatopia.YatopiaConfig; -+ - import java.io.File; - import java.io.IOException; - import java.lang.reflect.Method; -@@ -23,7 +25,7 @@ public final class OrigamiConfig { - private static int configVersion; - - public static void init(final File file) { -- OrigamiConfig.configFile = file; -+ /*OrigamiConfig.configFile = file; - final YamlConfiguration config = new YamlConfiguration(); - config.options().header(CONFIG_HEADER); - config.options().copyDefaults(true); -@@ -42,8 +44,9 @@ public final class OrigamiConfig { - SneakyThrow.sneaky(e); - throw new RuntimeException(e); // unreachable - } -- } -- load(config); -+ }*/ -+ configFile = YatopiaConfig.CONFIG_FILE; -+ load(YatopiaConfig.config); - } - public static void load(final YamlConfiguration config) { diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java -index 3b3c7053c73ac31eb00585c4e1fc19933467205a..5c904da2c49098eed9ea2b0ed133bf1322225c4d 100644 +index bd107a376eaf660ba1ad61c035f8ed2d9d04749c..157a5c1be65b6b39787e5be11d1a8d5ea4aeb2b8 100644 --- a/src/main/java/de/minebench/origami/OrigamiConfig.java +++ b/src/main/java/de/minebench/origami/OrigamiConfig.java @@ -3,6 +3,8 @@ package de.minebench.origami; @@ -121,7 +87,7 @@ index 9f04500e167b8403c7487044a4ae03a6be61062a..fb3bf0731512b5517ca7ccb3240085b4 + "Yatopia contains many breaking changes and settings, so know what you are doing!\n" + "You have been warned!\n"; diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 9ba65a7528755f54b9a1c4b1323b6e75de867f14..d6e0d9dd98efadb46e7888af2e0cd2ff7736df83 100644 +index f8033f57cdf8528199203506a9db92be7b1351ac..d6f7d31418459fedaf486f2eeaa0d7ec0151552c 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -169,6 +169,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -140,12 +106,11 @@ index 9ba65a7528755f54b9a1c4b1323b6e75de867f14..d6e0d9dd98efadb46e7888af2e0cd2ff // Purpur start try { net.pl3x.purpur.PurpurConfig.init((java.io.File) options.valueOf("purpur-settings")); -@@ -184,16 +193,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -182,16 +191,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + // Paper end + com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config app.akarin.server.Config.init((java.io.File) options.valueOf("akarin-settings")); // Akarin - Server Config - us.minevict.papercut.PapercutConfig.init((java.io.File) options.valueOf("papercut-settings")); // Papercut - com.mrivanplays.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings")); // Origami - server config -+ de.minebench.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings")); - +- - // Yatopia start - try { - dev.tr7zw.yatopia.YatopiaConfig.init(new File("yatopia.yml")); @@ -155,14 +120,15 @@ index 9ba65a7528755f54b9a1c4b1323b6e75de867f14..d6e0d9dd98efadb46e7888af2e0cd2ff - } - dev.tr7zw.yatopia.YatopiaConfig.registerCommands(); - // Yatopia end ++ de.minebench.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings")); + this.setPVP(dedicatedserverproperties.pvp); this.setAllowFlight(dedicatedserverproperties.allowFlight); - this.setResourcePack(dedicatedserverproperties.resourcePack, this.aY()); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 2c3f96e9d5e7c2cfd4a3d1aeba27f25c6e8b891b..01ad4f9881623639aa247a064c600b78952ba1be 100644 +index 1a454f74b322605b1006da5be13760b13cc5f931..6820905bf16eb4e8a97615a7ef49b6d3337ab247 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -318,7 +318,7 @@ public class Main { +@@ -304,7 +304,7 @@ public class Main { } // Paper end System.setProperty( "library.jansi.version", "Paper" ); // Paper - set meaningless jansi version to prevent git builds from crashing on Windows @@ -171,42 +137,3 @@ index 2c3f96e9d5e7c2cfd4a3d1aeba27f25c6e8b891b..01ad4f9881623639aa247a064c600b78 System.out.println("Loading libraries, please wait..."); net.minecraft.server.Main.main(options); } catch (Throwable t) { -diff --git a/src/main/java/us/minevict/papercut/PapercutConfig.java b/src/main/java/us/minevict/papercut/PapercutConfig.java -index 1256b689481f9d31dc2fbbf6072293c293ed6c2e..f242810198a48e82838e67dd356da596e3288f8e 100644 ---- a/src/main/java/us/minevict/papercut/PapercutConfig.java -+++ b/src/main/java/us/minevict/papercut/PapercutConfig.java -@@ -1,6 +1,9 @@ - package us.minevict.papercut; - - import com.destroystokyo.paper.util.SneakyThrow; -+ -+import dev.tr7zw.yatopia.YatopiaConfig; -+ - import java.io.File; - import java.lang.reflect.Method; - import java.lang.reflect.Modifier; -@@ -20,7 +23,7 @@ public final class PapercutConfig { - private static int configVersion; - - public static void init(final File file) { -- final File papercutConfig = new File(file.getParent(), "papercut.yml"); -+ /*final File papercutConfig = new File(file.getParent(), "papercut.yml"); - if (!papercutConfig.exists()) { - final File oldConfig = new File(file.getParent(), "papercut.yml"); - oldConfig.renameTo(papercutConfig); -@@ -42,11 +45,12 @@ public final class PapercutConfig { - } catch (final Exception ex) { - Bukkit.getLogger().log(Level.SEVERE, "Failure to load papercut config", ex); - SneakyThrow.sneaky(ex); /* Rethrow, this is critical */ -- throw new RuntimeException(ex); // unreachable -+ /* throw new RuntimeException(ex); // unreachable - } -- } -+ }*/ - -- PapercutConfig.load(config); -+ configFile = YatopiaConfig.CONFIG_FILE; -+ PapercutConfig.load(YatopiaConfig.config); - } - - public static void load(final YamlConfiguration config) { From f733a06f98f66f7389a92821cca87db42f781a94 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Wed, 5 Aug 2020 08:21:25 -0500 Subject: [PATCH 10/25] Fix patches/config stuff --- patches/Rainforest/server.txt | 2 +- patches/api/0001-Yatopia-API-Bundle.patch | 14 +- patches/api/0005-Add-getLastTickMs-api.patch | 4 +- ...26-Akarin-updated-Async-Path-Finding.patch | 358 ------------------ .../server/0001-Yatopia-Server-Fixes.patch | 151 +++++--- patches/server/0003-Brandings.patch | 2 +- .../server/0005-Add-getLastTickMs-api.patch | 4 +- ...g-Yatopia-command-and-basic-settings.patch | 16 +- .../0022-Optimize-TileEntity-loading.patch | 12 +- patches/server/0026-Redirect-Configs.patch | 48 ++- 10 files changed, 172 insertions(+), 439 deletions(-) delete mode 100644 patches/removed/server/0026-Akarin-updated-Async-Path-Finding.patch diff --git a/patches/Rainforest/server.txt b/patches/Rainforest/server.txt index dc39c396..fe82185a 100644 --- a/patches/Rainforest/server.txt +++ b/patches/Rainforest/server.txt @@ -1 +1 @@ -Ban-certain-plugins&Apply-advancements-async&Optimize-Pathfinder-Remove-Streams-Optimized-collect&Optimize-redstone-algorithm&Async-navigation \ No newline at end of file +Add-Rainforest-config&Ban-certain-plugins&Apply-advancements-async&Add-more-dupe-options&Optimize-Pathfinder-Remove-Streams-Optimized-collect&Optimize-redstone-algorithm&Async-navigation \ No newline at end of file diff --git a/patches/api/0001-Yatopia-API-Bundle.patch b/patches/api/0001-Yatopia-API-Bundle.patch index 1090f673..abbe0ed7 100644 --- a/patches/api/0001-Yatopia-API-Bundle.patch +++ b/patches/api/0001-Yatopia-API-Bundle.patch @@ -3,7 +3,7 @@ From: Bud Gidiere Date: Sat, 1 Aug 2020 15:51:06 -0500 Subject: [PATCH] Yatopia API Bundle -Lagging threshold + Purpur & Papercut & Origami config +Lagging threshold + Purpur & Rainforest & Origami config diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java index 62cc1c74c11f56dcbd1e24e9c5478497742e6351..0770736b4b52f325027671b43f74ad038c97ce7f 100644 @@ -26,19 +26,21 @@ index 62cc1c74c11f56dcbd1e24e9c5478497742e6351..0770736b4b52f325027671b43f74ad03 + // Purpur end } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 1f916988bd54e8386011b0d7e82fc9219939a881..6ff5c73f607d1c1a3bc392fda2c0e8b492aab579 100644 +index 1f916988bd54e8386011b0d7e82fc9219939a881..154c24a5a32450636b1c554df1bb5262fa05e9c8 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1463,6 +1463,31 @@ public interface Server extends PluginMessageRecipient { +@@ -1463,6 +1463,33 @@ public interface Server extends PluginMessageRecipient { } // Akarin end - Server config -+ // Papercut start ++ // Rainforest start + @NotNull -+ public org.bukkit.configuration.file.YamlConfiguration getPapercutConfig() ++ public org.bukkit.configuration.file.YamlConfiguration getRainforestConfig() + { + throw new UnsupportedOperationException("Not supported yet."); + } ++ // Rainforest end ++ + // Purpur start + @NotNull + public org.bukkit.configuration.file.YamlConfiguration getPurpurConfig() { @@ -61,7 +63,7 @@ index 1f916988bd54e8386011b0d7e82fc9219939a881..6ff5c73f607d1c1a3bc392fda2c0e8b4 /** * Sends the component to the player * -@@ -1563,4 +1588,13 @@ public interface Server extends PluginMessageRecipient { +@@ -1563,4 +1590,13 @@ public interface Server extends PluginMessageRecipient { @NotNull com.destroystokyo.paper.entity.ai.MobGoals getMobGoals(); // Paper end diff --git a/patches/api/0005-Add-getLastTickMs-api.patch b/patches/api/0005-Add-getLastTickMs-api.patch index 80f21ca1..13e54ab9 100644 --- a/patches/api/0005-Add-getLastTickMs-api.patch +++ b/patches/api/0005-Add-getLastTickMs-api.patch @@ -20,10 +20,10 @@ index 0770736b4b52f325027671b43f74ad038c97ce7f..537e7fc9273b7e4ecc88eaad5b1a69d3 + // Yatopia end } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 6ff5c73f607d1c1a3bc392fda2c0e8b492aab579..09a710dd500e404b382e75b62f1f2533da270ff3 100644 +index 154c24a5a32450636b1c554df1bb5262fa05e9c8..1eb935b3ba88918f04a075d47b0f514ddc8f2499 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1597,4 +1597,13 @@ public interface Server extends PluginMessageRecipient { +@@ -1599,4 +1599,13 @@ public interface Server extends PluginMessageRecipient { */ boolean isLagging(); // Purpur end diff --git a/patches/removed/server/0026-Akarin-updated-Async-Path-Finding.patch b/patches/removed/server/0026-Akarin-updated-Async-Path-Finding.patch deleted file mode 100644 index 31f63d2d..00000000 --- a/patches/removed/server/0026-Akarin-updated-Async-Path-Finding.patch +++ /dev/null @@ -1,358 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: tsao chi -Date: Sun, 2 Aug 2020 12:25:52 -0500 -Subject: [PATCH] Akarin updated Async Path Finding - -Co-authored-by: Bud Gidiere - -diff --git a/src/main/java/net/minecraft/server/EntityBee.java b/src/main/java/net/minecraft/server/EntityBee.java -index e6868e2b65e3c2bde7696272b242a47e7394e27f..c4c3ef500b9b8465644a0b7712f43ba35ad3acc1 100644 ---- a/src/main/java/net/minecraft/server/EntityBee.java -+++ b/src/main/java/net/minecraft/server/EntityBee.java -@@ -445,9 +445,9 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB - } - - @Override -- public void c() { -+ public void tickAsync() { - if (!EntityBee.this.bJ.k()) { -- super.c(); -+ super.tickAsync(); - } - } - }; -diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 027a55223c660f25b0b52f99efed5b0c037ae658..09f332aa02604dd86224a6f66ec4f84d7bf99318 100644 ---- a/src/main/java/net/minecraft/server/EntityInsentient.java -+++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -757,7 +757,7 @@ public abstract class EntityInsentient extends EntityLiving { - this.goalSelector.doTick(); - //this.world.getMethodProfiler().exit(); // Akarin - remove caller - //this.world.getMethodProfiler().enter("navigation"); // Akarin - remove caller -- this.navigation.c(); -+ this.navigation.tickAsync(); // Akarin - Async pathfinder - //this.world.getMethodProfiler().exit(); // Akarin - remove caller - //this.world.getMethodProfiler().enter("mob tick"); // Akarin - remove caller - this.mobTick(); -diff --git a/src/main/java/net/minecraft/server/Navigation.java b/src/main/java/net/minecraft/server/Navigation.java -index 681465d8a74831461dce4615d2d19c7ed46bc299..f04411a2a295d2a982dca5851ae76a80a6a83585 100644 ---- a/src/main/java/net/minecraft/server/Navigation.java -+++ b/src/main/java/net/minecraft/server/Navigation.java -@@ -183,7 +183,7 @@ public class Navigation extends NavigationAbstract { - double d3 = (double) j2 + 0.5D - vec3d.z; - - if (d2 * d0 + d3 * d1 >= 0.0D) { -- PathType pathtype = this.o.a(this.b, i2, j - 1, j2, this.a, l, i1, j1, true, true); -+ PathType pathtype = this.o.a(this.o.a, i2, j - 1, j2, this.a, l, i1, j1, true, true); // Akarin - use chunk cache - - if (!this.a(pathtype)) { - return false; -diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 2405dc5e9a6a971a565c37710b61d5fc4737bdf8..2dac507e9e0044a32ae54ea57eada0de04c1467d 100644 ---- a/src/main/java/net/minecraft/server/NavigationAbstract.java -+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -28,6 +28,15 @@ public abstract class NavigationAbstract { - private int q; - private float r; - private final Pathfinder s; public Pathfinder getPathfinder() { return this.s; } // Paper - OBFHELPER -+ // Akarin start - Async pathfinder -+ private long lastPathfindAsync; -+ private static final java.util.concurrent.ExecutorService pathfindExecutor = -+ java.util.concurrent.Executors.newSingleThreadExecutor( -+ new com.google.common.util.concurrent.ThreadFactoryBuilder() -+ .setDaemon(true) -+ .setNameFormat("StarLink Pathfinder - %d") -+ .build()); -+ // Akarin end - - // Tuinity start - public boolean isViableForPathRecalculationChecking() { -@@ -83,7 +92,40 @@ public abstract class NavigationAbstract { - } - - } -+ // Akarin start - Async pathfinder, copied from above with modification -+ public void doPathfindAsync() { -+ if (this.b.getTime() - this.lastPathfindAsync > 20L) { -+ if (this.p != null) { -+ this.lastPathfindAsync = this.b.getTime(); -+ -+ // Bake chunk cache -+ float f = (float) this.a.b(GenericAttributes.FOLLOW_RANGE);; -+ BlockPosition blockposition = this.a.getChunkCoordinates(); -+ int k = (int) (f + (float) 8); -+ ChunkCache cache = new ChunkCache(this.b, blockposition.b(-k, -k, -k), blockposition.b(k, k, k)); -+ -+ // Execute directly if we already have a path entity, or compute one -+ if (this.c != null && !this.c.b()) { -+ doTickAsync(this.c); -+ return; -+ } - -+ pathfindExecutor.execute(() -> { -+ PathEntity result = findPathAsync(cache, java.util.Collections.singleton(this.p), this.q); -+ NavigationAbstract.this.b.getMinecraftServer().processQueue.add(() -> { -+ if (result != null && result.m() != null) -+ this.p = result.m(); -+ -+ NavigationAbstract.this.c = result; -+ }); -+ }); -+ } -+ } else { -+ // Execute directly, keep behaviour with vanilla, see the original doTick method -+ doTickAsync(this.c); -+ } -+ } -+ // Akarin end - @Nullable - public final PathEntity calculateDestination(double d0, double d1, double d2) { return a(d0, d1, d2, 0); } public final PathEntity a(double d0, double d1, double d2, int i) { // Paper - OBFHELPER - return this.a(new BlockPosition(d0, d1, d2), i); -@@ -164,7 +206,17 @@ public abstract class NavigationAbstract { - return pathentity; - } - } -- -+ // Akarin start - Async pathfinder, copied and edited from above with only pathfinding -+ protected PathEntity findPathAsync(ChunkCache cache, Set set, int j) { -+ if (this.a.locY() < 0.0D) { -+ return null; -+ } else if (!this.a()) { -+ return null; -+ } else { -+ return this.s.a(cache, this.a, set, f, j, this.r); -+ } -+ } -+ // Akarin end - public boolean a(double d0, double d1, double d2, double d3) { - return this.a(this.a(d0, d1, d2, 1), d3); - } -@@ -228,7 +280,7 @@ public abstract class NavigationAbstract { - return this.c; - } - -- public void c() { -+/* public void c() { - ++this.e; - if (this.m) { - this.j(); -@@ -238,7 +290,7 @@ public abstract class NavigationAbstract { - Vec3D vec3d; - - if (this.a()) { -- this.l(); -+ //this.l(); - } else if (this.c != null && this.c.f() < this.c.e()) { - vec3d = this.b(); - Vec3D vec3d1 = this.c.a(this.a, this.c.f()); -@@ -256,9 +308,44 @@ public abstract class NavigationAbstract { - this.a.getControllerMove().a(vec3d.x, this.b.getType(blockposition.down()).isAir() ? vec3d.y : PathfinderNormal.a((IBlockAccess) this.b, blockposition), vec3d.z, this.d); - } - } -+ }*/ -+ //Yatopia Start -+ public void c() { -+ this.tickAsync(); -+ } -+ //Yatopia End -+ // Akarin start - Async pathfinder, copied from above -+ public void tickAsync() { -+ ++this.e; -+ this.doPathfindAsync(); - } - -- protected void l() { -+ // This was copied from above partly with param -+ public void doTickAsync(PathEntity pathEntity) { -+ if (shouldContinuePathfind(pathEntity)) -+ return; -+ -+ Vec3D vec3d; -+ if (this.a()) { -+ this.applyPath(pathEntity); -+ } else if (pathEntity.f() < pathEntity.e()) { -+ vec3d = this.b(); -+ Vec3D vec3d1 = pathEntity.a(this.a, pathEntity.f()); -+ -+ if (vec3d.y > vec3d1.y && !this.a.isOnGround() && MathHelper.floor(vec3d.x) == MathHelper.floor(vec3d1.x) && MathHelper.floor(vec3d.z) == MathHelper.floor(vec3d1.z)) { -+ pathEntity.c(pathEntity.f() + 1); -+ } -+ } -+ -+ if (shouldContinuePathfind(pathEntity)) -+ return; -+ //PacketDebug.a(this.b, this.a, pathEntity, this.l); -+ vec3d = pathEntity.a((Entity) this.a); -+ BlockPosition blockposition = new BlockPosition(vec3d); -+ -+ this.a.getControllerMove().a(vec3d.x, this.b.getType(blockposition.down()).isAir() ? vec3d.y : PathfinderNormal.a((IBlockAccess) this.b, blockposition), vec3d.z, this.d); -+ } -+/* protected void l() { - Vec3D vec3d = this.b(); - - this.l = this.a.getWidth() > 0.75F ? this.a.getWidth() / 2.0F : 0.75F - this.a.getWidth() / 2.0F; -@@ -273,8 +360,26 @@ public abstract class NavigationAbstract { - } - - this.a(vec3d); -- } -+ }*/ -+ -+ // Akarin start - Async pathfinder, copied from above with param -+ protected void applyPath(PathEntity pathEntity) { -+ Vec3D vec3d = this.b(); -+ -+ this.l = this.a.getWidth() > 0.75F ? this.a.getWidth() / 2.0F : 0.75F - this.a.getWidth() / 2.0F; -+ BaseBlockPosition baseblockposition = pathEntity.g(); -+ double d0 = Math.abs(this.a.locX() - ((double) baseblockposition.getX() + 0.5D)); -+ double d1 = Math.abs(this.a.locY() - (double) baseblockposition.getY()); -+ double d2 = Math.abs(this.a.locZ() - ((double) baseblockposition.getZ() + 0.5D)); -+ boolean flag = d0 < (double) this.l && d2 < (double) this.l && d1 < 1.0D; - -+ if (flag || this.a.b(pathEntity.h().l) && this.b(vec3d)) { -+ pathEntity.c(pathEntity.f() + 1); -+ } -+ -+ this.applyPath0(pathEntity, vec3d); -+ } -+ // Akarin end - private boolean b(Vec3D vec3d) { - if (this.c.e() <= this.c.f() + 1) { - return false; -@@ -324,7 +429,39 @@ public abstract class NavigationAbstract { - } - - } -+ // Akarin start - Async pathfinder, copied from above with param -+ protected void applyPath0(PathEntity pathEntity, Vec3D vec3d) { -+ if (this.e - this.f > 100) { -+ if (vec3d.distanceSquared(this.g) < 2.25D) { -+ this.o(); -+ } -+ -+ this.f = this.e; -+ this.g = vec3d; -+ } -+ -+ if (!pathEntity.b()) { -+ BaseBlockPosition baseblockposition = pathEntity.g(); -+ -+ if (baseblockposition.equals(this.h)) { -+ this.i += SystemUtils.getMonotonicMillis() - this.j; -+ } else { -+ this.h = baseblockposition; -+ double d0 = vec3d.f(Vec3D.c(this.h)); -+ -+ this.k = this.a.dM() > 0.0F ? d0 / (double) this.a.dM() * 1000.0D : 0.0D; -+ } -+ -+ if (this.k > 0.0D && (double) this.i > this.k * 3.0D) { -+ this.e(); -+ this.o(); -+ } -+ -+ this.j = SystemUtils.getMonotonicMillis(); -+ } - -+ } -+ // Akarin end - private void e() { - this.h = BaseBlockPosition.ZERO; - this.i = 0L; -@@ -389,7 +526,11 @@ public abstract class NavigationAbstract { - public boolean r() { - return this.o.e(); - } -- -+ // Akarin start - Async pathfinder, copied from above with param -+ public static boolean shouldContinuePathfind(PathEntity pathEntity) { -+ return pathEntity == null || pathEntity.b(); -+ } -+ // Akarin end - public void b(BlockPosition blockposition) { - if (this.c != null && !this.c.b() && this.c.e() != 0) { // Tuinity - diff on change - needed for isViableForPathRecalculationChecking() - PathPoint pathpoint = this.c.c(); -diff --git a/src/main/java/net/minecraft/server/NavigationFlying.java b/src/main/java/net/minecraft/server/NavigationFlying.java -index 0c33a0c9d59d79a39826b5ee14144604717ffebe..cf3f4c1a2a89cce0345566a62faa34ef7e93c603 100644 ---- a/src/main/java/net/minecraft/server/NavigationFlying.java -+++ b/src/main/java/net/minecraft/server/NavigationFlying.java -@@ -28,7 +28,7 @@ public class NavigationFlying extends NavigationAbstract { - return this.a(entity.getChunkCoordinates(), entity, i); // Paper - Forward target entity - } - -- @Override -+/* @Override - public void c() { - ++this.e; - if (this.m) { -@@ -53,6 +53,31 @@ public class NavigationFlying extends NavigationAbstract { - this.a.getControllerMove().a(vec3d.x, vec3d.y, vec3d.z, this.d); - } - } -+ }*/ -+ -+ // This was copied from above partly with param -+ @Override -+ public void doTickAsync(PathEntity pathEntity) { -+ if (shouldContinuePathfind(pathEntity)) -+ return; -+ -+ Vec3D vec3d; -+ if (this.a()) { -+ this.applyPath(pathEntity); -+ } else if (pathEntity != null && pathEntity.f() < pathEntity.e()) { -+ vec3d = pathEntity.a(this.a, pathEntity.f()); -+ if (MathHelper.floor(this.a.locX()) == MathHelper.floor(vec3d.x) && MathHelper.floor(this.a.locY()) == MathHelper.floor(vec3d.y) && MathHelper.floor(this.a.locZ()) == MathHelper.floor(vec3d.z)) { -+ pathEntity.c(pathEntity.f() + 1); -+ } -+ } -+ -+ if (shouldContinuePathfind(pathEntity)) -+ return; -+ //PacketDebug.a(this.b, this.a, pathEntity, this.l); -+ vec3d = pathEntity.a((Entity) this.a); -+ BlockPosition blockposition = new BlockPosition(vec3d); -+ -+ this.a.getControllerMove().a(vec3d.x, vec3d.y, vec3d.z, this.d); - } - - @Override -diff --git a/src/main/java/net/minecraft/server/Pathfinder.java b/src/main/java/net/minecraft/server/Pathfinder.java -index 1c3a8043e735ec4605635efcfc5deb08a35ea1fd..bf2ac046eebd7f88fcb1d953f37952e791e6ea83 100644 ---- a/src/main/java/net/minecraft/server/Pathfinder.java -+++ b/src/main/java/net/minecraft/server/Pathfinder.java -@@ -26,7 +26,7 @@ public class Pathfinder { - } - - @Nullable -- public PathEntity a(ChunkCache chunkcache, EntityInsentient entityinsentient, Set set, float f, int i, float f1) { -+ public synchronized PathEntity a(ChunkCache chunkcache, EntityInsentient entityinsentient, Set set, float f, int i, float f1) { // Akarin - synchronized - this.d.a(); - this.c.a(chunkcache, entityinsentient); - PathPoint pathpoint = this.c.b(); -diff --git a/src/main/java/net/minecraft/server/PathfinderTurtle.java b/src/main/java/net/minecraft/server/PathfinderTurtle.java -index cea160885783e8666b616375eac44ba6d1880e1f..9598563b4f97500fd3fba0165813d564d9c96c4f 100644 ---- a/src/main/java/net/minecraft/server/PathfinderTurtle.java -+++ b/src/main/java/net/minecraft/server/PathfinderTurtle.java -@@ -148,7 +148,7 @@ public class PathfinderTurtle extends PathfinderNormal { - if (pathtype == PathType.OPEN) { - AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) i - d2 + 0.5D, (double) j + 0.001D, (double) k - d2 + 0.5D, (double) i + d2 + 0.5D, (double) ((float) j + this.b.getHeight()), (double) k + d2 + 0.5D); - -- if (!this.b.world.getCubes(this.b, axisalignedbb)) { -+ if (!this.a.getCubes(this.b, axisalignedbb)) { // Akarin - use chunk cache - return null; - } - -diff --git a/src/main/java/net/minecraft/server/PathfinderWater.java b/src/main/java/net/minecraft/server/PathfinderWater.java -index fba6692a1e537b90e20aa448567c0ad6db653332..d576edc8c30288e98aeda8f1cb561b22c6b37536 100644 ---- a/src/main/java/net/minecraft/server/PathfinderWater.java -+++ b/src/main/java/net/minecraft/server/PathfinderWater.java -@@ -63,7 +63,7 @@ public class PathfinderWater extends PathfinderAbstract { - @Override - protected PathPoint a(int i, int j, int k) { - PathPoint pathpoint = null; -- PathType pathtype = this.a(this.b.world, i, j, k); -+ PathType pathtype = this.a(this.a, i, j, k); // Akarin - use chunk cache - float f = this.b.a(pathtype); - - if (f >= 0.0F) { diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index 4b6363ef..a066c06a 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -1,21 +1,37 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Bud Gidiere -Date: Tue, 4 Aug 2020 19:15:55 -0500 +Date: Wed, 5 Aug 2020 08:01:22 -0500 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..ff2351b57e96c8c17701a0608c9f2596d0adae6e 100644 +index 841a8d2b392acdcef90592b841cbbcb2237c6901..1fbbc17f0aa2fc505b87840ffe91ff9a7b4a56fe 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 { +@@ -232,6 +232,8 @@ 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("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 )); new TimingsExport(listeners, parent, history).start(); +diff --git a/src/main/java/co/aikar/timings/TimingsExport.java.rej b/src/main/java/co/aikar/timings/TimingsExport.java.rej +deleted file mode 100644 +index 572780ca665c0fb254cc7431af3dd7759a94f26c..0000000000000000000000000000000000000000 +--- a/src/main/java/co/aikar/timings/TimingsExport.java.rej ++++ /dev/null +@@ -1,9 +0,0 @@ +-diff a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java (rejected hunks) +-@@ -230,6 +230,7 @@ public class TimingsExport extends Thread { +- pair("spigot", mapAsJSON(Bukkit.spigot().getSpigotConfig(), null)), +- pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)), +- pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)) +-+ , pair("rainforest", mapAsJSON(Bukkit.spigot().getRainforestConfig(), null)) // Rainforest +- )); +- +- new TimingsExport(listeners, parent, history).start(); diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java index dee9655b89d061ec8218ea2c54660c6003e8548f..253b73cfc597d4c7106d969be7b18c68166128ae 100644 --- a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java @@ -129,6 +145,33 @@ index d1152585c5f482e554966f965561626c78ac4d3a..00000000000000000000000000000000 - this.world.timings.countNaturalMobs.startTiming(); // Paper - timings - int l = this.chunkMapDistance.b(); - // Paper start - per player mob spawning +diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java +index 77b6e4dd34893f0959574f95078bc3fa6896e69c..7ac6ef0a125499de4b5e6a9ed80f963ba623b9f6 100644 +--- a/src/main/java/net/minecraft/server/DedicatedServer.java ++++ b/src/main/java/net/minecraft/server/DedicatedServer.java +@@ -181,6 +181,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + // Paper end + com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config + app.akarin.server.Config.init((java.io.File) options.valueOf("akarin-settings")); // Akarin - Server Config ++ com.proximyst.rainforest.RainforestConfig.init((java.io.File) options.valueOf("rainforest-settings")); // Rainforest + + this.setPVP(dedicatedserverproperties.pvp); + this.setAllowFlight(dedicatedserverproperties.allowFlight); +diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java.rej b/src/main/java/net/minecraft/server/DedicatedServer.java.rej +deleted file mode 100644 +index 4c2d5b3e080c925d687733ec40d4fb4b22552c96..0000000000000000000000000000000000000000 +--- a/src/main/java/net/minecraft/server/DedicatedServer.java.rej ++++ /dev/null +@@ -1,9 +0,0 @@ +-diff a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java (rejected hunks) +-@@ -170,6 +170,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +- com.destroystokyo.paper.PaperConfig.registerCommands(); +- com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now +- // Paper end +-+ com.proximyst.rainforest.RainforestConfig.init((java.io.File) options.valueOf("rainforest-settings")); // Rainforest +- +- this.setPVP(dedicatedserverproperties.pvp); +- this.setAllowFlight(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java index e19bb5ce5c32d9c08336f802fa9058603e23c6ab..d73ef98330c4ae643950b16341b3cde0d52928ce 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java @@ -527,31 +570,32 @@ index bada470cba41cce9beb9eb04227b42c1d489d731..00000000000000000000000000000000 - private int c; - private TileEntityShulkerBox.AnimationPhase i; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b32638165798a4b6022fc41e9c9ac8d5dac507a5..5111875cdb28b6958dec09215d4d4b8c8cbaad5a 100644 +index 409861c52461b7138eee3df75e43f0f02d2fcfed..742625adc828bb1d4afa9542895bd9e71a065c15 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -96,6 +96,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -97,6 +97,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config public final app.akarin.server.Config.WorldConfig akarinConfig; // Akarin - Server Config -+ public final us.minevict.papercut.PapercutConfig.WorldConfig papercutConfig; // Papercut + public final net.pl3x.purpur.PurpurWorldConfig purpurConfig; // Purpur + public final de.minebench.origami.OrigamiConfig.WorldConfig origamiConfig; // Origami - World Config ++ public final RainforestWorldConfig rainforestConfig; // Rainforest public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPosition lastPhysicsProblem; // Spigot -@@ -126,6 +129,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -127,6 +130,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this.paperConfig, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config this.akarinConfig = new app.akarin.server.Config.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Akarin - Server Config -+ this.papercutConfig = new us.minevict.papercut.PapercutConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Papercut + this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((WorldDataServer)worlddatamutable).getName())); // Purpur + this.origamiConfig = new de.minebench.origami.OrigamiConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Origami - World Config ++ this.rainforestConfig = new RainforestWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.paperConfig); // Rainforest ++ + this.generator = gen; this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit -@@ -636,6 +643,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -637,6 +645,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public void b(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {} @@ -559,16 +603,7 @@ index b32638165798a4b6022fc41e9c9ac8d5dac507a5..5111875cdb28b6958dec09215d4d4b8c public void applyPhysics(BlockPosition blockposition, Block block) { if (captureBlockStates) { return; } // Paper - Cancel all physics during placement this.a(blockposition.west(), block, blockposition); -@@ -645,7 +653,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - this.a(blockposition.north(), block, blockposition); - this.a(blockposition.south(), block, blockposition); - } -- -+ - public void a(BlockPosition blockposition, Block block, EnumDirection enumdirection) { - if (enumdirection != EnumDirection.WEST) { - this.a(blockposition.west(), block, blockposition); -@@ -673,6 +681,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -674,6 +683,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } @@ -792,36 +827,39 @@ index 120d0df27e76c9beef9f09e6cdc0972454fdd4ca..00000000000000000000000000000000 - } - diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d290bc1b8bea4fac9d4e14a1ccdf954055291e66..5bdde162b6f2aa81d136d82504ab5890e5262279 100644 +index d290bc1b8bea4fac9d4e14a1ccdf954055291e66..b8fc854c49adea606812cc84eb671e5a208792f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -842,6 +842,8 @@ public final class CraftServer implements Server { +@@ -842,6 +842,9 @@ public final class CraftServer implements Server { com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config app.akarin.server.Config.init((File) console.options.valueOf("akarin-settings")); // Akarin - Server Config + net.pl3x.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur + de.minebench.origami.OrigamiConfig.init((File) console.options.valueOf("origami-settings")); // Origami - Server Config ++ com.proximyst.rainforest.RainforestConfig.init((File) console.options.valueOf("rainforest-settings")); // Rainforest for (WorldServer world : console.getWorlds()) { world.worldDataServer.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -878,6 +880,9 @@ public final class CraftServer implements Server { +@@ -878,6 +881,9 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper world.tuinityConfig.init(); // Tuinity - Server Config world.akarinConfig.init(); // Akarin - Server Config -+ world.papercutConfig.init(); // Papercut ++ world.rainforestConfig.init(); // Rainforest + world.purpurConfig.init(); // Purpur + world.origamiConfig.init(); // Origami - World Config } Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper -@@ -2255,6 +2260,25 @@ public final class CraftServer implements Server { +@@ -2255,6 +2261,27 @@ public final class CraftServer implements Server { } // Akarin End - Server Config -+ // Papercut start - add config to timings report ++ // Rainforest start + @Override -+ public YamlConfiguration getPapercutConfig() { return us.minevict.papercut.PapercutConfig.config; } -+ // Papercut end - add config to timings report ++ public YamlConfiguration getRainforestConfig() { ++ return com.proximyst.rainforest.RainforestConfig.config; ++ } ++ // Rainforest end + + // Purpur start + @Override @@ -840,7 +878,7 @@ index d290bc1b8bea4fac9d4e14a1ccdf954055291e66..5bdde162b6f2aa81d136d82504ab5890 @Override public void restart() { org.spigotmc.RestartCommand.restart(); -@@ -2394,4 +2418,11 @@ public final class CraftServer implements Server { +@@ -2394,4 +2421,11 @@ public final class CraftServer implements Server { return mobGoals; } // Paper end @@ -854,22 +892,41 @@ index d290bc1b8bea4fac9d4e14a1ccdf954055291e66..5bdde162b6f2aa81d136d82504ab5890 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej b/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej deleted file mode 100644 -index b9d3fb83434a48b328cf0a0ae1ec29d93e87aa3e..0000000000000000000000000000000000000000 +index a3c8dfd94f78b49341e5f5aba1735651096c9d70..0000000000000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej +++ /dev/null -@@ -1,12 +0,0 @@ +@@ -1,31 +0,0 @@ -diff a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java (rejected hunks) --@@ -2409,5 +2409,10 @@ public final class CraftServer implements Server { -- public String getServerName() { -- return getProperties().serverName; -- } +-@@ -848,6 +848,7 @@ public final class CraftServer implements Server { +- +- org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot +- com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper +-+ com.proximyst.rainforest.RainforestConfig.init((File) console.options.valueOf("rainforest-settings")); // Rainforest +- for (WorldServer world : console.getWorlds()) { +- world.worldDataServer.setDifficulty(config.difficulty); +- world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); +-@@ -882,6 +883,7 @@ public final class CraftServer implements Server { +- } +- world.spigotConfig.init(); // Spigot +- world.paperConfig.init(); // Paper +-+ world.rainforestConfig.init(); // Rainforest +- } +- +- Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper +-@@ -2238,6 +2240,13 @@ public final class CraftServer implements Server { +- return com.destroystokyo.paper.PaperConfig.config; +- } +- +-+ // Rainforest start +-+ @Override +-+ public YamlConfiguration getRainforestConfig() { +-+ return com.proximyst.rainforest.RainforestConfig.config; +-+ } +-+ // Rainforest end -+ --+ @Override --+ public boolean isLagging() { --+ return getServer().lagging; --+ } -- // Purpur end -- } +- @Override +- public void restart() { +- org.spigotmc.RestartCommand.restart(); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java index 2d12ad72be927712d38d6fb6991f4af7a196fb9b..1a454f74b322605b1006da5be13760b13cc5f931 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java @@ -907,22 +964,22 @@ index 2d12ad72be927712d38d6fb6991f4af7a196fb9b..1a454f74b322605b1006da5be13760b1 .withRequiredArg() diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java.rej b/src/main/java/org/bukkit/craftbukkit/Main.java.rej deleted file mode 100644 -index 5d35899d1bedbb8643a601a2e1731a9bc66c7b61..0000000000000000000000000000000000000000 +index 916603085d652444027e4513b77293ece84a6c4f..0000000000000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/Main.java.rej +++ /dev/null @@ -1,16 +0,0 @@ -diff a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java (rejected hunks) --@@ -146,6 +146,14 @@ public class Main { +-@@ -139,6 +139,14 @@ public class Main { - .describedAs("Yml file"); -- /* Conctete End - Server Config */ +- // Paper end - --+ // Purpur Start --+ acceptsAll(asList("purpur", "purpur-settings"), "File for purpur settings") +-+ // Rainforest start +-+ acceptsAll(asList("rainforest", "rainforest-settings"), "File for rainforest settings") -+ .withRequiredArg() -+ .ofType(File.class) --+ .defaultsTo(new File("purpur.yml")) +-+ .defaultsTo(new File("rainforest.yml")) -+ .describedAs("Yml file"); --+ // Purpur end +-+ // Rainforest end -+ - // Paper start - acceptsAll(asList("server-name"), "Name of the server") diff --git a/patches/server/0003-Brandings.patch b/patches/server/0003-Brandings.patch index 5f471362..7b0225fd 100644 --- a/patches/server/0003-Brandings.patch +++ b/patches/server/0003-Brandings.patch @@ -57,7 +57,7 @@ index e17119d37577de42f8d52afcfdfee64c33996941..7cc402a4dfaa2a4bb123c897b05c0919 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 5bdde162b6f2aa81d136d82504ab5890e5262279..a4802d89f601ef38a1235fb162cec9aef94851ee 100644 +index b8fc854c49adea606812cc84eb671e5a208792f7..c80d67b7f5317908087ae286a53e2483c7b51df1 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 9235fc5e..05d5751f 100644 --- a/patches/server/0005-Add-getLastTickMs-api.patch +++ b/patches/server/0005-Add-getLastTickMs-api.patch @@ -28,10 +28,10 @@ index 7cc402a4dfaa2a4bb123c897b05c09190cbdd489..8e5284fd39be45055bec1609f6b8dd05 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 a4802d89f601ef38a1235fb162cec9aef94851ee..1263bba4e41b8f60ee52ea569159db9d52dfe0fb 100644 +index c80d67b7f5317908087ae286a53e2483c7b51df1..5d57619ae0289a48aa0c7cb57f146fe9fd96a6b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2425,4 +2425,11 @@ public final class CraftServer implements Server { +@@ -2428,4 +2428,11 @@ public final class CraftServer implements Server { return getServer().lagging; } // Purpur end 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 445b7e88..43e019d2 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 @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: tr7zw -Date: Tue, 4 Aug 2020 19:19:20 -0500 +From: Bud Gidiere +Date: Wed, 5 Aug 2020 08:05:10 -0500 Subject: [PATCH] Add config Yatopia command and basic settings @@ -357,7 +357,7 @@ index 0000000000000000000000000000000000000000..19bea6ee83d8b25da022662253328fb6 +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 77b6e4dd34893f0959574f95078bc3fa6896e69c..f8033f57cdf8528199203506a9db92be7b1351ac 100644 +index 7ac6ef0a125499de4b5e6a9ed80f963ba623b9f6..0170f25a694e757798ebd4a37c90b1c1e479d3bd 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -7,6 +7,7 @@ import com.mojang.authlib.GameProfileRepository; @@ -368,10 +368,11 @@ index 77b6e4dd34893f0959574f95078bc3fa6896e69c..f8033f57cdf8528199203506a9db92be import java.io.IOException; import java.io.InputStreamReader; import java.net.InetAddress; -@@ -182,6 +183,16 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -182,7 +183,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config app.akarin.server.Config.init((java.io.File) options.valueOf("akarin-settings")); // Akarin - Server Config - + com.proximyst.rainforest.RainforestConfig.init((java.io.File) options.valueOf("rainforest-settings")); // Rainforest +- + // Yatopia start + try { + dev.tr7zw.yatopia.YatopiaConfig.init(new File("yatopia.yml")); @@ -381,15 +382,14 @@ index 77b6e4dd34893f0959574f95078bc3fa6896e69c..f8033f57cdf8528199203506a9db92be + } + dev.tr7zw.yatopia.YatopiaConfig.registerCommands(); + // Yatopia end -+ this.setPVP(dedicatedserverproperties.pvp); this.setAllowFlight(dedicatedserverproperties.allowFlight); this.setResourcePack(dedicatedserverproperties.resourcePack, this.aY()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 98c5ecdf8b59670c872cb43593054f5a91d5e9fe..c77bb0b092cf4198edb6334520fd57042b4e171c 100644 +index 4581d00680f3a2043faadcd3db9d6398a6befb6e..19699d5276b7851c657b2af78c38edb568b0e5f9 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1035,7 +1035,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1036,7 +1036,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke VoxelShapeCollision voxelshapecollision = VoxelShapeCollision.a(this); VoxelShape voxelshape = this.world.getWorldBorder().c(); Stream stream = !this.world.getWorldBorder().isInBounds(axisalignedbb) ? Stream.empty() : Stream.of(voxelshape); // Paper diff --git a/patches/server/0022-Optimize-TileEntity-loading.patch b/patches/server/0022-Optimize-TileEntity-loading.patch index 0d680c73..492779e8 100644 --- a/patches/server/0022-Optimize-TileEntity-loading.patch +++ b/patches/server/0022-Optimize-TileEntity-loading.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: tr7zw -Date: Fri, 31 Jul 2020 22:04:17 -0500 +From: Bud Gidiere +Date: Wed, 5 Aug 2020 08:08:44 -0500 Subject: [PATCH] Optimize TileEntity loading @@ -32,7 +32,7 @@ index c2c19a6fbfa2a4aba21aa71789071c69a6246556..7dfd36e22a896ae440bbda6db0628c44 } \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5111875cdb28b6958dec09215d4d4b8c8cbaad5a..c0429637d72d95b4f52d9eb69606b4b15eb7d390 100644 +index 742625adc828bb1d4afa9542895bd9e71a065c15..b38e97a6aa207bca9e42c3d4247aa4a76e67581e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -44,15 +44,15 @@ index 5111875cdb28b6958dec09215d4d4b8c8cbaad5a..c0429637d72d95b4f52d9eb69606b4b1 import com.destroystokyo.paper.antixray.ChunkPacketBlockController; // Paper - Anti-Xray import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray; // Paper - Anti-Xray import com.destroystokyo.paper.event.server.ServerExceptionEvent; -@@ -10,6 +12,7 @@ import com.google.common.base.MoreObjects; - import com.google.common.collect.Lists; +@@ -11,6 +13,7 @@ import com.google.common.collect.Lists; import com.mojang.serialization.Codec; + import com.proximyst.rainforest.RainforestWorldConfig; import java.io.IOException; +import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; -@@ -42,8 +45,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -43,8 +46,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public static final ResourceKey THE_END = ResourceKey.a(IRegistry.ae, new MinecraftKey("the_end")); private static final EnumDirection[] a = EnumDirection.values(); //public final List tileEntityList = Lists.newArrayList(); // Paper - remove unused list diff --git a/patches/server/0026-Redirect-Configs.patch b/patches/server/0026-Redirect-Configs.patch index fa8f0caa..f939e85a 100644 --- a/patches/server/0026-Redirect-Configs.patch +++ b/patches/server/0026-Redirect-Configs.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: tr7zw -Date: Tue, 4 Aug 2020 19:26:12 -0500 +From: Bud Gidiere +Date: Wed, 5 Aug 2020 08:17:46 -0500 Subject: [PATCH] Redirect Configs @@ -40,6 +40,40 @@ index 1742facec843dd87897d62e4aab819835fab4a38..358ac3361c814b7cf5f9650a6a49c6ef } public static void load(final YamlConfiguration config) { +diff --git a/src/main/java/com/proximyst/rainforest/RainforestConfig.java b/src/main/java/com/proximyst/rainforest/RainforestConfig.java +index e698f8c8c3bfbd96465e7f7c3c3fee63ff0efd22..2ec97e5d82305872c999693793ce228a20669b43 100644 +--- a/src/main/java/com/proximyst/rainforest/RainforestConfig.java ++++ b/src/main/java/com/proximyst/rainforest/RainforestConfig.java +@@ -18,6 +18,8 @@ import org.bukkit.command.Command; + import org.bukkit.configuration.InvalidConfigurationException; + import org.bukkit.configuration.file.YamlConfiguration; + ++import dev.tr7zw.yatopia.YatopiaConfig; ++ + // Based on PaperConfig + public final class RainforestConfig { + private static File CONFIG_FILE; +@@ -37,8 +39,7 @@ public final class RainforestConfig { + private static boolean fatalError; + + public static void init(File configFile) { +- CONFIG_FILE = configFile; +- config = new YamlConfiguration(); ++ /*config = new YamlConfiguration(); + try { + config.load(CONFIG_FILE); + } catch (IOException ex) { +@@ -56,7 +57,9 @@ public final class RainforestConfig { + + version = getInt("config-version", 1); + set("config-version", 1); +- readConfig(RainforestConfig.class, null); ++ readConfig(RainforestConfig.class, null);*/ ++ config = YatopiaConfig.config; ++ CONFIG_FILE = YatopiaConfig.CONFIG_FILE; + } + + protected static void logError(String s) { diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java index bd107a376eaf660ba1ad61c035f8ed2d9d04749c..157a5c1be65b6b39787e5be11d1a8d5ea4aeb2b8 100644 --- a/src/main/java/de/minebench/origami/OrigamiConfig.java @@ -87,7 +121,7 @@ index 9f04500e167b8403c7487044a4ae03a6be61062a..fb3bf0731512b5517ca7ccb3240085b4 + "Yatopia contains many breaking changes and settings, so know what you are doing!\n" + "You have been warned!\n"; diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index f8033f57cdf8528199203506a9db92be7b1351ac..d6f7d31418459fedaf486f2eeaa0d7ec0151552c 100644 +index 0170f25a694e757798ebd4a37c90b1c1e479d3bd..73f4d52f24d042e287dab351edd4bfa4e22046b4 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -169,6 +169,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -106,11 +140,10 @@ index f8033f57cdf8528199203506a9db92be7b1351ac..d6f7d31418459fedaf486f2eeaa0d7ec // Purpur start try { net.pl3x.purpur.PurpurConfig.init((java.io.File) options.valueOf("purpur-settings")); -@@ -182,16 +191,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - // Paper end +@@ -183,14 +192,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config app.akarin.server.Config.init((java.io.File) options.valueOf("akarin-settings")); // Akarin - Server Config -- + com.proximyst.rainforest.RainforestConfig.init((java.io.File) options.valueOf("rainforest-settings")); // Rainforest - // Yatopia start - try { - dev.tr7zw.yatopia.YatopiaConfig.init(new File("yatopia.yml")); @@ -119,9 +152,8 @@ index f8033f57cdf8528199203506a9db92be7b1351ac..d6f7d31418459fedaf486f2eeaa0d7ec - return false; - } - dev.tr7zw.yatopia.YatopiaConfig.registerCommands(); -- // Yatopia end + de.minebench.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings")); - + // Yatopia end this.setPVP(dedicatedserverproperties.pvp); this.setAllowFlight(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java From 8a615979b33f59b73e94a7d4de19da8947ee9779 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Wed, 5 Aug 2020 08:36:44 -0500 Subject: [PATCH 11/25] fix --- patches/Rainforest/api.txt | 1 - patches/Rainforest/server.txt | 2 +- patches/server/0001-Yatopia-Server-Fixes.patch | 10 +++++----- patches/server/0003-Brandings.patch | 2 +- patches/server/0005-Add-getLastTickMs-api.patch | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/patches/Rainforest/api.txt b/patches/Rainforest/api.txt index 58ab0496..e69de29b 100644 --- a/patches/Rainforest/api.txt +++ b/patches/Rainforest/api.txt @@ -1 +0,0 @@ -Ban-certain-plugins \ No newline at end of file diff --git a/patches/Rainforest/server.txt b/patches/Rainforest/server.txt index fe82185a..ea632f07 100644 --- a/patches/Rainforest/server.txt +++ b/patches/Rainforest/server.txt @@ -1 +1 @@ -Add-Rainforest-config&Ban-certain-plugins&Apply-advancements-async&Add-more-dupe-options&Optimize-Pathfinder-Remove-Streams-Optimized-collect&Optimize-redstone-algorithm&Async-navigation \ No newline at end of file +Add-Rainforest-config&Apply-advancements-async&Add-more-dupe-options&Optimize-Pathfinder-Remove-Streams-Optimized-collect&Optimize-redstone-algorithm&Async-navigation \ No newline at end of file diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index a066c06a..f2fe2356 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -827,10 +827,10 @@ index 120d0df27e76c9beef9f09e6cdc0972454fdd4ca..00000000000000000000000000000000 - } - diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d290bc1b8bea4fac9d4e14a1ccdf954055291e66..b8fc854c49adea606812cc84eb671e5a208792f7 100644 +index afaa6ab4744190b134aeb616a1355cefd1333e37..157ac689deda71cddb8baea224e88be0f5180211 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -842,6 +842,9 @@ public final class CraftServer implements Server { +@@ -836,6 +836,9 @@ public final class CraftServer implements Server { com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config app.akarin.server.Config.init((File) console.options.valueOf("akarin-settings")); // Akarin - Server Config @@ -840,7 +840,7 @@ index d290bc1b8bea4fac9d4e14a1ccdf954055291e66..b8fc854c49adea606812cc84eb671e5a for (WorldServer world : console.getWorlds()) { world.worldDataServer.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -878,6 +881,9 @@ public final class CraftServer implements Server { +@@ -872,6 +875,9 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper world.tuinityConfig.init(); // Tuinity - Server Config world.akarinConfig.init(); // Akarin - Server Config @@ -850,7 +850,7 @@ index d290bc1b8bea4fac9d4e14a1ccdf954055291e66..b8fc854c49adea606812cc84eb671e5a } Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper -@@ -2255,6 +2261,27 @@ public final class CraftServer implements Server { +@@ -2249,6 +2255,27 @@ public final class CraftServer implements Server { } // Akarin End - Server Config @@ -878,7 +878,7 @@ index d290bc1b8bea4fac9d4e14a1ccdf954055291e66..b8fc854c49adea606812cc84eb671e5a @Override public void restart() { org.spigotmc.RestartCommand.restart(); -@@ -2394,4 +2421,11 @@ public final class CraftServer implements Server { +@@ -2388,4 +2415,11 @@ public final class CraftServer implements Server { return mobGoals; } // Paper end diff --git a/patches/server/0003-Brandings.patch b/patches/server/0003-Brandings.patch index 7b0225fd..dec1080b 100644 --- a/patches/server/0003-Brandings.patch +++ b/patches/server/0003-Brandings.patch @@ -57,7 +57,7 @@ index e17119d37577de42f8d52afcfdfee64c33996941..7cc402a4dfaa2a4bb123c897b05c0919 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 b8fc854c49adea606812cc84eb671e5a208792f7..c80d67b7f5317908087ae286a53e2483c7b51df1 100644 +index 157ac689deda71cddb8baea224e88be0f5180211..7bb9752edfc906ed968e839e073efd63834254fb 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 05d5751f..81ea60df 100644 --- a/patches/server/0005-Add-getLastTickMs-api.patch +++ b/patches/server/0005-Add-getLastTickMs-api.patch @@ -28,10 +28,10 @@ index 7cc402a4dfaa2a4bb123c897b05c09190cbdd489..8e5284fd39be45055bec1609f6b8dd05 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 c80d67b7f5317908087ae286a53e2483c7b51df1..5d57619ae0289a48aa0c7cb57f146fe9fd96a6b1 100644 +index 7bb9752edfc906ed968e839e073efd63834254fb..cdc1870b196c7fd9583dc70d856f484721ccfada 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2428,4 +2428,11 @@ public final class CraftServer implements Server { +@@ -2422,4 +2422,11 @@ public final class CraftServer implements Server { return getServer().lagging; } // Purpur end From 0e7bce1094a7f3495b12889c66fb83b316ab3298 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Wed, 5 Aug 2020 08:55:13 -0500 Subject: [PATCH 12/25] fix? --- Purpur | 2 +- patches/Rainforest/server.txt | 2 +- .../0006-Add-config-Yatopia-command-and-basic-settings.patch | 4 ++-- patches/server/0026-Redirect-Configs.patch | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Purpur b/Purpur index e486798b..9659c3a4 160000 --- a/Purpur +++ b/Purpur @@ -1 +1 @@ -Subproject commit e486798b7df7394bcdf8143b6c96cc0f8f8d4ec2 +Subproject commit 9659c3a4e5394194ec52a1d969087ab7bc7ee08e diff --git a/patches/Rainforest/server.txt b/patches/Rainforest/server.txt index ea632f07..cd046ff0 100644 --- a/patches/Rainforest/server.txt +++ b/patches/Rainforest/server.txt @@ -1 +1 @@ -Add-Rainforest-config&Apply-advancements-async&Add-more-dupe-options&Optimize-Pathfinder-Remove-Streams-Optimized-collect&Optimize-redstone-algorithm&Async-navigation \ No newline at end of file +Add-Rainforest-config&Apply-advancements-async&Optimize-Pathfinder-Remove-Streams-Optimized-collect&Optimize-redstone-algorithm&Async-navigation \ No newline at end of file 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 43e019d2..c7af8272 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 @@ -386,10 +386,10 @@ index 7ac6ef0a125499de4b5e6a9ed80f963ba623b9f6..0170f25a694e757798ebd4a37c90b1c1 this.setAllowFlight(dedicatedserverproperties.allowFlight); this.setResourcePack(dedicatedserverproperties.resourcePack, this.aY()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4581d00680f3a2043faadcd3db9d6398a6befb6e..19699d5276b7851c657b2af78c38edb568b0e5f9 100644 +index 98c5ecdf8b59670c872cb43593054f5a91d5e9fe..c77bb0b092cf4198edb6334520fd57042b4e171c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1036,7 +1036,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1035,7 +1035,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke VoxelShapeCollision voxelshapecollision = VoxelShapeCollision.a(this); VoxelShape voxelshape = this.world.getWorldBorder().c(); Stream stream = !this.world.getWorldBorder().isInBounds(axisalignedbb) ? Stream.empty() : Stream.of(voxelshape); // Paper diff --git a/patches/server/0026-Redirect-Configs.patch b/patches/server/0026-Redirect-Configs.patch index f939e85a..33de6260 100644 --- a/patches/server/0026-Redirect-Configs.patch +++ b/patches/server/0026-Redirect-Configs.patch @@ -41,7 +41,7 @@ index 1742facec843dd87897d62e4aab819835fab4a38..358ac3361c814b7cf5f9650a6a49c6ef public static void load(final YamlConfiguration config) { diff --git a/src/main/java/com/proximyst/rainforest/RainforestConfig.java b/src/main/java/com/proximyst/rainforest/RainforestConfig.java -index e698f8c8c3bfbd96465e7f7c3c3fee63ff0efd22..2ec97e5d82305872c999693793ce228a20669b43 100644 +index 0d854bda9611b45d78815f9fe9cafb8901de210f..04f5751f7972ed04f97c3f911277a30f14344801 100644 --- a/src/main/java/com/proximyst/rainforest/RainforestConfig.java +++ b/src/main/java/com/proximyst/rainforest/RainforestConfig.java @@ -18,6 +18,8 @@ import org.bukkit.command.Command; From c604b67764bfb419cdf030d38c91d9d7b9b2d4f4 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Wed, 5 Aug 2020 10:54:11 -0500 Subject: [PATCH 13/25] fix 2? --- patches/Origami/api.txt | 0 patches/Rainforest/api.txt | 0 scripts/applyUpstream.sh | 2 +- scripts/getUpstream.sh | 60 ++++++++++++++++++++------------------ 4 files changed, 32 insertions(+), 30 deletions(-) delete mode 100644 patches/Origami/api.txt delete mode 100644 patches/Rainforest/api.txt diff --git a/patches/Origami/api.txt b/patches/Origami/api.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/patches/Rainforest/api.txt b/patches/Rainforest/api.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/scripts/applyUpstream.sh b/scripts/applyUpstream.sh index 51c92ecb..eb1a93e2 100755 --- a/scripts/applyUpstream.sh +++ b/scripts/applyUpstream.sh @@ -14,7 +14,7 @@ git config commit.gpgsign false cd $1/patches/$2 for D in ${searchtxts[@]}; do echo "IMPORTANT:!!! $D" - if [ true ]; then + if [ -d $1/patches/$2/$dnoslashlower ]; then echo $D dnoslash=$D echo "DnoS: $dnoslash" diff --git a/scripts/getUpstream.sh b/scripts/getUpstream.sh index 690e8d5d..f964b36c 100755 --- a/scripts/getUpstream.sh +++ b/scripts/getUpstream.sh @@ -12,38 +12,40 @@ for D in */; do if [[ $dnoslash != "api" ]]; then echo "Found $dnoslash directory!" for file in ${searchtxts[@]}; 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 - echo "Found $patch in $file!" - echo $1/$dnoslash/patches/$file - for filename in $1/$dnoslash/patches/$file/*.patch; do - filenamend="${filename##*/}" - filenamens=${filenamend%/*} - #filenameedited=${filenamens%.*} # retain the part before the period - filenameedited=${filenamens::-6} - #echo $filenameedited - filenameedited=${filenameedited:5} # retain the part after the frist slash - if [[ $filenameedited == $patch ]]; then - echo "Found Matching file!" - if [[ $i == 0 ]]; then - echo "Making $file dir in $dnoslash patch dir" - mkdir $1/patches/$dnoslash/$file + if [ -f "$1/patches/$dnoslash/$file.txt" ]; then + 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 + echo "Found $patch in $file!" + echo $1/$dnoslash/patches/$file + for filename in $1/$dnoslash/patches/$file/*.patch; do + filenamend="${filename##*/}" + filenamens=${filenamend%/*} + #filenameedited=${filenamens%.*} # retain the part before the period + filenameedited=${filenamens::-6} + #echo $filenameedited + filenameedited=${filenameedited:5} # retain the part after the frist slash + if [[ $filenameedited == $patch ]]; then + echo "Found Matching file!" + if [[ $i == 0 ]]; then + echo "Making $file dir in $dnoslash patch dir" + mkdir $1/patches/$dnoslash/$file + fi + ((i=i+1)) + printf -v num "%04d" $i + echo "Making ${num}-${patch}.patch file for Yatopia" + cp $1/$dnoslash/patches/$file/$filenamens $1/patches/$dnoslash/$file/"${num}-${patch}.patch" fi - ((i=i+1)) - printf -v num "%04d" $i - echo "Making ${num}-${patch}.patch file for Yatopia" - cp $1/$dnoslash/patches/$file/$filenamens $1/patches/$dnoslash/$file/"${num}-${patch}.patch" - fi + done done + IFS=' ' done - IFS=' ' - done - $1/scripts/applyUpstream.sh $1 $dnoslash || exit 1 + $1/scripts/applyUpstream.sh $1 $dnoslash || exit 1 + fi fi fi fi From 99029671ab1b4633f78b05c4b72deb8281feaf4c Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Wed, 5 Aug 2020 14:38:36 -0500 Subject: [PATCH 14/25] Fix Build + Fix Shulkers --- .../server/0001-Yatopia-Server-Fixes.patch | 229 +++++++++++++++--- patches/server/0003-Brandings.patch | 2 +- .../0004-Add-GameProfileLookupEvent.patch | 9 +- .../server/0005-Add-getLastTickMs-api.patch | 2 +- ...g-Yatopia-command-and-basic-settings.patch | 6 +- ...only-players-to-have-collisions-with.patch | 2 +- .../0010-Player-saving-async-FileIO.patch | 2 +- patches/server/0014-lithium-enum_values.patch | 2 +- .../0022-Optimize-TileEntity-loading.patch | 4 +- ...ted-Cache-hashcode-for-BlockPosition.patch | 39 +-- patches/server/0026-Redirect-Configs.patch | 2 +- scripts/getUpstream.sh | 6 +- 12 files changed, 240 insertions(+), 65 deletions(-) diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index f2fe2356..402f7321 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Bud Gidiere -Date: Wed, 5 Aug 2020 08:01:22 -0500 +Date: Wed, 5 Aug 2020 14:21:05 -0500 Subject: [PATCH] Yatopia Server Fixes @@ -32,6 +32,67 @@ index 572780ca665c0fb254cc7431af3dd7759a94f26c..00000000000000000000000000000000 - )); - - new TimingsExport(listeners, parent, history).start(); +diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java +index f81bd67a323f2e72bdad76c52016993a0bf88307..415be72e83e0638bee1dd7e03807194554e6e08c 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java ++++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java +@@ -439,18 +439,18 @@ public class PaperCommand extends Command { + ChunkProviderServer chunkProviderServer = world.getChunkProvider(); + + Collection entities = world.entitiesById.values(); +- entities.forEach(e -> { +- MinecraftKey key = e.getMinecraftKey(); +- if (e.shouldBeRemoved) return; // Paper ++ for (Entity entity : entities) { ++ MinecraftKey key = entity.getMinecraftKey(); ++ if (entity.shouldBeRemoved) continue; + + MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); +- ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.chunkX, e.chunkZ); ++ ChunkCoordIntPair chunk = new ChunkCoordIntPair(entity.getChunkX(), entity.getChunkZ()); + info.left++; + info.right.put(chunk, info.right.getOrDefault(chunk, 0) + 1); +- if (!chunkProviderServer.isInEntityTickingChunk(e)) { ++ if (!chunkProviderServer.isInEntityTickingChunk(entity)) { + nonEntityTicking.merge(key, Integer.valueOf(1), Integer::sum); + } +- }); ++ } + + if (names.size() == 1) { + MinecraftKey name = names.iterator().next(); +diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java.rej b/src/main/java/com/destroystokyo/paper/PaperCommand.java.rej +deleted file mode 100644 +index 8f31dba6a29514aad6e74e265bf000014cd1e3c3..0000000000000000000000000000000000000000 +--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java.rej ++++ /dev/null +@@ -1,26 +0,0 @@ +-diff a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java (rejected hunks) +-@@ -429,18 +439,18 @@ public class PaperCommand extends Command { +- ChunkProviderServer chunkProviderServer = world.getChunkProvider(); +- +- Collection entities = world.entitiesById.values(); +-- entities.forEach(e -> { +-- MinecraftKey key = e.getMinecraftKey(); +-- if (e.shouldBeRemoved) return; // Paper +-+ for (Entity entity : entities) { +-+ MinecraftKey key = entity.getMinecraftKey(); +-+ if (entity.shouldBeRemoved) continue; +- +- MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); +-- ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); +-+ ChunkCoordIntPair chunk = new ChunkCoordIntPair(entity.getChunkX(), entity.getChunkZ()); +- info.left++; +- info.right.put(chunk, info.right.getOrDefault(chunk, 0) + 1); +-- if (!chunkProviderServer.isInEntityTickingChunk(e)) { +-+ if (!chunkProviderServer.isInEntityTickingChunk(entity)) { +- nonEntityTicking.merge(key, Integer.valueOf(1), Integer::sum); +- } +-- }); +-+ } +- +- if (names.size() == 1) { +- MinecraftKey name = names.iterator().next(); diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java index dee9655b89d061ec8218ea2c54660c6003e8548f..253b73cfc597d4c7106d969be7b18c68166128ae 100644 --- a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java @@ -173,7 +234,7 @@ index 4c2d5b3e080c925d687733ec40d4fb4b22552c96..00000000000000000000000000000000 - this.setPVP(dedicatedserverproperties.pvp); - this.setAllowFlight(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index e19bb5ce5c32d9c08336f802fa9058603e23c6ab..d73ef98330c4ae643950b16341b3cde0d52928ce 100644 +index 83e232deaeb78f0c97bce42d67fc220e8fb88368..bbcded1e80a4b0e4618affd77bcaa6e41589b9fe 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -758,7 +758,11 @@ public abstract class EntityInsentient extends EntityLiving { @@ -287,7 +348,7 @@ index 74d10212e547adf96762155adb03c0158df00a16..00000000000000000000000000000000 - ran = true; - } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index de1845b3585d7cf96bf26f5859e1cb4820ad2d56..e17119d37577de42f8d52afcfdfee64c33996941 100644 +index ff1692c131b43f217de1fb6657a8274136a3dd08..5960ed2e91008b363dad900c72064055413eafd9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1001,7 +1001,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> 4; + pos.setValues(player.locX(), 0, player.locZ()); + double twoThirdModifier = 2D / 3D; +- MCUtil.getSpiralOutChunks(pos, Math.min(6, viewDistance)).forEach(coord -> { +- if (shouldSkipPrioritization(coord)) return; ++ for (ChunkCoordIntPair coordIntPair : MCUtil.getSpiralOutChunks(pos, Math.min(6, viewDistance))) { ++ if (shouldSkipPrioritization(coordIntPair)) continue; + +- double dist = MCUtil.distance(playerChunkX, 0, playerChunkZ, coord.x, 0, coord.z); ++ double dist = MCUtil.distance(playerChunkX, 0, playerChunkZ, coordIntPair.x, 0, coordIntPair.z); + // Prioritize immediate + if (dist <= 4 * 4) { +- updateChunkPriorityMap(priorities, coord.pair(), (int) (27 - Math.sqrt(dist))); +- return; ++ updateChunkPriorityMap(priorities, coordIntPair.pair(), (int) (27 - Math.sqrt(dist))); ++ continue; + } + + // Prioritize nearby chunks +- updateChunkPriorityMap(priorities, coord.pair(), (int) (20 - Math.sqrt(dist) * twoThirdModifier)); +- }); ++ updateChunkPriorityMap(priorities, coordIntPair.pair(), (int) (20 - Math.sqrt(dist) * twoThirdModifier)); ++ } + + // Prioritize Frustum near 3 + ChunkCoordIntPair front3 = player.getChunkInFront(3); + pos.setValues(front3.x << 4, 0, front3.z << 4); +- MCUtil.getSpiralOutChunks(pos, Math.min(5, viewDistance)).forEach(coord -> { +- if (shouldSkipPrioritization(coord)) return; ++ for (ChunkCoordIntPair chunkCoordIntPair : MCUtil.getSpiralOutChunks(pos, Math.min(5, viewDistance))) { ++ if (shouldSkipPrioritization(chunkCoordIntPair)) continue; + +- double dist = MCUtil.distance(playerChunkX, 0, playerChunkZ, coord.x, 0, coord.z); +- updateChunkPriorityMap(priorities, coord.pair(), (int) (25 - Math.sqrt(dist) * twoThirdModifier)); +- }); ++ double dist = MCUtil.distance(playerChunkX, 0, playerChunkZ, chunkCoordIntPair.x, 0, chunkCoordIntPair.z); ++ updateChunkPriorityMap(priorities, chunkCoordIntPair.pair(), (int) (25 - Math.sqrt(dist) * twoThirdModifier)); ++ } + + // Prioritize Frustum near 5 + if (viewDistance > 4) { + ChunkCoordIntPair front5 = player.getChunkInFront(5); + pos.setValues(front5.x << 4, 0, front5.z << 4); +- MCUtil.getSpiralOutChunks(pos, 4).forEach(coord -> { +- if (shouldSkipPrioritization(coord)) return; ++ for (ChunkCoordIntPair coord : MCUtil.getSpiralOutChunks(pos, 3)) { ++ if (shouldSkipPrioritization(coord)) continue; + + double dist = MCUtil.distance(playerChunkX, 0, playerChunkZ, coord.x, 0, coord.z); + updateChunkPriorityMap(priorities, coord.pair(), (int) (25 - Math.sqrt(dist) * twoThirdModifier)); +- }); ++ } + } + + // Prioritize Frustum far 7 +@@ -1168,7 +1168,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } this.getVillagePlace().loadInData(chunkcoordintpair, chunkHolder.poiData); @@ -439,11 +556,83 @@ index 3da442fca229f4abae5c1f7725e60286140061b4..038f4e85e7a7e612d72f21f530f9160d if (chunkHolder.protoChunk != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings // Paper - chunk is created async diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java.rej b/src/main/java/net/minecraft/server/PlayerChunkMap.java.rej deleted file mode 100644 -index 06b502a43f0e89b1b2cef8c3adb0a4229511846f..0000000000000000000000000000000000000000 +index 759862aba781ec6f1ae0c9a76c4ab6352d603a4c..0000000000000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java.rej +++ /dev/null -@@ -1,12 +0,0 @@ +@@ -1,84 +0,0 @@ -diff a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java (rejected hunks) +-@@ -480,53 +471,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +- double playerChunkZ = MathHelper.floor(player.locZ()) >> 4; +- pos.setValues(player.locX(), 0, player.locZ()); +- double twoThirdModifier = 2D / 3D; +-- MCUtil.getSpiralOutChunks(pos, Math.min(6, viewDistance)).forEach(coord -> { +-- if (shouldSkipPrioritization(coord)) return; +-+ for (ChunkCoordIntPair coordIntPair : MCUtil.getSpiralOutChunks(pos, Math.min(6, viewDistance))) { +-+ if (shouldSkipPrioritization(coordIntPair)) continue; +- +-- double dist = MCUtil.distance(playerChunkX, 0, playerChunkZ, coord.x, 0, coord.z); +-+ double dist = MCUtil.distance(playerChunkX, 0, playerChunkZ, coordIntPair.x, 0, coordIntPair.z); +- // Prioritize immediate +- if (dist <= 4 * 4) { +-- updateChunkPriorityMap(priorities, coord.pair(), (int) (27 - Math.sqrt(dist))); +-- return; +-+ updateChunkPriorityMap(priorities, coordIntPair.pair(), (int) (27 - Math.sqrt(dist))); +-+ continue; +- } +- +- // Prioritize nearby chunks +-- updateChunkPriorityMap(priorities, coord.pair(), (int) (20 - Math.sqrt(dist) * twoThirdModifier)); +-- }); +-+ updateChunkPriorityMap(priorities, coordIntPair.pair(), (int) (20 - Math.sqrt(dist) * twoThirdModifier)); +-+ } +- +- // Prioritize Frustum near 3 +- ChunkCoordIntPair front3 = player.getChunkInFront(3); +- pos.setValues(front3.x << 4, 0, front3.z << 4); +-- MCUtil.getSpiralOutChunks(pos, Math.min(5, viewDistance)).forEach(coord -> { +-- if (shouldSkipPrioritization(coord)) return; +-+ for (ChunkCoordIntPair chunkCoordIntPair : MCUtil.getSpiralOutChunks(pos, Math.min(5, viewDistance))) { +-+ if (shouldSkipPrioritization(chunkCoordIntPair)) continue; +- +-- double dist = MCUtil.distance(playerChunkX, 0, playerChunkZ, coord.x, 0, coord.z); +-- updateChunkPriorityMap(priorities, coord.pair(), (int) (25 - Math.sqrt(dist) * twoThirdModifier)); +-- }); +-+ double dist = MCUtil.distance(playerChunkX, 0, playerChunkZ, chunkCoordIntPair.x, 0, chunkCoordIntPair.z); +-+ updateChunkPriorityMap(priorities, chunkCoordIntPair.pair(), (int) (25 - Math.sqrt(dist) * twoThirdModifier)); +-+ } +- +- // Prioritize Frustum near 5 +- if (viewDistance > 4) { +- ChunkCoordIntPair front5 = player.getChunkInFront(5); +- pos.setValues(front5.x << 4, 0, front5.z << 4); +-- MCUtil.getSpiralOutChunks(pos, 4).forEach(coord -> { +-- if (shouldSkipPrioritization(coord)) return; +-+ for (ChunkCoordIntPair coord : MCUtil.getSpiralOutChunks(pos, 4)) { +-+ if (shouldSkipPrioritization(coord)) continue; +- +- double dist = MCUtil.distance(playerChunkX, 0, playerChunkZ, coord.x, 0, coord.z); +- updateChunkPriorityMap(priorities, coord.pair(), (int) (25 - Math.sqrt(dist) * twoThirdModifier)); +-- }); +-+ } +- } +- +- // Prioritize Frustum far 7 +- if (viewDistance > 6) { +- ChunkCoordIntPair front7 = player.getChunkInFront(7); +- pos.setValues(front7.x << 4, 0, front7.z << 4); +-- MCUtil.getSpiralOutChunks(pos, 3).forEach(coord -> { +-+ for (ChunkCoordIntPair coord : MCUtil.getSpiralOutChunks(pos, 3)) { +- if (shouldSkipPrioritization(coord)) { +-- return; +-+ continue; +- } +- double dist = MCUtil.distance(playerChunkX, 0, playerChunkZ, coord.x, 0, coord.z); +- updateChunkPriorityMap(priorities, coord.pair(), (int) (25 - Math.sqrt(dist) * twoThirdModifier)); +-- }); +-+ } +- } +- +- pos.close(); -@@ -1122,7 +1131,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - if (ioThrowable != null) { - com.destroystokyo.paper.util.SneakyThrow.sneaky(ioThrowable); @@ -517,30 +706,6 @@ index cc8866ec1ccbc131e8491c50eda4f85590bb667b..00000000000000000000000000000000 - return true; - } - } -diff --git a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java -index 7fe085e48b6ad625a510edf33b112bef24f7d7ad..9459efde54d507231b4aacb7cba14e9905ebb4d7 100644 ---- a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java -+++ b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java -@@ -11,7 +11,18 @@ import org.bukkit.entity.HumanEntity; - - public class TileEntityShulkerBox extends TileEntityLootable implements IWorldInventory, ITickable { - -- private static final int[] a = IntStream.range(0, 27).toArray(); -+ private static final int[] a; -+ -+ static { -+ int[] arr = new int[10]; -+ int count = 0; -+ for (int i1 = 0; i1 < 27; i1++) { -+ if (arr.length == count) arr = Arrays.copyOf(arr, count * 2); -+ arr[count++] = i1; -+ } -+ arr = Arrays.copyOfRange(arr, 0, count); -+ a = arr; -+ } - private NonNullList contents; - public int c; // PAIL private -> public, rename viewerCount - private TileEntityShulkerBox.AnimationPhase i; diff --git a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java.rej b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java.rej deleted file mode 100644 index bada470cba41cce9beb9eb04227b42c1d489d731..0000000000000000000000000000000000000000 @@ -570,7 +735,7 @@ index bada470cba41cce9beb9eb04227b42c1d489d731..00000000000000000000000000000000 - private int c; - private TileEntityShulkerBox.AnimationPhase i; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 409861c52461b7138eee3df75e43f0f02d2fcfed..742625adc828bb1d4afa9542895bd9e71a065c15 100644 +index 0890bca50858ec8d544be2e1ff4ac2da73c7d830..44af511da96b265a8441052cc87e356e630699a6 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -97,6 +97,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/patches/server/0003-Brandings.patch b/patches/server/0003-Brandings.patch index dec1080b..8d509a1a 100644 --- a/patches/server/0003-Brandings.patch +++ b/patches/server/0003-Brandings.patch @@ -44,7 +44,7 @@ index 0000000000000000000000000000000000000000..523e3b50d535e91afe8b14fdb53966da +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e17119d37577de42f8d52afcfdfee64c33996941..7cc402a4dfaa2a4bb123c897b05c09190cbdd489 100644 +index 5960ed2e91008b363dad900c72064055413eafd9..ee6a2dbc1306871d9ba621f199054befb09744c2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1515,7 +1515,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant -Date: Wed, 26 Feb 2020 22:22:02 +0100 +Date: Wed, 5 Aug 2020 14:25:50 -0500 Subject: [PATCH] Add GameProfileLookupEvent diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java -index 8a18dfcda3c785e9c8bd134f88515e077dbef7dc..f0ccfce3bc7a2308a479fecd6d751bcaa88a0861 100644 +index dd96dd296d042c0625e527b50b3acfc19a2bf43e..b4a032cada15cdfbcae4f37cd0e36f1aee3cefbb 100644 --- a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java +++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java @@ -5,9 +5,13 @@ import com.google.common.base.Charsets; @@ -22,11 +22,10 @@ index 8a18dfcda3c785e9c8bd134f88515e077dbef7dc..f0ccfce3bc7a2308a479fecd6d751bca import org.bukkit.craftbukkit.entity.CraftPlayer; import org.spigotmc.SpigotConfig; -@@ -185,13 +189,21 @@ public class CraftPlayerProfile implements PlayerProfile { - +@@ -186,12 +190,21 @@ public class CraftPlayerProfile implements PlayerProfile { boolean isCompleteFromCache = this.completeFromCache(true, onlineMode); if (onlineMode && (!isCompleteFromCache || textures && !hasTextures())) { -- GameProfile result = server.getSessionService().fillProfileProperties(profile, true); + GameProfile result = server.getMinecraftSessionService().fillProfileProperties(profile, true); - if (result != null) { - copyProfileProperties(result, this.profile, true); - } diff --git a/patches/server/0005-Add-getLastTickMs-api.patch b/patches/server/0005-Add-getLastTickMs-api.patch index 81ea60df..6ffd3343 100644 --- a/patches/server/0005-Add-getLastTickMs-api.patch +++ b/patches/server/0005-Add-getLastTickMs-api.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add getLastTickMs api diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7cc402a4dfaa2a4bb123c897b05c09190cbdd489..8e5284fd39be45055bec1609f6b8dd05229e6b35 100644 +index ee6a2dbc1306871d9ba621f199054befb09744c2..26ee6e9219059c9f7175148e934d2adec2b336a0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -930,6 +930,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant +From: tr7zw Date: Wed, 5 Aug 2020 08:05:10 -0500 Subject: [PATCH] Add config Yatopia command and basic settings @@ -386,7 +386,7 @@ index 7ac6ef0a125499de4b5e6a9ed80f963ba623b9f6..0170f25a694e757798ebd4a37c90b1c1 this.setAllowFlight(dedicatedserverproperties.allowFlight); this.setResourcePack(dedicatedserverproperties.resourcePack, this.aY()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 98c5ecdf8b59670c872cb43593054f5a91d5e9fe..c77bb0b092cf4198edb6334520fd57042b4e171c 100644 +index dd093e3e624158ff87bad59785ed2496f161f64c..ec84bc4dceff76fd2f823a6a9548fdf180291584 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1035,7 +1035,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -399,7 +399,7 @@ index 98c5ecdf8b59670c872cb43593054f5a91d5e9fe..c77bb0b092cf4198edb6334520fd5704 }); StreamAccumulator streamaccumulator = new StreamAccumulator<>(Stream.concat(stream1, stream)); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index c52afcb107c4d444d9553ed186899adf0bc248ba..a1cbdd38925e2e6e530c8ec4d319a9ea34a542f8 100644 +index 0c862b4604540545206ebe6e08d5d79484414279..da08249ee1c61b7c77b79f491cb8482865ecba3c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -266,6 +266,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/server/0007-Add-option-for-only-players-to-have-collisions-with.patch b/patches/server/0007-Add-option-for-only-players-to-have-collisions-with.patch index ad2711ac..6074155a 100644 --- a/patches/server/0007-Add-option-for-only-players-to-have-collisions-with.patch +++ b/patches/server/0007-Add-option-for-only-players-to-have-collisions-with.patch @@ -19,7 +19,7 @@ index 19bea6ee83d8b25da022662253328fb6384f40d9..2cee6e02a7dcbacb5f002f9c5917a2e2 } \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index a1cbdd38925e2e6e530c8ec4d319a9ea34a542f8..2d0e7de93edaea2bf1791b8d0192d2e3eece739c 100644 +index da08249ee1c61b7c77b79f491cb8482865ecba3c..2edebae8a1127c9214c7c2974700db9f207fa05f 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2844,40 +2844,46 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/server/0010-Player-saving-async-FileIO.patch b/patches/server/0010-Player-saving-async-FileIO.patch index 818547d2..665825d6 100644 --- a/patches/server/0010-Player-saving-async-FileIO.patch +++ b/patches/server/0010-Player-saving-async-FileIO.patch @@ -138,7 +138,7 @@ index cf539c98073b475eb5b769c8cc11d48a7e6d58f1..5442c28c56f933c63bd611f579d03928 } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 2cada09ced1660526e9c112c2c8d92bbf9d6ea98..767ecf5fe63d86522ef8de4c0b4cda2803a5145c 100644 +index e411f6280d07e3f6a953e1fcaffaaa49f85dc7cc..3966bf7160ef5a7ec6944397ffbf51f583875860 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -700,11 +700,23 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/patches/server/0014-lithium-enum_values.patch b/patches/server/0014-lithium-enum_values.patch index e47cb930..29f9cffa 100644 --- a/patches/server/0014-lithium-enum_values.patch +++ b/patches/server/0014-lithium-enum_values.patch @@ -37,7 +37,7 @@ index 4f10ca5ada741b4f5ef941bb9d92a2fa6a7c44ff..3d6f8d948d293ca57bf158bcd1f58e28 if (enumdirection2 != EnumDirection.DOWN && world.isBlockFacePowered(blockposition1.shift(enumdirection2), enumdirection2)) { return true; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 2d0e7de93edaea2bf1791b8d0192d2e3eece739c..b664652df0035f89397d792f0a19f4c40b94b069 100644 +index 2edebae8a1127c9214c7c2974700db9f207fa05f..ce96eea39425792eda9aacd656d2bffda8bc3803 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2567,11 +2567,14 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/server/0022-Optimize-TileEntity-loading.patch b/patches/server/0022-Optimize-TileEntity-loading.patch index 492779e8..cdb03cff 100644 --- a/patches/server/0022-Optimize-TileEntity-loading.patch +++ b/patches/server/0022-Optimize-TileEntity-loading.patch @@ -1,5 +1,5 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Bud Gidiere +From: tr7zw Date: Wed, 5 Aug 2020 08:08:44 -0500 Subject: [PATCH] Optimize TileEntity loading @@ -32,7 +32,7 @@ index c2c19a6fbfa2a4aba21aa71789071c69a6246556..7dfd36e22a896ae440bbda6db0628c44 } \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 742625adc828bb1d4afa9542895bd9e71a065c15..b38e97a6aa207bca9e42c3d4247aa4a76e67581e 100644 +index 44af511da96b265a8441052cc87e356e630699a6..847a245606c5bb98a8821a9dcd677d7eb2e81e45 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -2,6 +2,8 @@ package net.minecraft.server; diff --git a/patches/server/0025-Akarin-updated-Cache-hashcode-for-BlockPosition.patch b/patches/server/0025-Akarin-updated-Cache-hashcode-for-BlockPosition.patch index 5b56285d..f4450a74 100644 --- a/patches/server/0025-Akarin-updated-Cache-hashcode-for-BlockPosition.patch +++ b/patches/server/0025-Akarin-updated-Cache-hashcode-for-BlockPosition.patch @@ -1,11 +1,11 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Sotr -Date: Fri, 31 Jul 2020 22:31:08 -0500 +From: Bud Gidiere +Date: Wed, 5 Aug 2020 14:33:51 -0500 Subject: [PATCH] Akarin updated Cache hashcode for BlockPosition diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index dab89b0c69ddff24d37cee06107bdc464012c6bb..1e0acca45d0c8f7873176a46018b38eba02aa667 100644 +index e69b7dbc7a954374f9e2374ffe7faebfed2b0644..531bad98fecee11fd149e15974dfd58eb3acc6bb 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java @@ -28,6 +28,7 @@ public class BaseBlockPosition implements Comparable { @@ -40,7 +40,7 @@ index dab89b0c69ddff24d37cee06107bdc464012c6bb..1e0acca45d0c8f7873176a46018b38eb public int compareTo(BaseBlockPosition baseblockposition) { return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY(); diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 7ff4948a47be03c65c162ca04b2338cdcdafe7c4..14a626f98fb1faf38cf3d3e9d0bc79baf14559ac 100644 +index c77f71b6de87757900b3734feda819754e9408b1..ba4811d2018a4898a72d3654c9e75782ef69288b 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -438,7 +438,9 @@ public class BlockPosition extends BaseBlockPosition { @@ -54,23 +54,34 @@ index 7ff4948a47be03c65c162ca04b2338cdcdafe7c4..14a626f98fb1faf38cf3d3e9d0bc79ba } public BlockPosition.MutableBlockPosition a(EnumDirection.EnumAxis enumdirection_enumaxis, int i, int j) { -@@ -469,16 +471,19 @@ public class BlockPosition extends BaseBlockPosition { - // Tuinity - moved up - public final void o(int i) { // Tuinity +@@ -458,24 +460,30 @@ public class BlockPosition extends BaseBlockPosition { + // only expose set on the mutable blockpos + public final void setX(int value) { + ((BaseBlockPosition)this).a = value; ++ this.recalcHashCode(); + } + public final void setY(int value) { + ((BaseBlockPosition)this).b = value; ++ this.recalcHashCode(); + } + public final void setZ(int value) { + ((BaseBlockPosition)this).e = value; ++ this.recalcHashCode(); + } + + public final void o(int i) { ((BaseBlockPosition)this).a = i; // need cast thanks to name conflict + this.recalcHashCode(); } - // Tuinity - moved up - public final void p(int i) { // Tuinity - ((BaseBlockPosition)this).b = i; // Tuinity + public final void p(int i) { + ((BaseBlockPosition)this).b = i; + this.recalcHashCode(); } - // Tuinity - moved up - public final void q(int i) { // Tuinity - ((BaseBlockPosition)this).e = i; // Tuinity + public final void q(int i) { + ((BaseBlockPosition)this).e = i; + this.recalcHashCode(); } + // Tuinity end - @Override diff --git a/patches/server/0026-Redirect-Configs.patch b/patches/server/0026-Redirect-Configs.patch index 33de6260..b948147e 100644 --- a/patches/server/0026-Redirect-Configs.patch +++ b/patches/server/0026-Redirect-Configs.patch @@ -1,5 +1,5 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Bud Gidiere +From: Sotr Date: Wed, 5 Aug 2020 08:17:46 -0500 Subject: [PATCH] Redirect Configs diff --git a/scripts/getUpstream.sh b/scripts/getUpstream.sh index f964b36c..3068305b 100755 --- a/scripts/getUpstream.sh +++ b/scripts/getUpstream.sh @@ -43,9 +43,9 @@ for D in */; do done done IFS=' ' - done - $1/scripts/applyUpstream.sh $1 $dnoslash || exit 1 - fi + fi + done + $1/scripts/applyUpstream.sh $1 $dnoslash || exit 1 fi fi fi From 01c3f7d84af86731f9631c06ade5d202d13390e7 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Wed, 5 Aug 2020 14:59:22 -0500 Subject: [PATCH 15/25] Fix Build --- .../server/0001-Yatopia-Server-Fixes.patch | 14 +++--- patches/server/0003-Brandings.patch | 2 +- .../0004-Add-GameProfileLookupEvent.patch | 47 ++++++++++--------- .../server/0005-Add-getLastTickMs-api.patch | 4 +- ...g-Yatopia-command-and-basic-settings.patch | 2 +- .../0022-Optimize-TileEntity-loading.patch | 2 +- patches/server/0026-Redirect-Configs.patch | 2 +- 7 files changed, 38 insertions(+), 35 deletions(-) diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index 402f7321..c6810216 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -33,7 +33,7 @@ index 572780ca665c0fb254cc7431af3dd7759a94f26c..00000000000000000000000000000000 - - new TimingsExport(listeners, parent, history).start(); diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index f81bd67a323f2e72bdad76c52016993a0bf88307..415be72e83e0638bee1dd7e03807194554e6e08c 100644 +index f81bd67a323f2e72bdad76c52016993a0bf88307..200ef278c7822cda12f8382bd4453c32d8f47536 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -439,18 +439,18 @@ public class PaperCommand extends Command { @@ -49,7 +49,7 @@ index f81bd67a323f2e72bdad76c52016993a0bf88307..415be72e83e0638bee1dd7e038071945 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); - ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.chunkX, e.chunkZ); -+ ChunkCoordIntPair chunk = new ChunkCoordIntPair(entity.getChunkX(), entity.getChunkZ()); ++ ChunkCoordIntPair chunk = new ChunkCoordIntPair(entity.chunkX(), entity.chunkZ()); info.left++; info.right.put(chunk, info.right.getOrDefault(chunk, 0) + 1); - if (!chunkProviderServer.isInEntityTickingChunk(e)) { @@ -992,7 +992,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..157ac689deda71cddb8baea224e88be0f5180211 100644 +index afaa6ab4744190b134aeb616a1355cefd1333e37..51c59159e04c6f48cb99f691cb64245973d8e628 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 { @@ -1015,7 +1015,7 @@ index afaa6ab4744190b134aeb616a1355cefd1333e37..157ac689deda71cddb8baea224e88be0 } Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper -@@ -2249,6 +2255,27 @@ public final class CraftServer implements Server { +@@ -2249,6 +2255,25 @@ public final class CraftServer implements Server { } // Akarin End - Server Config @@ -1037,13 +1037,11 @@ index afaa6ab4744190b134aeb616a1355cefd1333e37..157ac689deda71cddb8baea224e88be0 + }*/ + // Purpur end + -+ @Override -+ public YamlConfiguration getOrigamiConfig() { return com.mrivanplays.origami.OrigamiConfig.config; } // Origami - add config to timings report -+ ++ @Override public void restart() { org.spigotmc.RestartCommand.restart(); -@@ -2388,4 +2415,11 @@ public final class CraftServer implements Server { +@@ -2388,4 +2413,11 @@ public final class CraftServer implements Server { return mobGoals; } // Paper end diff --git a/patches/server/0003-Brandings.patch b/patches/server/0003-Brandings.patch index 8d509a1a..d658d489 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 157ac689deda71cddb8baea224e88be0f5180211..7bb9752edfc906ed968e839e073efd63834254fb 100644 +index 51c59159e04c6f48cb99f691cb64245973d8e628..e5aa68bd8c678398c81af96303669f1ec1b1d375 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/0004-Add-GameProfileLookupEvent.patch b/patches/server/0004-Add-GameProfileLookupEvent.patch index 984679d9..6cc68ba5 100644 --- a/patches/server/0004-Add-GameProfileLookupEvent.patch +++ b/patches/server/0004-Add-GameProfileLookupEvent.patch @@ -1,11 +1,11 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: tr7zw +From: Bud Gidiere Date: Wed, 5 Aug 2020 14:25:50 -0500 Subject: [PATCH] Add GameProfileLookupEvent diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java -index dd96dd296d042c0625e527b50b3acfc19a2bf43e..b4a032cada15cdfbcae4f37cd0e36f1aee3cefbb 100644 +index dd96dd296d042c0625e527b50b3acfc19a2bf43e..0c5f2a010f30eb32bea273d7e65b0741016480e5 100644 --- a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java +++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java @@ -5,9 +5,13 @@ import com.google.common.base.Charsets; @@ -22,34 +22,39 @@ index dd96dd296d042c0625e527b50b3acfc19a2bf43e..b4a032cada15cdfbcae4f37cd0e36f1a import org.bukkit.craftbukkit.entity.CraftPlayer; import org.spigotmc.SpigotConfig; -@@ -186,12 +190,21 @@ public class CraftPlayerProfile implements PlayerProfile { +@@ -182,17 +186,24 @@ public class CraftPlayerProfile implements PlayerProfile { + } + public boolean complete(boolean textures, boolean onlineMode) { + MinecraftServer server = MinecraftServer.getServer(); +- boolean isCompleteFromCache = this.completeFromCache(true, onlineMode); if (onlineMode && (!isCompleteFromCache || textures && !hasTextures())) { - GameProfile result = server.getMinecraftSessionService().fillProfileProperties(profile, true); +- GameProfile result = server.getMinecraftSessionService().fillProfileProperties(profile, true); - if (result != null) { - copyProfileProperties(result, this.profile, true); -- } ++ // Yatopia start ++ GameProfileLookupEvent event = new GameProfileLookupEvent(!Bukkit.isPrimaryThread(), profile.getId(), profile.getName()); ++ Bukkit.getServer().getPluginManager().callEvent(event); ++ if (event.getGameProfile() != null) { ++ this.profile = event.getGameProfile(); ++ } else { ++ GameProfile result = server.getMinecraftSessionService().fillProfileProperties(profile, true); ++ if (result != null) { ++ copyProfileProperties(result, this.profile, true); ++ } ++ if (this.profile.isComplete()) { ++ server.getUserCache().saveProfile(this.profile); ++ } ++ } ++ // Yatopia end + } - if (this.profile.isComplete()) { - server.getUserCache().saveProfile(this.profile); - } -+ // Yatopia start -+ GameProfileLookupEvent event = new GameProfileLookupEvent(!Bukkit.isPrimaryThread(), profile.getId(), profile.getName()); -+ Bukkit.getServer().getPluginManager().callEvent(event); -+ if (event.getGameProfile() != null) { -+ this.profile = event.getGameProfile(); -+ } else { -+ GameProfile result = server.getSessionService().fillProfileProperties(profile, true); -+ if (result != null) { -+ copyProfileProperties(result, this.profile, true); -+ } -+ if (this.profile.isComplete()) { -+ server.getUserCache().saveProfile(this.profile); -+ } -+ } -+ // Yatopia end - } +- } return profile.isComplete() && (!onlineMode || !textures || hasTextures()); } + diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java index 579a81e521fdfabfa0318d06c6760a8ab7a88c1e..ceb1f18a49ebc8fbac270d9f221fa44f9baea216 100644 --- a/src/main/java/net/minecraft/server/TileEntitySkull.java diff --git a/patches/server/0005-Add-getLastTickMs-api.patch b/patches/server/0005-Add-getLastTickMs-api.patch index 6ffd3343..3470bc41 100644 --- a/patches/server/0005-Add-getLastTickMs-api.patch +++ b/patches/server/0005-Add-getLastTickMs-api.patch @@ -28,10 +28,10 @@ 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 7bb9752edfc906ed968e839e073efd63834254fb..cdc1870b196c7fd9583dc70d856f484721ccfada 100644 +index e5aa68bd8c678398c81af96303669f1ec1b1d375..e1c62bcb9186518d2ad7f95b2d02847f210acd86 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2422,4 +2422,11 @@ public final class CraftServer implements Server { +@@ -2420,4 +2420,11 @@ public final class CraftServer implements Server { return getServer().lagging; } // Purpur end 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 4b43ff52..f12fd647 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 @@ -1,5 +1,5 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: tr7zw +From: Bud Gidiere Date: Wed, 5 Aug 2020 08:05:10 -0500 Subject: [PATCH] Add config Yatopia command and basic settings diff --git a/patches/server/0022-Optimize-TileEntity-loading.patch b/patches/server/0022-Optimize-TileEntity-loading.patch index cdb03cff..130b1af2 100644 --- a/patches/server/0022-Optimize-TileEntity-loading.patch +++ b/patches/server/0022-Optimize-TileEntity-loading.patch @@ -1,5 +1,5 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: tr7zw +From: Bud Gidiere Date: Wed, 5 Aug 2020 08:08:44 -0500 Subject: [PATCH] Optimize TileEntity loading diff --git a/patches/server/0026-Redirect-Configs.patch b/patches/server/0026-Redirect-Configs.patch index b948147e..33de6260 100644 --- a/patches/server/0026-Redirect-Configs.patch +++ b/patches/server/0026-Redirect-Configs.patch @@ -1,5 +1,5 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Sotr +From: Bud Gidiere Date: Wed, 5 Aug 2020 08:17:46 -0500 Subject: [PATCH] Redirect Configs From 563fbe2b5b8fb5336075377f17866b60ec1b8bbc Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Wed, 5 Aug 2020 15:07:55 -0500 Subject: [PATCH 16/25] ok this should fix it --- patches/server/0001-Yatopia-Server-Fixes.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index c6810216..df1d5982 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -33,7 +33,7 @@ index 572780ca665c0fb254cc7431af3dd7759a94f26c..00000000000000000000000000000000 - - new TimingsExport(listeners, parent, history).start(); diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index f81bd67a323f2e72bdad76c52016993a0bf88307..200ef278c7822cda12f8382bd4453c32d8f47536 100644 +index f81bd67a323f2e72bdad76c52016993a0bf88307..a0fa11bb69a44969f9f95b8d4cefb4443bef2f4b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -439,18 +439,18 @@ public class PaperCommand extends Command { @@ -49,7 +49,7 @@ index f81bd67a323f2e72bdad76c52016993a0bf88307..200ef278c7822cda12f8382bd4453c32 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); - ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.chunkX, e.chunkZ); -+ ChunkCoordIntPair chunk = new ChunkCoordIntPair(entity.chunkX(), entity.chunkZ()); ++ ChunkCoordIntPair chunk = new ChunkCoordIntPair(entity.chunkX, entity.chunkZ; info.left++; info.right.put(chunk, info.right.getOrDefault(chunk, 0) + 1); - if (!chunkProviderServer.isInEntityTickingChunk(e)) { From b07adf23b114219bb48c49f4f0a1b7086b9b8a72 Mon Sep 17 00:00:00 2001 From: Bud Gidiere Date: Wed, 5 Aug 2020 15:19:42 -0500 Subject: [PATCH 17/25] new fix --- patches/server/0001-Yatopia-Server-Fixes.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index df1d5982..11f56165 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -33,7 +33,7 @@ index 572780ca665c0fb254cc7431af3dd7759a94f26c..00000000000000000000000000000000 - - new TimingsExport(listeners, parent, history).start(); diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index f81bd67a323f2e72bdad76c52016993a0bf88307..a0fa11bb69a44969f9f95b8d4cefb4443bef2f4b 100644 +index f81bd67a323f2e72bdad76c52016993a0bf88307..98a898f8b8469969e5eb388edb818e519ff68681 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -439,18 +439,18 @@ public class PaperCommand extends Command { @@ -49,7 +49,7 @@ index f81bd67a323f2e72bdad76c52016993a0bf88307..a0fa11bb69a44969f9f95b8d4cefb444 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); - ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.chunkX, e.chunkZ); -+ ChunkCoordIntPair chunk = new ChunkCoordIntPair(entity.chunkX, entity.chunkZ; ++ ChunkCoordIntPair chunk = new ChunkCoordIntPair(entity.chunkX, entity.chunkZ); info.left++; info.right.put(chunk, info.right.getOrDefault(chunk, 0) + 1); - if (!chunkProviderServer.isInEntityTickingChunk(e)) { From d73cef781e408b9e0464b3db8b1f9904565cfa88 Mon Sep 17 00:00:00 2001 From: Gatt Date: Thu, 6 Aug 2020 12:04:43 +1000 Subject: [PATCH 18/25] delete akarin patches --- ...-Akarin-Updated-Save-json-list-async.patch | 63 -------------- ...figs.patch => 0024-Redirect-Configs.patch} | 0 ...ted-Cache-hashcode-for-BlockPosition.patch | 87 ------------------- 3 files changed, 150 deletions(-) delete mode 100644 patches/server/0024-Akarin-Updated-Save-json-list-async.patch rename patches/server/{0026-Redirect-Configs.patch => 0024-Redirect-Configs.patch} (100%) delete mode 100644 patches/server/0025-Akarin-updated-Cache-hashcode-for-BlockPosition.patch diff --git a/patches/server/0024-Akarin-Updated-Save-json-list-async.patch b/patches/server/0024-Akarin-Updated-Save-json-list-async.patch deleted file mode 100644 index ea446bdf..00000000 --- a/patches/server/0024-Akarin-Updated-Save-json-list-async.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: tsao chi -Date: Fri, 31 Jul 2020 22:11:10 -0500 -Subject: [PATCH] Akarin Updated Save json list async - - -diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java -index 9213bfb78e92b838189161045e3945588251b486..6d7452d05c648cdee50b2077aec6f100449b8229 100644 ---- a/src/main/java/net/minecraft/server/JsonList.java -+++ b/src/main/java/net/minecraft/server/JsonList.java -@@ -20,6 +20,8 @@ import java.util.Iterator; - import java.util.List; - import java.util.Map; - import javax.annotation.Nullable; -+ -+import org.apache.commons.io.IOUtils; - import org.apache.logging.log4j.LogManager; - import org.apache.logging.log4j.Logger; - -@@ -146,6 +148,7 @@ public abstract class JsonList> { - } - - public void save() throws IOException { -+ Runnable runnable = () -> { // Akarin - Save json list async - this.removeStaleEntries(); // Paper - remove expired values before saving - JsonArray jsonarray = new JsonArray(); - -@@ -155,29 +158,20 @@ public abstract class JsonList> { - jsonlistentry.getClass(); - return (JsonObject) SystemUtils.a(jsonobject, jsonlistentry::a); // CraftBukkit - decompile error - }).forEach(jsonarray::add); -- BufferedWriter bufferedwriter = Files.newWriter(this.c, StandardCharsets.UTF_8); -+ BufferedWriter bufferedwriter = null; - Throwable throwable = null; - - try { -+ bufferedwriter = Files.newWriter(this.c, StandardCharsets.UTF_8); - JsonList.b.toJson(jsonarray, bufferedwriter); - } catch (Throwable throwable1) { -- throwable = throwable1; -- throw throwable1; -+ throw new RuntimeException(throwable1); - } finally { -- if (bufferedwriter != null) { -- if (throwable != null) { -- try { -- bufferedwriter.close(); -- } catch (Throwable throwable2) { -- throwable.addSuppressed(throwable2); -- } -- } else { -- bufferedwriter.close(); -- } -- } -- -+ IOUtils.closeQuietly(bufferedwriter); - } - -+ }; // Akarin - Save json list async -+ MCUtil.scheduleAsyncTask(runnable); // Akarin - Save json list async - } - - public void load() throws IOException { diff --git a/patches/server/0026-Redirect-Configs.patch b/patches/server/0024-Redirect-Configs.patch similarity index 100% rename from patches/server/0026-Redirect-Configs.patch rename to patches/server/0024-Redirect-Configs.patch diff --git a/patches/server/0025-Akarin-updated-Cache-hashcode-for-BlockPosition.patch b/patches/server/0025-Akarin-updated-Cache-hashcode-for-BlockPosition.patch deleted file mode 100644 index f4450a74..00000000 --- a/patches/server/0025-Akarin-updated-Cache-hashcode-for-BlockPosition.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Bud Gidiere -Date: Wed, 5 Aug 2020 14:33:51 -0500 -Subject: [PATCH] Akarin updated Cache hashcode for BlockPosition - - -diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index e69b7dbc7a954374f9e2374ffe7faebfed2b0644..531bad98fecee11fd149e15974dfd58eb3acc6bb 100644 ---- a/src/main/java/net/minecraft/server/BaseBlockPosition.java -+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -28,6 +28,7 @@ public class BaseBlockPosition implements Comparable { - return b < 0 || b >= 256; - } - // Paper end -+ protected int hash; // Akarin - cache hashcode - - public BaseBlockPosition(int i, int j, int k) { - this.a = i; -@@ -52,8 +53,20 @@ public class BaseBlockPosition implements Comparable { - } - - public final int hashCode() { // Paper -- return (this.getY() + this.getZ() * 31) * 31 + this.getX(); -- } -+ // Akarin start - cache hashcode -+ int result = hash; // Make the situation not too bad when it is modified by multiple threads -+ if (result == 0) { -+ result = (this.b + this.e * 31) * 31 + this.a; // Paper -+ hash = result; -+ } -+ return result; -+ // return (this.getY() + this.getZ() * 31) * 31 + this.getX(); -+ } -+ -+ public final void recalcHashCode() { -+ hash = 0; -+ } -+ // Akarin end - - public int compareTo(BaseBlockPosition baseblockposition) { - return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY(); -diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index c77f71b6de87757900b3734feda819754e9408b1..ba4811d2018a4898a72d3654c9e75782ef69288b 100644 ---- a/src/main/java/net/minecraft/server/BlockPosition.java -+++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -438,7 +438,9 @@ public class BlockPosition extends BaseBlockPosition { - } - - public BlockPosition.MutableBlockPosition e(int i, int j, int k) { -- return this.d(this.getX() + i, this.getY() + j, this.getZ() + k); -+ this.d(this.getX() + i, this.getY() + j, this.getZ() + k); -+ this.recalcHashCode(); -+ return this; - } - - public BlockPosition.MutableBlockPosition a(EnumDirection.EnumAxis enumdirection_enumaxis, int i, int j) { -@@ -458,24 +460,30 @@ public class BlockPosition extends BaseBlockPosition { - // only expose set on the mutable blockpos - public final void setX(int value) { - ((BaseBlockPosition)this).a = value; -+ this.recalcHashCode(); - } - public final void setY(int value) { - ((BaseBlockPosition)this).b = value; -+ this.recalcHashCode(); - } - public final void setZ(int value) { - ((BaseBlockPosition)this).e = value; -+ this.recalcHashCode(); - } - - public final void o(int i) { - ((BaseBlockPosition)this).a = i; // need cast thanks to name conflict -+ this.recalcHashCode(); - } - - public final void p(int i) { - ((BaseBlockPosition)this).b = i; -+ this.recalcHashCode(); - } - - public final void q(int i) { - ((BaseBlockPosition)this).e = i; -+ this.recalcHashCode(); - } - // Tuinity end - From a963a29789f9e500264d3c62cf94811586f86e16 Mon Sep 17 00:00:00 2001 From: Gatt Date: Thu, 6 Aug 2020 12:05:23 +1000 Subject: [PATCH 19/25] Create main.yml --- .github/workflows/main.yml | 76 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..98e1ff30 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,76 @@ +name: Yatopia Build Script + +on: + push: + paths-ignore: + - '*.md' + branches: + - ver/1.16.1 + pull_request: + paths-ignore: + - '*.md' + branches: + - ver/1.16.1 + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + java: [14, 11, 8] + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.4.1 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v2 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Pull Maven Cache + uses: actions/cache@v2 + id: maven-cache + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- + - uses: s4u/maven-settings-action@v2.1.0 + name: Use ${{ matrix.java }} as the java target + with: + properties: '[{"maven.compiler.target": "${{ matrix.java }}"}]' + - name: Setup Yatopia Project + run: | + git config --global user.email "ci@github.com" + git config --global user.name "Github CI" + sudo chmod -R -f 777 scripts + ./yatopia init + - name: Build Maven Depends + if: steps.maven-cache.outputs.cache-hit != 'true' + run: | + cd Tuinity + ./tuinity jar + cd ..// + - name: Build Yatopia + run: | + ./yatopia full + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: Yatopia-${{ matrix.java }} + path: yatopia-1.16.1-paperclip.jar + - name: Deploy Release + if: github.ref == 'refs/heads/ver/1.16.1' + uses: WebFreak001/deploy-nightly@v1.0.3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions + with: + upload_url: https://uploads.github.com/repos/tr7zw/Yatopia/releases/28703947/assets{?name,label} # find out this value by opening https://api.github.com/repos///releases in your browser and copy the full "upload_url" value including the {?name,label} part + release_id: 28703947 # same as above (id can just be taken out the upload_url, it's used to find old releases) + asset_path: yatopia-1.16.1-paperclip.jar # path to archive to upload + asset_name: Yatopia-1.16.1-JDK${{ matrix.java }}-paperclip.jar # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash + asset_content_type: application/zip # required by GitHub API + max_releases: 3 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted From fc4e2c7a185f66e06d96724957fa42d077139db5 Mon Sep 17 00:00:00 2001 From: Gatt Date: Thu, 6 Aug 2020 12:06:25 +1000 Subject: [PATCH 20/25] Create main-fix.yml --- .github/workflows/main-fix.yml | 76 ++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/main-fix.yml diff --git a/.github/workflows/main-fix.yml b/.github/workflows/main-fix.yml new file mode 100644 index 00000000..8eebf5c3 --- /dev/null +++ b/.github/workflows/main-fix.yml @@ -0,0 +1,76 @@ +name: Yatopia Build Script + +on: + push: + paths-ignore: + - '*.md' + branches: + - fix/submodules + pull_request: + paths-ignore: + - '*.md' + branches: + - fix/submodules + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + java: [14, 11, 8] + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.4.1 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v2 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Pull Maven Cache + uses: actions/cache@v2 + id: maven-cache + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- + - uses: s4u/maven-settings-action@v2.1.0 + name: Use ${{ matrix.java }} as the java target + with: + properties: '[{"maven.compiler.target": "${{ matrix.java }}"}]' + - name: Setup Yatopia Project + run: | + git config --global user.email "ci@github.com" + git config --global user.name "Github CI" + sudo chmod -R -f 777 scripts + ./yatopia init + - name: Build Maven Depends + if: steps.maven-cache.outputs.cache-hit != 'true' + run: | + cd Tuinity + ./tuinity jar + cd ..// + - name: Build Yatopia + run: | + ./yatopia full + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: Yatopia-${{ matrix.java }} + path: yatopia-1.16.1-paperclip.jar + - name: Deploy Release + if: github.ref == 'refs/heads/ver/1.16.1' + uses: WebFreak001/deploy-nightly@v1.0.3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions + with: + upload_url: https://uploads.github.com/repos/tr7zw/Yatopia/releases/28703947/assets{?name,label} # find out this value by opening https://api.github.com/repos///releases in your browser and copy the full "upload_url" value including the {?name,label} part + release_id: 28703947 # same as above (id can just be taken out the upload_url, it's used to find old releases) + asset_path: yatopia-1.16.1-paperclip.jar # path to archive to upload + asset_name: Yatopia-1.16.1-JDK${{ matrix.java }}-paperclip.jar # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash + asset_content_type: application/zip # required by GitHub API + max_releases: 3 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted From 9ef0e9e3176502489392931ab71edd9f6db982d3 Mon Sep 17 00:00:00 2001 From: Gatt Date: Thu, 6 Aug 2020 12:07:58 +1000 Subject: [PATCH 21/25] tr --- .github/workflows/main.yml | 76 -------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 98e1ff30..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: Yatopia Build Script - -on: - push: - paths-ignore: - - '*.md' - branches: - - ver/1.16.1 - pull_request: - paths-ignore: - - '*.md' - branches: - - ver/1.16.1 - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - java: [14, 11, 8] - - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.4.1 - with: - access_token: ${{ github.token }} - - uses: actions/checkout@v2 - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Pull Maven Cache - uses: actions/cache@v2 - id: maven-cache - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-maven- - - uses: s4u/maven-settings-action@v2.1.0 - name: Use ${{ matrix.java }} as the java target - with: - properties: '[{"maven.compiler.target": "${{ matrix.java }}"}]' - - name: Setup Yatopia Project - run: | - git config --global user.email "ci@github.com" - git config --global user.name "Github CI" - sudo chmod -R -f 777 scripts - ./yatopia init - - name: Build Maven Depends - if: steps.maven-cache.outputs.cache-hit != 'true' - run: | - cd Tuinity - ./tuinity jar - cd ..// - - name: Build Yatopia - run: | - ./yatopia full - - name: Upload Artifact - uses: actions/upload-artifact@v2 - with: - name: Yatopia-${{ matrix.java }} - path: yatopia-1.16.1-paperclip.jar - - name: Deploy Release - if: github.ref == 'refs/heads/ver/1.16.1' - uses: WebFreak001/deploy-nightly@v1.0.3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions - with: - upload_url: https://uploads.github.com/repos/tr7zw/Yatopia/releases/28703947/assets{?name,label} # find out this value by opening https://api.github.com/repos///releases in your browser and copy the full "upload_url" value including the {?name,label} part - release_id: 28703947 # same as above (id can just be taken out the upload_url, it's used to find old releases) - asset_path: yatopia-1.16.1-paperclip.jar # path to archive to upload - asset_name: Yatopia-1.16.1-JDK${{ matrix.java }}-paperclip.jar # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash - asset_content_type: application/zip # required by GitHub API - max_releases: 3 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted From 2727ac2ef9dbec99cbc0249498fb36fa9f630413 Mon Sep 17 00:00:00 2001 From: Gatt Date: Thu, 6 Aug 2020 12:29:18 +1000 Subject: [PATCH 22/25] Restore Patch 24 (JSON List Async) as Patch 25 --- ...-Akarin-Updated-Save-json-list-async.patch | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 patches/server/0025-Akarin-Updated-Save-json-list-async.patch diff --git a/patches/server/0025-Akarin-Updated-Save-json-list-async.patch b/patches/server/0025-Akarin-Updated-Save-json-list-async.patch new file mode 100644 index 00000000..ea446bdf --- /dev/null +++ b/patches/server/0025-Akarin-Updated-Save-json-list-async.patch @@ -0,0 +1,63 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: tsao chi +Date: Fri, 31 Jul 2020 22:11:10 -0500 +Subject: [PATCH] Akarin Updated Save json list async + + +diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java +index 9213bfb78e92b838189161045e3945588251b486..6d7452d05c648cdee50b2077aec6f100449b8229 100644 +--- a/src/main/java/net/minecraft/server/JsonList.java ++++ b/src/main/java/net/minecraft/server/JsonList.java +@@ -20,6 +20,8 @@ import java.util.Iterator; + import java.util.List; + import java.util.Map; + import javax.annotation.Nullable; ++ ++import org.apache.commons.io.IOUtils; + import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + +@@ -146,6 +148,7 @@ public abstract class JsonList> { + } + + public void save() throws IOException { ++ Runnable runnable = () -> { // Akarin - Save json list async + this.removeStaleEntries(); // Paper - remove expired values before saving + JsonArray jsonarray = new JsonArray(); + +@@ -155,29 +158,20 @@ public abstract class JsonList> { + jsonlistentry.getClass(); + return (JsonObject) SystemUtils.a(jsonobject, jsonlistentry::a); // CraftBukkit - decompile error + }).forEach(jsonarray::add); +- BufferedWriter bufferedwriter = Files.newWriter(this.c, StandardCharsets.UTF_8); ++ BufferedWriter bufferedwriter = null; + Throwable throwable = null; + + try { ++ bufferedwriter = Files.newWriter(this.c, StandardCharsets.UTF_8); + JsonList.b.toJson(jsonarray, bufferedwriter); + } catch (Throwable throwable1) { +- throwable = throwable1; +- throw throwable1; ++ throw new RuntimeException(throwable1); + } finally { +- if (bufferedwriter != null) { +- if (throwable != null) { +- try { +- bufferedwriter.close(); +- } catch (Throwable throwable2) { +- throwable.addSuppressed(throwable2); +- } +- } else { +- bufferedwriter.close(); +- } +- } +- ++ IOUtils.closeQuietly(bufferedwriter); + } + ++ }; // Akarin - Save json list async ++ MCUtil.scheduleAsyncTask(runnable); // Akarin - Save json list async + } + + public void load() throws IOException { From c8ba772f4d187bf02b1ea9dd1ff0a79baa90315e Mon Sep 17 00:00:00 2001 From: Gatt Date: Thu, 6 Aug 2020 12:43:34 +1000 Subject: [PATCH 23/25] Restore ShulkerBox Changes from 0001 --- .../server/0001-Yatopia-Server-Fixes.patch | 52 +++++++++---------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index 11f56165..6ac42815 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -706,34 +706,30 @@ index cc8866ec1ccbc131e8491c50eda4f85590bb667b..00000000000000000000000000000000 - return true; - } - } -diff --git a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java.rej b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java.rej -deleted file mode 100644 -index bada470cba41cce9beb9eb04227b42c1d489d731..0000000000000000000000000000000000000000 ---- a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java.rej -+++ /dev/null -@@ -1,22 +0,0 @@ --diff a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java (rejected hunks) --@@ -10,7 +11,19 @@ import org.bukkit.entity.HumanEntity; -- -- public class TileEntityShulkerBox extends TileEntityLootable implements IWorldInventory, ITickable { -- --- private static final int[] a = IntStream.range(0, 27).toArray(); --+ private static final int[] a; --+ --+ static { --+ int[] arr = new int[10]; --+ int count = 0; --+ for (int i1 = 0; i1 < 27; i1++) { --+ if (arr.length == count) arr = Arrays.copyOf(arr, count * 2); --+ arr[count++] = i1; --+ } --+ arr = Arrays.copyOfRange(arr, 0, count); --+ a = arr; --+ } --+ -- private NonNullList contents; -- private int c; -- private TileEntityShulkerBox.AnimationPhase i; +diff --git a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java +index 7fe085e48b6ad625a510edf33b112bef24f7d7ad..9459efde54d507231b4aacb7cba14e9905ebb4d7 100644 +--- a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java ++++ b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java +@@ -11,7 +11,18 @@ import org.bukkit.entity.HumanEntity; + + public class TileEntityShulkerBox extends TileEntityLootable implements IWorldInventory, ITickable { + +- private static final int[] a = IntStream.range(0, 27).toArray(); ++ private static final int[] a; ++ ++ static { ++ int[] arr = new int[10]; ++ int count = 0; ++ for (int i1 = 0; i1 < 27; i1++) { ++ if (arr.length == count) arr = Arrays.copyOf(arr, count * 2); ++ arr[count++] = i1; ++ } ++ arr = Arrays.copyOfRange(arr, 0, count); ++ a = arr; ++ } + private NonNullList contents; + public int c; // PAIL private -> public, rename viewerCount + private TileEntityShulkerBox.AnimationPhase i; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 0890bca50858ec8d544be2e1ff4ac2da73c7d830..44af511da96b265a8441052cc87e356e630699a6 100644 --- a/src/main/java/net/minecraft/server/World.java From da1f64ed35725d1823d2720fce1fdc48dc186c2c Mon Sep 17 00:00:00 2001 From: Gatt Date: Thu, 6 Aug 2020 12:56:22 +1000 Subject: [PATCH 24/25] remove custom workflow before PR --- .github/workflows/main-fix.yml | 76 ---------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 .github/workflows/main-fix.yml diff --git a/.github/workflows/main-fix.yml b/.github/workflows/main-fix.yml deleted file mode 100644 index 8eebf5c3..00000000 --- a/.github/workflows/main-fix.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: Yatopia Build Script - -on: - push: - paths-ignore: - - '*.md' - branches: - - fix/submodules - pull_request: - paths-ignore: - - '*.md' - branches: - - fix/submodules - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - java: [14, 11, 8] - - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.4.1 - with: - access_token: ${{ github.token }} - - uses: actions/checkout@v2 - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - name: Pull Maven Cache - uses: actions/cache@v2 - id: maven-cache - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-maven- - - uses: s4u/maven-settings-action@v2.1.0 - name: Use ${{ matrix.java }} as the java target - with: - properties: '[{"maven.compiler.target": "${{ matrix.java }}"}]' - - name: Setup Yatopia Project - run: | - git config --global user.email "ci@github.com" - git config --global user.name "Github CI" - sudo chmod -R -f 777 scripts - ./yatopia init - - name: Build Maven Depends - if: steps.maven-cache.outputs.cache-hit != 'true' - run: | - cd Tuinity - ./tuinity jar - cd ..// - - name: Build Yatopia - run: | - ./yatopia full - - name: Upload Artifact - uses: actions/upload-artifact@v2 - with: - name: Yatopia-${{ matrix.java }} - path: yatopia-1.16.1-paperclip.jar - - name: Deploy Release - if: github.ref == 'refs/heads/ver/1.16.1' - uses: WebFreak001/deploy-nightly@v1.0.3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions - with: - upload_url: https://uploads.github.com/repos/tr7zw/Yatopia/releases/28703947/assets{?name,label} # find out this value by opening https://api.github.com/repos///releases in your browser and copy the full "upload_url" value including the {?name,label} part - release_id: 28703947 # same as above (id can just be taken out the upload_url, it's used to find old releases) - asset_path: yatopia-1.16.1-paperclip.jar # path to archive to upload - asset_name: Yatopia-1.16.1-JDK${{ matrix.java }}-paperclip.jar # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash - asset_content_type: application/zip # required by GitHub API - max_releases: 3 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted From 5375aba660ae6eaef663f66ecec1def9690e1c6b Mon Sep 17 00:00:00 2001 From: budgidiere Date: Wed, 5 Aug 2020 22:07:50 -0500 Subject: [PATCH 25/25] Update readme --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e510d7d7..ca6b60fd 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,8 @@ ## Introduction ## * [EMC](https://github.com/starlis/empirecraft) * [Lithium](https://github.com/jellysquid3/lithium-fabric) * [Akarin](https://github.com/Akarin-project/Akarin) -* [Papercut](https://github.com/Minevictus/Papercut/) -* [Origami](https://github.com/MrIvanPlays/Origami) -* [Origami(2)](https://github.com/Minebench/Origami) +* [Rainforest](https://github.com/Proixmyst/Rainforest) +* [Origami](https://github.com/Minebench/Origami) * [Purpur](https://github.com/pl3xgaming/Purpur) Notable features are: Async & Optimized Pathfinding, Eigencraft Redstone (1.16), Async Advancements, Optimizer Pathfinder, Ability to slow down villager brains, Ability to disable collisions & collisionboxes, Major Hopper Performance Improvements, Nether TNT Bug + A lot more that all contribute towards ultimate performance. @@ -70,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), [Papercut](https://github.com/Minevictus/Papercut/), [Origami](https://github.com/MrIvanPlays/Origami), [Origami(2)](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/Proixmyst/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!**