diff --git a/AirplaneLite b/AirplaneLite index ff087b79..20b8c796 160000 --- a/AirplaneLite +++ b/AirplaneLite @@ -1 +1 @@ -Subproject commit ff087b793c514b62745d9eb8be5f1f7168690119 +Subproject commit 20b8c796f4b66bce7bc3be496f5c9e9edef1d226 diff --git a/Empirecraft b/Empirecraft index e45a78e4..d32f7b26 160000 --- a/Empirecraft +++ b/Empirecraft @@ -1 +1 @@ -Subproject commit e45a78e4b8a2990e697e47667b9d90a25405afe8 +Subproject commit d32f7b265f971d588a1ee69eb25e74ad372e133d diff --git a/PATCHES.md b/PATCHES.md index c63619b7..9220285c 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 | | @@ -43,6 +44,7 @@ # Patches | server | Config migration: disable saving projectiles to disk -> | jmp | | | server | Configurable BlockPhysicsEvent | Mykyta Komarnytskyy | | | server | Configurable criterion triggers | Mykyta Komarnytskyy | | +| server | Configurable enchanting table tick | Ivan Pekov | | | server | Configurable flight checks | l_MrBoom_l | | | server | Configurable movement checks | l_MrBoom_l | | | server | Configurable villager brain ticks | William Blake Galbreath | | @@ -56,6 +58,7 @@ # Patches | server | Do not update distance map when animal and mob spawning is | Beech Horn | | | server | Don't load chunk with seed based feature search | Phoenix616 | | | server | Don't trigger Lootable Refresh for non player interaction | Aikar | | +| server | Don't unnecessarily copy the passenger list | Ivan Pekov | | | server | Don't wake up entities when damage event is cancelled | Phoenix616 | | | server | Dont send useless entity packets | William Blake Galbreath | | | server | Ensure pools create daemon threads | Ivan Pekov | | @@ -67,11 +70,15 @@ # 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 | Implement infinite lava | William Blake Galbreath | | | server | Improve task performance | ishland | Mykyta Komarn | | server | Infinity No Arrows | Bud Gidiere | | | server | Infinity bow settings | William Blake Galbreath | | @@ -80,6 +87,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 | | @@ -125,7 +133,6 @@ # Patches | server | Strip raytracing for EntityLiving#hasLineOfSight | Paul Sauve | | | server | Swap priority of checks in chunk ticking | Paul Sauve | | | server | Swaps the predicate order of collision | ㄗㄠˋ ㄑㄧˊ | | -| server | Tile Entity optimizations | Mykyta Komarnytskyy | | | server | Timings stuff | William Blake Galbreath | | | server | Use faster random implementation | Mykyta Komarnytskyy | | | server | Use offline uuids if we need to | Ivan Pekov | | diff --git a/Purpur b/Purpur index 79d304ff..5758335e 160000 --- a/Purpur +++ b/Purpur @@ -1 +1 @@ -Subproject commit 79d304ff80a864161d685811ade645701e693fa9 +Subproject commit 5758335e73176ec765e6d8c73b78c3f39f5262ee diff --git a/Tuinity b/Tuinity index 3e77330e..86b20d4e 160000 --- a/Tuinity +++ b/Tuinity @@ -1 +1 @@ -Subproject commit 3e77330ea2a797fdfc594cfd25c38a82d9613597 +Subproject commit 86b20d4ea11e52f1d5e9509351ac577e8a9cdce5 diff --git a/patches/Purpur/server.txt b/patches/Purpur/server.txt index a14ab4d7..b58768de 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&Implement-infinite-lava&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/0063-Tile-Entity-optimizations.patch b/patches/removed/server/0063-Tile-Entity-optimizations.patch similarity index 100% rename from patches/server/0063-Tile-Entity-optimizations.patch rename to patches/removed/server/0063-Tile-Entity-optimizations.patch diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index 9eeea687..9173a9fc 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -141,8 +141,63 @@ 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..9754a9eac48c50efdefdceefbb4386bf0df583dd 100644 +--- a/src/main/java/net/minecraft/server/CommandDispatcher.java ++++ b/src/main/java/net/minecraft/server/CommandDispatcher.java +@@ -107,6 +107,7 @@ public class CommandDispatcher { + CommandIdleTimeout.a(this.b); + CommandStop.a(this.b); + CommandWhitelist.a(this.b); ++ net.pl3x.purpur.command.TPSBarCommand.register(getDispatcher()); // Purpur + } + + if (commanddispatcher_servertype.d) { +@@ -337,6 +338,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); + } +@@ -356,6 +358,7 @@ public class CommandDispatcher { + }; + } + ++ public com.mojang.brigadier.CommandDispatcher getDispatcher() { return a(); } // Purpur - OBFHELPER + public com.mojang.brigadier.CommandDispatcher a() { + return this.b; + } +diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java.rej b/src/main/java/net/minecraft/server/CommandDispatcher.java.rej +deleted file mode 100644 +index 7c1db96ec8692728e204a7d8490d74cf53b096a5..0000000000000000000000000000000000000000 +--- a/src/main/java/net/minecraft/server/CommandDispatcher.java.rej ++++ /dev/null +@@ -1,9 +0,0 @@ +-diff a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java (rejected hunks) +-@@ -109,6 +109,7 @@ public class CommandDispatcher { +- CommandWhitelist.a(this.b); +- net.pl3x.purpur.command.DemoCommand.register(getDispatcher()); // Purpur +- net.pl3x.purpur.command.PingCommand.register(getDispatcher()); // Purpur +-+ net.pl3x.purpur.command.TPSBarCommand.register(getDispatcher()); // Purpur +- } +- +- if (commanddispatcher_servertype.d) { +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 +index 985d0d4aea2210e908ac76fbeafc0c895372aee7..d224b1d0e224853e825486559938aed2c56c3981 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -434,7 +434,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -503,7 +558,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..5f0491a7cd6bb7e94cc5652be24d9bc111bb8035 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 +577,7 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..117e32be8c34f264cfeae78081abefb4 import static net.pl3x.purpur.PurpurConfig.log; public class PurpurWorldConfig { -@@ -56,4 +64,139 @@ public class PurpurWorldConfig { +@@ -56,4 +64,167 @@ 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 +715,34 @@ 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; ++ public boolean lavaInfinite = false; ++ public int lavaInfiniteRequiredSources = 2; ++ private void lavaSettings() { ++ lavaSpeedNether = getInt("blocks.lava.speed.nether", lavaSpeedNether); ++ lavaSpeedNotNether = getInt("blocks.lava.speed.not-nether", lavaSpeedNotNether); ++ lavaInfinite = getBoolean("blocks.lava.infinite-source", lavaInfinite); ++ lavaInfiniteRequiredSources = getInt("blocks.lava.infinite-required-sources", lavaInfiniteRequiredSources); + } } 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 list = com.tuinity.tuinity.util.CachedLists.getTempGetEntitiesList(); diff --git a/patches/server/0014-lithium-enum_values.patch b/patches/server/0014-lithium-enum_values.patch index 706f62df..e6d53bbf 100644 --- a/patches/server/0014-lithium-enum_values.patch +++ b/patches/server/0014-lithium-enum_values.patch @@ -39,10 +39,10 @@ index 5d3bb5f393a1e0e4a2e8b9a466530a91279697a9..7f084e7f11a829c10d113c7fb39eec0b 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 862d54fdb9a0908d0c279e55437cf8ab7b9b55d3..a9a32ff9e44f31eeb52180777dffffcbef93bd83 100644 +index 615dc8586b692138446998bd6a1dc245d3c65c70..ddd9f3cca681b067515d8a8d217d03747c3352a3 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2585,10 +2585,12 @@ public abstract class EntityLiving extends Entity { +@@ -2591,10 +2591,12 @@ public abstract class EntityLiving extends Entity { } diff --git a/patches/server/0017-Item-stuck-sleep-config.patch b/patches/server/0017-Item-stuck-sleep-config.patch index 3a59afce..434d45b7 100644 --- a/patches/server/0017-Item-stuck-sleep-config.patch +++ b/patches/server/0017-Item-stuck-sleep-config.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Item stuck sleep config diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 0ea6d243dfafab2184147f365ded3f992d9eda61..a3b0fa6afdc47b1589be58e0ddd2e69455ad31fb 100644 +index 747f5085da9dd4c1614d5e9e1ea459b300d025b3..2001e364a2e1d0657cb3395b5a2a56fa5dff6299 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -82,7 +82,7 @@ public class EntityItem extends Entity { diff --git a/patches/server/0025-Fix-lead-fall-dmg-config.patch b/patches/server/0025-Fix-lead-fall-dmg-config.patch index 8bb37b13..e8f5f600 100644 --- a/patches/server/0025-Fix-lead-fall-dmg-config.patch +++ b/patches/server/0025-Fix-lead-fall-dmg-config.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix lead fall dmg config diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 119abc84fadb6b011813ae8667a48c87feffcdc4..cc5d3fe169d02216a828a83be0f83f84c117cde9 100644 +index d224b1d0e224853e825486559938aed2c56c3981..0bca08dc6ffd367de7cffab0433900d6bfe555cf 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1290,6 +1290,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/patches/server/0034-Stop-wasting-resources-on-JsonList-get.patch b/patches/server/0034-Stop-wasting-resources-on-JsonList-get.patch index bab9d7b8..1ef598b9 100644 --- a/patches/server/0034-Stop-wasting-resources-on-JsonList-get.patch +++ b/patches/server/0034-Stop-wasting-resources-on-JsonList-get.patch @@ -55,10 +55,10 @@ index 4094ef76b7b05de1bfcc28aa0ef13033abadeb7e..0224a6d0e47e836fa485b39e7b4ce5b8 Throwable throwable = null; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ce7724a1797a992561d074f85c7bdef71b4dbe78..1a61ff4c7d532c39883aedba90f17ef81b1a9409 100644 +index d56ca11a30faeb4f1346b853f50c25f46e3bd49e..d52985bc8236ba78b9530b4465e1f6de895f3b72 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -636,6 +636,7 @@ public abstract class PlayerList { +@@ -638,6 +638,7 @@ public abstract class PlayerList { GameProfileBanEntry gameprofilebanentry; if (getProfileBans().isBanned(gameprofile) && (gameprofilebanentry = getProfileBans().get(gameprofile)) != null) { // Paper end @@ -66,7 +66,7 @@ index ce7724a1797a992561d074f85c7bdef71b4dbe78..1a61ff4c7d532c39883aedba90f17ef8 chatmessage = new ChatMessage("multiplayer.disconnect.banned.reason", new Object[]{gameprofilebanentry.getReason()}); if (gameprofilebanentry.getExpires() != null) { -@@ -643,7 +644,11 @@ public abstract class PlayerList { +@@ -645,7 +646,11 @@ public abstract class PlayerList { } // return chatmessage; diff --git a/patches/server/0037-Respect-PlayerKickEvent-leaveMessage.patch b/patches/server/0037-Respect-PlayerKickEvent-leaveMessage.patch index 1470fb9a..2f638601 100644 --- a/patches/server/0037-Respect-PlayerKickEvent-leaveMessage.patch +++ b/patches/server/0037-Respect-PlayerKickEvent-leaveMessage.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Respect PlayerKickEvent leaveMessage diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 81ac7dae3b51c67a1a279fdb96cd1d50dd901f0b..c0fa18179cdd5367a5b346d7f795f969c0a6e2b7 100644 +index 10139becc33a483a81858dcad2d07571e48ea43e..c258b5b1cc6d5f7fae49c311865e9506d0164c6a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -323,7 +323,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -17,7 +17,7 @@ index 81ac7dae3b51c67a1a279fdb96cd1d50dd901f0b..c0fa18179cdd5367a5b346d7f795f969 this.networkManager.stopReading(); MinecraftServer minecraftserver = this.minecraftServer; NetworkManager networkmanager = this.networkManager; -@@ -1681,6 +1681,11 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1691,6 +1691,11 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(IChatBaseComponent ichatbasecomponent) { @@ -29,7 +29,7 @@ index 81ac7dae3b51c67a1a279fdb96cd1d50dd901f0b..c0fa18179cdd5367a5b346d7f795f969 // CraftBukkit start - Rarely it would send a disconnect line twice if (this.processedDisconnect) { return; -@@ -1696,7 +1701,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1706,7 +1711,7 @@ public class PlayerConnection implements PacketListenerPlayIn { */ this.player.p(); @@ -39,7 +39,7 @@ index 81ac7dae3b51c67a1a279fdb96cd1d50dd901f0b..c0fa18179cdd5367a5b346d7f795f969 this.minecraftServer.getPlayerList().sendMessage(CraftChatMessage.fromString(quitMessage)); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 1a61ff4c7d532c39883aedba90f17ef81b1a9409..0b7dc3d88a34c32e36ebb14f1e8b463664860f95 100644 +index d52985bc8236ba78b9530b4465e1f6de895f3b72..6b7209a4a5128a2fa64442365a4e53c7cf866621 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -499,6 +499,11 @@ public abstract class PlayerList { @@ -54,7 +54,7 @@ index 1a61ff4c7d532c39883aedba90f17ef81b1a9409..0b7dc3d88a34c32e36ebb14f1e8b4636 WorldServer worldserver = entityplayer.getWorldServer(); entityplayer.a(StatisticList.LEAVE_GAME); -@@ -587,7 +592,7 @@ public abstract class PlayerList { +@@ -589,7 +594,7 @@ public abstract class PlayerList { cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity()); // CraftBukkit end diff --git a/patches/server/0040-Optimize-whitelist-command-for-multiple-additions-re.patch b/patches/server/0040-Optimize-whitelist-command-for-multiple-additions-re.patch index 415c2811..07157d6c 100644 --- a/patches/server/0040-Optimize-whitelist-command-for-multiple-additions-re.patch +++ b/patches/server/0040-Optimize-whitelist-command-for-multiple-additions-re.patch @@ -185,10 +185,10 @@ index 0224a6d0e47e836fa485b39e7b4ce5b83ea554bf..fe578d306575bbdc8ca4a993a648e889 return (String[]) this.d.keySet().toArray(new String[this.d.size()]); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index eb9d61b5e76c7b40faebfa8308cd3348b7e31fac..ba62404dae5b4c8af41921eb7a3fbcf9b2e0b58e 100644 +index e990a39d97cb1427dd2ce43bdc79fb84e93e9c4b..c7031706ea51dd6d8c22c10fab2ce3154daac361 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1967,6 +1967,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant recipeType : IRegistry.RECIPE_TYPE) { this.recipes.put(recipeType, new Object2ObjectLinkedOpenHashMap<>()); diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 3adb29f004d2fee36f3ee9b21ee5417e84b64837..376ab1d4c4f729639714b5eeedec514a2176531a 100644 +index 5a62ac72edc49cd032cd02fa8d007959517d063b..391421214d2fcc0cb38ac42d053cc1c57545fa73 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -570,6 +570,7 @@ public final class ItemStack { +@@ -575,6 +575,7 @@ public final class ItemStack { return !this.e() ? this.doMaterialsMatch(itemstack) : !itemstack.isEmpty() && this.getItem() == itemstack.getItem(); } diff --git a/patches/server/0058-Configurable-BlockPhysicsEvent.patch b/patches/server/0058-Configurable-BlockPhysicsEvent.patch index 8feda2cd..fa3df713 100644 --- a/patches/server/0058-Configurable-BlockPhysicsEvent.patch +++ b/patches/server/0058-Configurable-BlockPhysicsEvent.patch @@ -8,10 +8,10 @@ Paper does alleviate this quite well by only firing if plugins are listening, bu This patch implements a hard toggle for the event. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ba62404dae5b4c8af41921eb7a3fbcf9b2e0b58e..571483166c69079961c3297e1b40265b62f34217 100644 +index c7031706ea51dd6d8c22c10fab2ce3154daac361..f4ca05cc77ae5ea47db51770f316413fdf8a728b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1410,7 +1410,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant +Date: Wed, 23 Dec 2020 08:42:18 +0200 +Subject: [PATCH] Configurable enchanting table tick + +Also don't tick blockentity beehive if there are no bees in it. +This patch is a leftover from the original tile entity optimisations, which was majorly flawed. + +diff --git a/src/main/java/net/minecraft/server/TileEntityBeehive.java b/src/main/java/net/minecraft/server/TileEntityBeehive.java +index a60e0872d51aeb330bd5334e35f18ad0ed63834e..70239fa5ac05464606ad917b3c3498156c12c536 100644 +--- a/src/main/java/net/minecraft/server/TileEntityBeehive.java ++++ b/src/main/java/net/minecraft/server/TileEntityBeehive.java +@@ -286,6 +286,7 @@ public class TileEntityBeehive extends TileEntity implements ITickable { + + @Override + public void tick() { ++ if (this.bees.size() == 0) { return; } // Yatopia - TE optimizations + if (!this.world.isClientSide) { + this.y(); + BlockPosition blockposition = this.getPosition(); +diff --git a/src/main/java/net/minecraft/server/TileEntityEnchantTable.java b/src/main/java/net/minecraft/server/TileEntityEnchantTable.java +index c9066cb5f51cb2ad078aca3019e1df557062d286..46b18b6364645106b00bd4f1d721b8cd704ecabf 100644 +--- a/src/main/java/net/minecraft/server/TileEntityEnchantTable.java ++++ b/src/main/java/net/minecraft/server/TileEntityEnchantTable.java +@@ -43,6 +43,7 @@ public class TileEntityEnchantTable extends TileEntity implements INamableTileEn + + @Override + public void tick() { ++ if (!org.yatopiamc.yatopia.server.YatopiaConfig.shouldTickEnchantingTables) { return; } // Yatopia - TE optimizations + this.j = this.i; + this.l = this.k; + EntityHuman entityhuman = this.world.a((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D, 3.0D, false); +diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +index 34b5a087d1d5d84b193adbd756add060a2d49354..2d4fb0a4664578f8d5c23db854eb8f2764724940 100644 +--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java ++++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +@@ -283,4 +283,9 @@ public class YatopiaConfig { + checkVehicleMovedQuickly = getBoolean("settings.checks.vehicle-moved-quickly", checkVehicleMovedQuickly); + checkVehicleMovedWrongly = getBoolean("settings.checks.vehicle-moved-wrongly", checkVehicleMovedWrongly); + } ++ ++ public static boolean shouldTickEnchantingTables = false; ++ private static void tickEnchantingTables() { ++ shouldTickEnchantingTables = getBoolean("settings.tick.enchanting-tables", shouldTickEnchantingTables); ++ } + } diff --git a/patches/server/0065-Don-t-unnecessarily-copy-the-passenger-list.patch b/patches/server/0065-Don-t-unnecessarily-copy-the-passenger-list.patch new file mode 100644 index 00000000..b138dc8b --- /dev/null +++ b/patches/server/0065-Don-t-unnecessarily-copy-the-passenger-list.patch @@ -0,0 +1,50 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ivan Pekov +Date: Wed, 23 Dec 2020 09:55:43 +0200 +Subject: [PATCH] Don't unnecessarily copy the passenger list + +It is only copied if it's needed, and that is in EntityTrackerEntry, when we've detected a change. + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 51c4ff1bd6948ab46d723c37af39c76cdf662be5..a48b56839a3516baa7d3373295b259a24012109e 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -3282,7 +3282,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + } + + public List getPassengers() { ++ // Yatopia start - don't copy passengers list ++ /* + return (List) (this.passengers.isEmpty() ? Collections.emptyList() : Lists.newArrayList(this.passengers)); ++ */ ++ return this.passengers.isEmpty() ? Collections.emptyList() : this.passengers; ++ // Yatopia end + } + + public boolean w(Entity entity) { +diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java +index 228236bce14bfdf930570b453862dcfaae9e4823..0be11d1263d84b270c25ec8249832164dc75409d 100644 +--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java ++++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java +@@ -78,7 +78,7 @@ public class EntityTrackerEntry { + List list = this.tracker.getPassengers(); + + if (!list.equals(this.p)) { +- this.p = list; ++ this.p = com.google.common.collect.ImmutableList.copyOf(list); // Yatopia - only copy list if something has changed + this.broadcastIncludingSelf(new PacketPlayOutMount(this.tracker)); // CraftBukkit + } + +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index 6c39796e672a6412e85f69a6a3dfdb1037e51d30..eba7a33cb0c2f0bc18eda709dd1c2b341ddb36df 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -1430,7 +1430,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { + this.chunkCheck(entity); + } finally { timer.stopTiming(); } // Paper - timings + if (entity.inChunk) { +- Iterator iterator = entity.getPassengers().iterator(); ++ Iterator iterator = new java.util.ArrayList<>(entity.getPassengers()).iterator(); // Yatopia - copy the passengers list here too + + while (iterator.hasNext()) { + Entity entity1 = (Entity) iterator.next();