From 89229b49666832e35bbf97fa6871f3133378ec4a Mon Sep 17 00:00:00 2001 From: Ivan Pekov Date: Wed, 23 Dec 2020 08:50:22 +0200 Subject: [PATCH 1/6] GH-322: Return end gateways do not teleport players back to the main end island Fixes #322 Instead using the idea suggested, I dropped the patch and reimplemented some of the smol stuff in a new one. --- PATCHES.md | 2 +- .../0063-Tile-Entity-optimizations.patch | 0 ...3-Configurable-enchanting-table-tick.patch | 46 +++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) rename patches/{ => removed}/server/0063-Tile-Entity-optimizations.patch (100%) create mode 100644 patches/server/0063-Configurable-enchanting-table-tick.patch diff --git a/PATCHES.md b/PATCHES.md index 26540867..29bbc3b0 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -43,6 +43,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 | | @@ -124,7 +125,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/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/0063-Configurable-enchanting-table-tick.patch b/patches/server/0063-Configurable-enchanting-table-tick.patch new file mode 100644 index 00000000..412fb54d --- /dev/null +++ b/patches/server/0063-Configurable-enchanting-table-tick.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ivan Pekov +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); ++ } + } From 5c8274bd2fa99893b27f4532306d415f6c7ceaad Mon Sep 17 00:00:00 2001 From: Ivan Pekov Date: Wed, 23 Dec 2020 09:46:56 +0200 Subject: [PATCH 2/6] 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 Date: Wed, 23 Dec 2020 10:01:47 +0200 Subject: [PATCH 3/6] Don't unnecessarily copy the passenger list --- PATCHES.md | 1 + ...nnecessarily-copy-the-passenger-list.patch | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 patches/server/0065-Don-t-unnecessarily-copy-the-passenger-list.patch diff --git a/PATCHES.md b/PATCHES.md index 0ece1888..dbc2f4a6 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -58,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 | | 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..7a4c358b --- /dev/null +++ b/patches/server/0065-Don-t-unnecessarily-copy-the-passenger-list.patch @@ -0,0 +1,37 @@ +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 2bacecb9cee2f93b142d63b9a79641d7bac8f868..8ba05d0dadf34baa046962cbff71a2fcfd1471d7 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -3284,7 +3284,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 + } + From 0a4af12efb42c69e5820681c0a2b4f93a81ce5a7 Mon Sep 17 00:00:00 2001 From: Ivan Pekov Date: Wed, 23 Dec 2020 10:35:14 +0200 Subject: [PATCH 4/6] Actually register the TPSBar command This manouver's gonna cost us 51 light years --- .../server/0001-Yatopia-Server-Fixes.patch | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index c3b787de..2ed8623e 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -142,10 +142,18 @@ index 2291135eaef64c403183724cb6e413cd7e472672..6fcc7ed7c129e6a33386d65b37cbba4a 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 +index cabce1a8ba5db56495628edd9bc796aee7a53356..9754a9eac48c50efdefdceefbb4386bf0df583dd 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 { +@@ -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 { } @@ -153,6 +161,29 @@ index cabce1a8ba5db56495628edd9bc796aee7a53356..6cf74a3a036e6551cb1400fa68592a19 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 From ef7a12601ff4ac767255bb867feb8824adef6077 Mon Sep 17 00:00:00 2001 From: Ivan Pekov Date: Thu, 24 Dec 2020 09:14:21 +0200 Subject: [PATCH 5/6] Updated Upstream and Sidestream(s) (Tuinity/EMC/Purpur/AirplaneLite) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: 86b20d4 Updated Upstream (Paper) afd0643 Merge branch 'master' of https://github.com/Spottedleaf/Tuinity into ver/1.16.4 d1db107 Updated Upstream (Paper) EMC Changes: d32f7b26 Updated Paper 0650e984 Only retrack passengers if there are passengers in them Purpur Changes: 5758335 Configurable spawn reinforcements attribute 8849c20 Fix afk broadcast stripped colors fe73b19 Updated Upstream (Paper) f3dccd1 [ci-skip] Specify UTF-8 for Javadoc and JavaCompile 7ad2c5d [ci-skip] More attributes work 19ec1c3 [ci-skip] Uh.. I dont even know.. 1cb7e4e Add PlayerBookTooLargeEvent 4e8a150 Updated Upstream (Paper) 8cabaae Updated Upstream (Paper & Tuinity) AirplaneLite Changes: 20b8c79 Allow gradle wrapper in gitignore 6cd80e9 Updated Upstream (Tuinity) --- AirplaneLite | 2 +- Empirecraft | 2 +- PATCHES.md | 1 + Purpur | 2 +- Tuinity | 2 +- patches/Purpur/server.txt | 2 +- patches/server/0001-Yatopia-Server-Fixes.patch | 10 +++++++--- patches/server/0007-Yatopia-configuration.patch | 2 +- .../0008-Per-entity-type-collision-settings.patch | 4 ++-- patches/server/0014-lithium-enum_values.patch | 4 ++-- patches/server/0017-Item-stuck-sleep-config.patch | 2 +- patches/server/0025-Fix-lead-fall-dmg-config.patch | 2 +- .../0037-Respect-PlayerKickEvent-leaveMessage.patch | 6 +++--- patches/server/0047-Configurable-flight-checks.patch | 2 +- ...ly-optimize-recipe-lookups-in-CraftingManager.patch | 4 ++-- patches/server/0059-Infinity-No-Arrows.patch | 2 +- patches/server/0061-Configurable-movement-checks.patch | 6 +++--- .../server/0062-Use-faster-random-implementation.patch | 2 +- ...5-Don-t-unnecessarily-copy-the-passenger-list.patch | 4 ++-- 19 files changed, 33 insertions(+), 28 deletions(-) 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 dbc2f4a6..3b67307a 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -78,6 +78,7 @@ # Patches | 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 | | 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 9de7313f..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-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 +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/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index 2ed8623e..9173a9fc 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -197,7 +197,7 @@ index 86f1cfe454ea0a989775b49a6b88375c766ef647..da53af61d1171db3c167c6e007adf953 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 @@ -558,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..512f42b6fcbf7c09c1473c5ae529d5d1a48a6cf5 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 @@ @@ -577,7 +577,7 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..512f42b6fcbf7c09c1473c5ae529d5d1 import static net.pl3x.purpur.PurpurConfig.log; public class PurpurWorldConfig { -@@ -56,4 +64,163 @@ 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)); } @@ -736,9 +736,13 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..512f42b6fcbf7c09c1473c5ae529d5d1 + + 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/0007-Yatopia-configuration.patch b/patches/server/0007-Yatopia-configuration.patch index 6a3ecdac..466bd170 100644 --- a/patches/server/0007-Yatopia-configuration.patch +++ b/patches/server/0007-Yatopia-configuration.patch @@ -47,7 +47,7 @@ index 3ee8d31c453105eca7b96bede39a9ebbf40e1c2c..0a9f03526abf0638ada15d9810b94988 this.setAllowFlight(dedicatedserverproperties.allowFlight); this.setResourcePack(dedicatedserverproperties.resourcePack, this.ba()); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 1b646a7bb1588ebff5b4fdb12bd3016084041e77..d37143396cac0bc8980b03fe0e5e31cc4ecf08ff 100644 +index 36c6968ac03872004d46e70f38c5a515621b8eb1..1597eec51d69f6fc136eda5e1b6bdcdb3fceeb69 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/0008-Per-entity-type-collision-settings.patch b/patches/server/0008-Per-entity-type-collision-settings.patch index c6c72100..67d58fd8 100644 --- a/patches/server/0008-Per-entity-type-collision-settings.patch +++ b/patches/server/0008-Per-entity-type-collision-settings.patch @@ -59,10 +59,10 @@ index 537456a7427cddd6783f5b5d8ee2d655668c4c53..004184a7c3da4f72f68a5fd9b4dd5abd } \ 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 d37143396cac0bc8980b03fe0e5e31cc4ecf08ff..862d54fdb9a0908d0c279e55437cf8ab7b9b55d3 100644 +index 1597eec51d69f6fc136eda5e1b6bdcdb3fceeb69..615dc8586b692138446998bd6a1dc245d3c65c70 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2864,7 +2864,7 @@ public abstract class EntityLiving extends Entity { +@@ -2870,7 +2870,7 @@ public abstract class EntityLiving extends Entity { // Paper - end don't run getEntities if we're not going to use its result // Tuinity start - reduce memory allocation from collideNearby List 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/0037-Respect-PlayerKickEvent-leaveMessage.patch b/patches/server/0037-Respect-PlayerKickEvent-leaveMessage.patch index 10d3e627..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(); diff --git a/patches/server/0047-Configurable-flight-checks.patch b/patches/server/0047-Configurable-flight-checks.patch index 42b75903..6995763a 100644 --- a/patches/server/0047-Configurable-flight-checks.patch +++ b/patches/server/0047-Configurable-flight-checks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable flight checks diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index c0fa18179cdd5367a5b346d7f795f969c0a6e2b7..86eb4b768eb52f0ff9371c65260c633f818e91af 100644 +index c258b5b1cc6d5f7fae49c311865e9506d0164c6a..687ebda8f3993de460ad3100a0aa7fe648b2582c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -179,7 +179,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/patches/server/0048-Heavily-optimize-recipe-lookups-in-CraftingManager.patch b/patches/server/0048-Heavily-optimize-recipe-lookups-in-CraftingManager.patch index ef79a945..380fb622 100644 --- a/patches/server/0048-Heavily-optimize-recipe-lookups-in-CraftingManager.patch +++ b/patches/server/0048-Heavily-optimize-recipe-lookups-in-CraftingManager.patch @@ -152,10 +152,10 @@ index 58ecbe1e20581dc9e78cdd2f4ece29cfa014da8a..3da86dc56f33e4f1900f6b4f66ca6696 for (Recipes 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/0059-Infinity-No-Arrows.patch b/patches/server/0059-Infinity-No-Arrows.patch index 7564937f..88bdff1a 100644 --- a/patches/server/0059-Infinity-No-Arrows.patch +++ b/patches/server/0059-Infinity-No-Arrows.patch @@ -18,7 +18,7 @@ index 0046dedd5e5f503ee680b89ec7e3dca681c26686..4412d465afcab66a1922217c931e73dc } } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 512f42b6fcbf7c09c1473c5ae529d5d1a48a6cf5..7d0e889d2533e056e46d6842e427b077c3a74534 100644 +index 5f0491a7cd6bb7e94cc5652be24d9bc111bb8035..66d3b52837b0512b7277c4d1732105ec407bdfa8 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -176,10 +176,12 @@ public class PurpurWorldConfig { diff --git a/patches/server/0061-Configurable-movement-checks.patch b/patches/server/0061-Configurable-movement-checks.patch index 51c62ba0..475285a9 100644 --- a/patches/server/0061-Configurable-movement-checks.patch +++ b/patches/server/0061-Configurable-movement-checks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable movement checks diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 86eb4b768eb52f0ff9371c65260c633f818e91af..7353cf860245dfa051f93a8d32a9c3b14b063af2 100644 +index 687ebda8f3993de460ad3100a0aa7fe648b2582c..74ddd98008490ed10952fe3847e83e51aa464132 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -443,7 +443,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -26,7 +26,7 @@ index 86eb4b768eb52f0ff9371c65260c633f818e91af..7353cf860245dfa051f93a8d32a9c3b1 flag1 = true; PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), Math.sqrt(d10)); } -@@ -1155,7 +1155,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1165,7 +1165,7 @@ public class PlayerConnection implements PacketListenerPlayIn { if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean(GameRules.DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isGliding())) { float f2 = this.player.isGliding() ? 300.0F : 100.0F; @@ -35,7 +35,7 @@ index 86eb4b768eb52f0ff9371c65260c633f818e91af..7353cf860245dfa051f93a8d32a9c3b1 // CraftBukkit end PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", this.player.getDisplayName().getString(), d7, d8, d9); this.a(this.player.locX(), this.player.locY(), this.player.locZ(), this.player.yaw, this.player.pitch); -@@ -1221,7 +1221,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1231,7 +1231,7 @@ public class PlayerConnection implements PacketListenerPlayIn { d11 = d7 * d7 + d8 * d8 + d9 * d9; boolean flag1 = false; diff --git a/patches/server/0062-Use-faster-random-implementation.patch b/patches/server/0062-Use-faster-random-implementation.patch index 4bb724b1..ac349ba0 100644 --- a/patches/server/0062-Use-faster-random-implementation.patch +++ b/patches/server/0062-Use-faster-random-implementation.patch @@ -58,7 +58,7 @@ index 38dc6086d18951e065d4048d1d8eee288c5c5fd1..4e094f0e1117cecbd39be645997eb9d3 this.f = ShapeDetectorBuilder.a().a(" ", " ", " ", " # ", " ", " ", " ").a(" ", " ", " ", " # ", " ", " ", " ").a(" ", " ", " ", " # ", " ", " ", " ").a(" ### ", " # # ", "# #", "# # #", "# #", " # # ", " ### ").a(" ", " ### ", " ##### ", " ##### ", " ##### ", " ### ", " ").a('#', ShapeDetectorBlock.a(BlockPredicate.a(Blocks.BEDROCK))).b(); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index cc5d3fe169d02216a828a83be0f83f84c117cde9..2bacecb9cee2f93b142d63b9a79641d7bac8f868 100644 +index 0bca08dc6ffd367de7cffab0433900d6bfe555cf..51c4ff1bd6948ab46d723c37af39c76cdf662be5 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -61,7 +61,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke 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 index 7a4c358b..13c9af64 100644 --- a/patches/server/0065-Don-t-unnecessarily-copy-the-passenger-list.patch +++ b/patches/server/0065-Don-t-unnecessarily-copy-the-passenger-list.patch @@ -6,10 +6,10 @@ 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 2bacecb9cee2f93b142d63b9a79641d7bac8f868..8ba05d0dadf34baa046962cbff71a2fcfd1471d7 100644 +index 51c4ff1bd6948ab46d723c37af39c76cdf662be5..a48b56839a3516baa7d3373295b259a24012109e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -3284,7 +3284,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -3282,7 +3282,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public List getPassengers() { From aad302fa99c981149b013be66ae520165660a6af Mon Sep 17 00:00:00 2001 From: Ivan Pekov Date: Thu, 24 Dec 2020 10:57:06 +0200 Subject: [PATCH 6/6] Copy the passengers list in entityJoinedWorld too --- ...on-t-unnecessarily-copy-the-passenger-list.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 index 13c9af64..b138dc8b 100644 --- a/patches/server/0065-Don-t-unnecessarily-copy-the-passenger-list.patch +++ b/patches/server/0065-Don-t-unnecessarily-copy-the-passenger-list.patch @@ -35,3 +35,16 @@ index 228236bce14bfdf930570b453862dcfaae9e4823..0be11d1263d84b270c25ec8249832164 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();