From 5c8274bd2fa99893b27f4532306d415f6c7ceaad Mon Sep 17 00:00:00 2001 From: Ivan Pekov Date: Wed, 23 Dec 2020 09:46:56 +0200 Subject: [PATCH] Port requested patches from Purpur Ported: TPSBar, custom growth rates and configurable lava speed --- PATCHES.md | 5 ++ patches/Purpur/server.txt | 2 +- .../server/0001-Yatopia-Server-Fixes.patch | 52 ++++++++++++++++++- patches/server/0003-Brandings.patch | 4 +- .../server/0006-Add-last-tick-time-API.patch | 6 +-- .../server/0007-Yatopia-configuration.patch | 2 +- ...op-wasting-resources-on-JsonList-get.patch | 6 +-- ...Respect-PlayerKickEvent-leaveMessage.patch | 4 +- ...st-command-for-multiple-additions-re.patch | 4 +- .../0058-Configurable-BlockPhysicsEvent.patch | 4 +- patches/server/0059-Infinity-No-Arrows.patch | 2 +- ...062-Use-faster-random-implementation.patch | 2 +- 12 files changed, 73 insertions(+), 20 deletions(-) diff --git a/PATCHES.md b/PATCHES.md index 29bbc3b0..0ece1888 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -28,6 +28,7 @@ # Patches | server | Add permission for F3+N debug | William Blake Galbreath | | | server | Add timings for Behavior | Phoenix616 | | | server | Add timings for Pathfinder | MrIvanPlays | | +| server | Add twisting and weeping vines growth rates | BillyGalbreath | | | server | AirplaneLite Data Structs | Paul Sauve | | | server | AirplaneLite MC Dev Fixes | Paul Sauve | | | server | Allow anvil colors | William Blake Galbreath | | @@ -68,11 +69,14 @@ # Patches | server | Fix exp drop of zombie pigmen (MC-56653) | Phoenix616 | | | server | Fix lead fall dmg config | tr7zw | | | server | Fix the dead lagging the server | William Blake Galbreath | | +| server | Fix vanilla command permission handler | William Blake Galbreath | | | server | Global Eula file | tr7zw | | | server | Heavily optimize furnance fuel and recipe lookups | tr7zw | Mykyta Komarn | | server | Heavily optimize recipe lookups in CraftingManager | Mykyta Komarn | Ivan Pekov | | server | Highly optimize VillagePlace filtering | Ivan Pekov | | | server | Hopper Optimizations | Phoenix616 | | +| server | Implement TPSBar | BillyGalbreath | | +| server | Implement bamboo growth settings | William Blake Galbreath | | | server | Improve task performance | ishland | Mykyta Komarn | | server | Infinity No Arrows | Bud Gidiere | | | server | Infinity bow settings | William Blake Galbreath | | @@ -81,6 +85,7 @@ # Patches | server | Lagging threshold | William Blake Galbreath | | | server | MC-147659 - Fix non black cats spawning in swamp huts | William Blake Galbreath | | | server | MC-168772 Fix - Add turtle egg block options | William Blake Galbreath | | +| server | Make lava flow speed configurable | William Blake Galbreath | | | api | Modify POM | YatopiaMC | | | server | Modify POM | YatopiaMC | | | server | Modify default configs | tr7zw | | diff --git a/patches/Purpur/server.txt b/patches/Purpur/server.txt index a14ab4d7..9de7313f 100644 --- a/patches/Purpur/server.txt +++ b/patches/Purpur/server.txt @@ -1 +1 @@ -Purpur-config-files&Timings-stuff&Add-component-util&Barrels-and-enderchests-6-rows&Lagging-threshold&Configurable-villager-brain-ticks&Alternative-Keepalive-Handling&MC-168772-Fix-Add-turtle-egg-block-options&Fix-outdated-server-showing-in-ping-before-server-fu&Dont-send-useless-entity-packets&MC-147659-Fix-non-black-cats-spawning-in-swamp-huts&Cows-eat-mushrooms&Snowman-drop-and-put-back-pumpkin&Signs-editable-on-right-click&Signs-allow-color-codes&Allow-soil-to-moisten-from-water-directly-under-it&Option-to-toggle-milk-curing-bad-omen&Fix-the-dead-lagging-the-server&Skip-events-if-there-s-no-listeners&Add-permission-for-F3-N-debug&Allow-leashing-villagers&PaperPR-Projectile-load-save-limit-per-chunk&Add-5-second-tps-average-in-tps&Entity-lifespan&Squid-EAR-immunity&Allow-anvil-colors&Add-no-tick-block-list&Add-option-to-disable-dolphin-treasure-searching&Stop-squids-floating-on-top-of-water&Despawn-rate-config-options-per-projectile-type&PaperPR-Add-hex-color-code-support-for-console-loggi&Persistent-TileEntity-Lore-and-DisplayName&Infinity-bow-settings&Allow-infinite-and-mending-enchantments-together&Config-migration-disable-saving-projectiles-to-disk-&Spread-out-and-optimise-player-list-ticks \ No newline at end of file +Purpur-config-files&Timings-stuff&Add-component-util&Barrels-and-enderchests-6-rows&Lagging-threshold&Configurable-villager-brain-ticks&Alternative-Keepalive-Handling&MC-168772-Fix-Add-turtle-egg-block-options&Fix-vanilla-command-permission-handler&Fix-outdated-server-showing-in-ping-before-server-fu&Dont-send-useless-entity-packets&MC-147659-Fix-non-black-cats-spawning-in-swamp-huts&Cows-eat-mushrooms&Snowman-drop-and-put-back-pumpkin&Signs-editable-on-right-click&Signs-allow-color-codes&Allow-soil-to-moisten-from-water-directly-under-it&Option-to-toggle-milk-curing-bad-omen&Fix-the-dead-lagging-the-server&Skip-events-if-there-s-no-listeners&Add-permission-for-F3-N-debug&Allow-leashing-villagers&Make-lava-flow-speed-configurable&PaperPR-Projectile-load-save-limit-per-chunk&Implement-bamboo-growth-settings&Add-5-second-tps-average-in-tps&Entity-lifespan&Squid-EAR-immunity&Allow-anvil-colors&Add-no-tick-block-list&Add-option-to-disable-dolphin-treasure-searching&Stop-squids-floating-on-top-of-water&Despawn-rate-config-options-per-projectile-type&PaperPR-Add-hex-color-code-support-for-console-loggi&Persistent-TileEntity-Lore-and-DisplayName&Infinity-bow-settings&Allow-infinite-and-mending-enchantments-together&Add-twisting-and-weeping-vines-growth-rates&Config-migration-disable-saving-projectiles-to-disk-&Spread-out-and-optimise-player-list-ticks&Implement-TPSBar \ 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 9eeea687..c3b787de 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -141,6 +141,30 @@ index 2291135eaef64c403183724cb6e413cd7e472672..6fcc7ed7c129e6a33386d65b37cbba4a public static long getAdjacent(int baseX, int baseY, int baseZ, EnumDirection enumdirection) { return asLong(baseX + enumdirection.getAdjacentX(), baseY + enumdirection.getAdjacentY(), baseZ + enumdirection.getAdjacentZ()); } // Paper public static long a(long i, EnumDirection enumdirection) { return a(i, enumdirection.getAdjacentX(), enumdirection.getAdjacentY(), enumdirection.getAdjacentZ()); +diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java +index cabce1a8ba5db56495628edd9bc796aee7a53356..6cf74a3a036e6551cb1400fa68592a19cd0f5a71 100644 +--- a/src/main/java/net/minecraft/server/CommandDispatcher.java ++++ b/src/main/java/net/minecraft/server/CommandDispatcher.java +@@ -337,6 +337,7 @@ public class CommandDispatcher { + + } + ++ public static LiteralArgumentBuilder literal(String s) { return a(s); } // Purpur - OBFHELPER + public static LiteralArgumentBuilder a(String s) { + return LiteralArgumentBuilder.literal(s); + } +diff --git a/src/main/java/net/minecraft/server/CommandListenerWrapper.java b/src/main/java/net/minecraft/server/CommandListenerWrapper.java +index 86f1cfe454ea0a989775b49a6b88375c766ef647..da53af61d1171db3c167c6e007adf95355771653 100644 +--- a/src/main/java/net/minecraft/server/CommandListenerWrapper.java ++++ b/src/main/java/net/minecraft/server/CommandListenerWrapper.java +@@ -189,6 +189,7 @@ public class CommandListenerWrapper implements ICompletionProvider, com.destroys + } + } + ++ public EntityPlayer getPlayerOrException() throws CommandSyntaxException { return h(); } // Purpur - OBFHELPER + public EntityPlayer h() throws CommandSyntaxException { + if (!(this.k instanceof EntityPlayer)) { + throw CommandListenerWrapper.a.create(); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index c8bbcf43d3352b3d42e15a2e2d1673b08bc16402..119abc84fadb6b011813ae8667a48c87feffcdc4 100644 --- a/src/main/java/net/minecraft/server/Entity.java @@ -503,7 +527,7 @@ index ccee2c7ae135a3a532f76b44d7d3ad6db7e8c387..00000000000000000000000000000000 - public static String afkBroadcastBack = "§e§o%s is no longer AFK"; - public static String afkTabListPrefix = "[AFK] "; diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 361f7857e461578e90cb71e15027dadaf794cb69..117e32be8c34f264cfeae78081abefb487cab5f3 100644 +index 361f7857e461578e90cb71e15027dadaf794cb69..512f42b6fcbf7c09c1473c5ae529d5d1a48a6cf5 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -1,7 +1,15 @@ @@ -522,7 +546,7 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..117e32be8c34f264cfeae78081abefb4 import static net.pl3x.purpur.PurpurConfig.log; public class PurpurWorldConfig { -@@ -56,4 +64,139 @@ public class PurpurWorldConfig { +@@ -56,4 +64,163 @@ public class PurpurWorldConfig { PurpurConfig.config.addDefault("world-settings.default." + path, def); return PurpurConfig.config.getString("world-settings." + worldName + "." + path, PurpurConfig.config.getString("world-settings.default." + path)); } @@ -660,6 +684,30 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..117e32be8c34f264cfeae78081abefb4 + PaperConfig.saveConfig(); + } + } ++ } ++ ++ public int bambooMaxHeight = 16; ++ public int bambooSmallHeight = 10; ++ private void bambooSettings() { ++ bambooMaxHeight = getInt("blocks.bamboo.max-height", bambooMaxHeight); ++ bambooSmallHeight = getInt("blocks.bamboo.small-height", bambooSmallHeight); ++ } ++ ++ public double twistingVinesGrowthModifier = 0.10D; ++ private void twistingVinesSettings() { ++ twistingVinesGrowthModifier = getDouble("blocks.twisting_vines.growth-modifier", twistingVinesGrowthModifier); ++ } ++ ++ public double weepingVinesGrowthModifier = 0.10D; ++ private void weepingVinesSettings() { ++ weepingVinesGrowthModifier = getDouble("blocks.weeping_vines.growth-modifier", weepingVinesGrowthModifier); ++ } ++ ++ public int lavaSpeedNether = 10; ++ public int lavaSpeedNotNether = 30; ++ private void lavaSettings() { ++ lavaSpeedNether = getInt("blocks.lava.speed.nether", lavaSpeedNether); ++ lavaSpeedNotNether = getInt("blocks.lava.speed.not-nether", lavaSpeedNotNether); + } } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej diff --git a/patches/server/0003-Brandings.patch b/patches/server/0003-Brandings.patch index dfd25ceb..abf18723 100644 --- a/patches/server/0003-Brandings.patch +++ b/patches/server/0003-Brandings.patch @@ -39,10 +39,10 @@ index 74ed02fa9296583977bb721014b10ff8b708b43c..a13c7b2b5bc79ecaea404779149ed02c .completer(new ConsoleCommandCompleter(this.server)) ); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7510d4b98804f79276b02b40de5fa8e8bc2cde7a..8c34b3d0e6c0d2d4be42bea01abae2c47d6633f0 100644 +index a91869dde9f47e00b6c6e380e7d3b92282d9b235..fc3abab760aa90e2afa5b4bf6abd3a0aff897f25 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1522,7 +1522,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8c34b3d0e6c0d2d4be42bea01abae2c47d6633f0..eb9d61b5e76c7b40faebfa8308cd3348b7e31fac 100644 +index fc3abab760aa90e2afa5b4bf6abd3a0aff897f25..e990a39d97cb1427dd2ce43bdc79fb84e93e9c4b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -934,6 +934,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant