diff --git a/AirplaneLite b/AirplaneLite index fd35d6a7..efe57d76 160000 --- a/AirplaneLite +++ b/AirplaneLite @@ -1 +1 @@ -Subproject commit fd35d6a7f218d33c6792d92f52f09f13e1d7d920 +Subproject commit efe57d76f967e345cab34f28e305ead78bc96e0e diff --git a/Akarin b/Akarin index b53f48a8..3950fd57 160000 --- a/Akarin +++ b/Akarin @@ -1 +1 @@ -Subproject commit b53f48a85baee0c8a26c26e0255d24558ed6f510 +Subproject commit 3950fd57413a0aceb3369e17be981ceec0be140a diff --git a/Empirecraft b/Empirecraft index 90b678ea..1d0cc885 160000 --- a/Empirecraft +++ b/Empirecraft @@ -1 +1 @@ -Subproject commit 90b678eaa1e29ca6c1de226b0278e533ad9aa4f8 +Subproject commit 1d0cc885140821355a749eb69c53252a8e930ff0 diff --git a/PATCHES.md b/PATCHES.md index aabf062e..0bfd2a83 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -40,8 +40,6 @@ # Patches | server | Avoid double I/O operation on load player file | ㄗㄠˋ ㄑㄧˊ | | | server | Barrels and enderchests 6 rows | William Blake Galbreath | | | server | Brandings | YatopiaMC | | -| server | Concurrent loadedChunkMap | Paul Sauve | | -| server | Concurrent visibleChunks and updatingChunks | Paul Sauve | | | server | Config migration: disable saving projectiles to disk -> | jmp | | | server | Configurable BlockPhysicsEvent | Mykyta Komarnytskyy | | | server | Configurable criterion triggers | Mykyta Komarnytskyy | | @@ -56,6 +54,7 @@ # Patches | server | Disable MapTest | epserv | | | api | Disable reload command | Ivan Pekov | | | server | Disable the Snooper | Sotr | | +| 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 wake up entities when damage event is cancelled | Phoenix616 | | @@ -82,7 +81,6 @@ # 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 | MC-4 Fix - Item position desync | William Blake Galbreath | | | api | Modify POM | YatopiaMC | | | server | Modify POM | YatopiaMC | | | server | Modify default configs | tr7zw | | @@ -103,7 +101,6 @@ # Patches | server | PaperPR - Add hex color code support for console logging | Esophose | | | server | PaperPR - Projectile load/save limit per chunk | jmp | | | server | PaperPR: Fix harming potion dupe | PepperCode1 | | -| server | PaperPR: Fix merging spawning values | Mariell Hoversholm | | | server | Per entity (type) collision settings | MrIvanPlays | tr7zw | | server | Persistent TileEntity Lore and DisplayName | jmp | | | api | PlayerAttackEntityEvent | Ivan Pekov | | @@ -112,9 +109,9 @@ # Patches | server | ProxyForwardDataEvent | Ivan Pekov | | | server | Purpur config files | William Blake Galbreath | | | server | Redirect Configs | tr7zw | | +| server | Reduce projectile chunk loading | Paul Sauve | | | server | Remove some streams and object allocations | Phoenix616 | | | server | Respect PlayerKickEvent leaveMessage | Ivan Pekov | | -| server | Send more packets immediately | MrIvanPlays | | | server | Shutdown Bootstrap thread pool | foss-mc | | | server | Signs allow color codes | William Blake Galbreath | | | server | Signs editable on right click | William Blake Galbreath | | @@ -122,6 +119,7 @@ # Patches | server | Skip events if there's no listeners | William Blake Galbreath | | | server | Smarter statistics ticking | Mykyta Komarnytskyy | | | server | Snowman drop and put back pumpkin | William Blake Galbreath | | +| server | Spread out and optimise player list ticks | James Lyne | | | server | Squid EAR immunity | William Blake Galbreath | | | server | Stop squids floating on top of water | William Blake Galbreath | | | server | Stop wasting resources on JsonList#get | Ivan Pekov | | diff --git a/Purpur b/Purpur index 7174d63c..391f9add 160000 --- a/Purpur +++ b/Purpur @@ -1 +1 @@ -Subproject commit 7174d63c4eeec9acb87e5047813ccbef766fb9bf +Subproject commit 391f9addfd4be14e6f8b97c8ed8ce9f90919811d diff --git a/Tuinity b/Tuinity index fea2c2be..69e6a4cb 160000 --- a/Tuinity +++ b/Tuinity @@ -1 +1 @@ -Subproject commit fea2c2bed6f5a419626effea51179c8611cfe83f +Subproject commit 69e6a4cbf368ecbe167afb983666ccdf1463108a diff --git a/patches/AirplaneLite/server.txt b/patches/AirplaneLite/server.txt index 3f0bee40..e667ee12 100644 --- a/patches/AirplaneLite/server.txt +++ b/patches/AirplaneLite/server.txt @@ -1 +1 @@ -AirplaneLite-MC-Dev-Fixes&AirplaneLite-Data-Structs&Strip-raytracing-for-EntityLiving-hasLineOfSight&Simpler-ShapelessRecipes-comparison-for-Vanilla&Use-unmodifiableMap-instead-of-making-copy&DataBits-slight-optimization&Concurrent-loadedChunkMap&Concurrent-visibleChunks-and-updatingChunks&Swap-priority-of-checks-in-chunk-ticking \ No newline at end of file +AirplaneLite-MC-Dev-Fixes&AirplaneLite-Data-Structs&Strip-raytracing-for-EntityLiving-hasLineOfSight&Simpler-ShapelessRecipes-comparison-for-Vanilla&Use-unmodifiableMap-instead-of-making-copy&DataBits-slight-optimization&Swap-priority-of-checks-in-chunk-ticking&Reduce-projectile-chunk-loading \ No newline at end of file diff --git a/patches/Purpur/server.txt b/patches/Purpur/server.txt index 226cf417..a14ab4d7 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&MC-4-Fix-Item-position-desync&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- \ 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-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 diff --git a/patches/api/0001-Yatopia-API-Bundle.patch b/patches/api/0001-Yatopia-API-Bundle.patch index c6c078fd..deff16a7 100644 --- a/patches/api/0001-Yatopia-API-Bundle.patch +++ b/patches/api/0001-Yatopia-API-Bundle.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Yatopia API Bundle 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 464b2161f42a9a3969336820bc793274f4d6e942..a1c7fdcf34519c4781fcd8190d7c2ee787448694 100644 +index fecd7b14d317f55eb1ce7b5c6af9913917971427..6df897ed32a94df4a06e1d5ac3d749e6a360ab2f 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1808,4 +1808,15 @@ public final class Bukkit { +@@ -1817,4 +1817,15 @@ public final class Bukkit { public static Server.Spigot spigot() { return server.spigot(); } @@ -26,10 +26,10 @@ index 464b2161f42a9a3969336820bc793274f4d6e942..a1c7fdcf34519c4781fcd8190d7c2ee7 + // Purpur end } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 7a51edbde474bf610cb5928de4b1bbe2edf34638..720b39459382511cf23ee8af431f0fc4a691358c 100644 +index b45ad8df8b7a44c9e6d12326e5ea85e8d166a16c..40d342ef1a618b7d85731b238b0344402e551251 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1483,6 +1483,58 @@ public interface Server extends PluginMessageRecipient { +@@ -1490,6 +1490,58 @@ public interface Server extends PluginMessageRecipient { } // Tuinity end - add config to timings report @@ -88,7 +88,7 @@ index 7a51edbde474bf610cb5928de4b1bbe2edf34638..720b39459382511cf23ee8af431f0fc4 /** * Sends the component to the player * -@@ -1583,4 +1635,13 @@ public interface Server extends PluginMessageRecipient { +@@ -1590,4 +1642,13 @@ public interface Server extends PluginMessageRecipient { @NotNull com.destroystokyo.paper.entity.ai.MobGoals getMobGoals(); // Paper end diff --git a/patches/api/0005-Add-last-tick-time-API.patch b/patches/api/0005-Add-last-tick-time-API.patch index 833f1179..01701db7 100644 --- a/patches/api/0005-Add-last-tick-time-API.patch +++ b/patches/api/0005-Add-last-tick-time-API.patch @@ -7,10 +7,10 @@ Original patch by: Co-authored-by: tr7zw diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index a1c7fdcf34519c4781fcd8190d7c2ee787448694..63419981b73173c3f0bf798f265934488a69973c 100644 +index 6df897ed32a94df4a06e1d5ac3d749e6a360ab2f..7b704b5841aa2f212b70719cf9bd79b4fb21fcf0 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1819,4 +1819,14 @@ public final class Bukkit { +@@ -1828,4 +1828,14 @@ public final class Bukkit { return server.isLagging(); } // Purpur end @@ -26,10 +26,10 @@ index a1c7fdcf34519c4781fcd8190d7c2ee787448694..63419981b73173c3f0bf798f26593448 + // Yatopia end } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 720b39459382511cf23ee8af431f0fc4a691358c..0dadd5a215c9308e9833db75003361d47bd0c91b 100644 +index 40d342ef1a618b7d85731b238b0344402e551251..2f86ada4a487a6d59fa8b173c8339dcdda65cb30 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1644,4 +1644,23 @@ public interface Server extends PluginMessageRecipient { +@@ -1651,4 +1651,23 @@ public interface Server extends PluginMessageRecipient { */ boolean isLagging(); // Purpur end diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index 2ec769b9..2339e4b5 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -4,57 +4,6 @@ Date: Sun, 25 Oct 2020 12:23:35 -0500 Subject: [PATCH] Yatopia-Server-Fixes -diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java -index 8725b5aab62b2b613608769cb0eefc36571112d9..961aa10e53d9630f34057389e3383da5074092ac 100644 ---- a/src/main/java/com/destroystokyo/paper/Metrics.java -+++ b/src/main/java/com/destroystokyo/paper/Metrics.java -@@ -581,7 +581,7 @@ public class Metrics { - boolean logFailedRequests = config.getBoolean("logFailedRequests", false); - // Only start Metrics, if it's enabled in the config - if (config.getBoolean("enabled", true)) { -- Metrics metrics = new Metrics("Tuinity", serverUUID, logFailedRequests, Bukkit.getLogger()); // Tuinity - we have our own bstats page -+ Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger()); // Tuinity - we have our own bstats page // Purpur - - metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> { - String minecraftVersion = Bukkit.getVersion(); -@@ -590,8 +590,8 @@ public class Metrics { - })); - - metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size())); -- metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() || PaperConfig.isProxyOnlineMode() ? "online" : "offline")); -- metrics.addCustomChart(new Metrics.SimplePie("tuinity_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Tuinity - we have our own bstats page -+ metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (PaperConfig.isProxyOnlineMode() ? "bungee" : "offline"))); // Purpur -+ metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Tuinity - we have our own bstats page // Purpur - - metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> { - Map> map = new HashMap<>(); -diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java.rej b/src/main/java/com/destroystokyo/paper/Metrics.java.rej -deleted file mode 100644 -index 911bc90f4b97d176dd09de6ff4ae041b55f29cec..0000000000000000000000000000000000000000 ---- a/src/main/java/com/destroystokyo/paper/Metrics.java.rej -+++ /dev/null -@@ -1,21 +0,0 @@ --diff a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java (rejected hunks) --@@ -581,7 +581,7 @@ public class Metrics { -- boolean logFailedRequests = config.getBoolean("logFailedRequests", false); -- // Only start Metrics, if it's enabled in the config -- if (config.getBoolean("enabled", true)) { --- Metrics metrics = new Metrics("Paper", serverUUID, logFailedRequests, Bukkit.getLogger()); --+ Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger()); // Purpur -- -- metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> { -- String minecraftVersion = Bukkit.getVersion(); --@@ -590,8 +590,8 @@ public class Metrics { -- })); -- -- metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size())); --- metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() || PaperConfig.isProxyOnlineMode() ? "online" : "offline")); --- metrics.addCustomChart(new Metrics.SimplePie("paper_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); --+ metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (PaperConfig.isProxyOnlineMode() ? "bungee" : "offline"))); // Purpur --+ metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Purpur -- -- metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> { -- Map> map = new HashMap<>(); diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java index fe7330fabe386966c2d203a190a00a785ea21be0..537456a7427cddd6783f5b5d8ee2d655668c4c53 100644 --- a/src/main/java/de/minebench/origami/OrigamiConfig.java @@ -175,111 +124,6 @@ index c3d129452b4f6ff2069bc066e594b1c632ceb0d4..00000000000000000000000000000000 - } - - public Behavior.Status a() { -diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index 65e5b15dc3bf83206438f67053afde6857c97daa..9dfb331652c00904c29d1c6e700f68cf0bce67e8 100644 ---- a/src/main/java/net/minecraft/server/Block.java -+++ b/src/main/java/net/minecraft/server/Block.java -@@ -225,6 +225,46 @@ public class Block extends BlockBase implements IMaterial { - - } - -+ // Purpur start -+ private static ItemStack applyDisplayNameAndLoreFromTile(ItemStack itemStack, TileEntity tile) { -+ if (itemStack.getItem() instanceof ItemBlock) { -+ if (tile != null && tile.getWorld() instanceof WorldServer && tile.getWorld().purpurConfig.persistentTileEntityDisplayNames) { -+ String name = tile.getPersistentDisplayName(); -+ NBTTagList lore = tile.getPersistentLore(); -+ if (tile instanceof INamableTileEntity) { -+ INamableTileEntity namedTile = (INamableTileEntity) tile; -+ if (namedTile.hasCustomName()) { -+ name = IChatBaseComponent.ChatSerializer.componentToJson(namedTile.getCustomName()); -+ } -+ } -+ -+ if (name != null || lore != null) { -+ NBTTagCompound display = itemStack.getSubTag("display"); -+ if (display == null) { -+ display = new NBTTagCompound(); -+ } -+ -+ if (name != null) { -+ display.set("Name", NBTTagString.create(name)); -+ } -+ if (lore != null) { -+ display.set("Lore", lore); -+ } -+ -+ NBTTagCompound tag = itemStack.getTag(); -+ if (tag == null) { -+ tag = new NBTTagCompound(); -+ } -+ tag.set("display", display); -+ -+ itemStack.setTag(tag); -+ } -+ } -+ } -+ return itemStack; -+ } -+ // Purpur end -+ - public static void a(World world, BlockPosition blockposition, ItemStack itemstack) { - if (!world.isClientSide && !itemstack.isEmpty() && world.getGameRules().getBoolean(GameRules.DO_TILE_DROPS)) { - float f = 0.5F; -diff --git a/src/main/java/net/minecraft/server/Block.java.rej b/src/main/java/net/minecraft/server/Block.java.rej -deleted file mode 100644 -index 371ae8819eb4f8e20bc765e09bfee9611f047595..0000000000000000000000000000000000000000 ---- a/src/main/java/net/minecraft/server/Block.java.rej -+++ /dev/null -@@ -1,48 +0,0 @@ --diff a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java (rejected hunks) --@@ -224,6 +226,46 @@ public class Block extends BlockBase implements IMaterial { -- -- } -- --+ // Purpur start --+ private static ItemStack applyDisplayNameAndLoreFromTile(ItemStack itemStack, TileEntity tile) { --+ if (itemStack.getItem() instanceof ItemBlock) { --+ if (tile != null && tile.getWorld() instanceof WorldServer && tile.getWorld().purpurConfig.persistentTileEntityDisplayNames) { --+ String name = tile.getPersistentDisplayName(); --+ NBTTagList lore = tile.getPersistentLore(); --+ if (tile instanceof INamableTileEntity) { --+ INamableTileEntity namedTile = (INamableTileEntity) tile; --+ if (namedTile.hasCustomName()) { --+ name = IChatBaseComponent.ChatSerializer.componentToJson(namedTile.getCustomName()); --+ } --+ } --+ --+ if (name != null || lore != null) { --+ NBTTagCompound display = itemStack.getSubTag("display"); --+ if (display == null) { --+ display = new NBTTagCompound(); --+ } --+ --+ if (name != null) { --+ display.set("Name", NBTTagString.create(name)); --+ } --+ if (lore != null) { --+ display.set("Lore", lore); --+ } --+ --+ NBTTagCompound tag = itemStack.getTag(); --+ if (tag == null) { --+ tag = new NBTTagCompound(); --+ } --+ tag.set("display", display); --+ --+ itemStack.setTag(tag); --+ } --+ } --+ } --+ return itemStack; --+ } --+ // Purpur end --+ -- public static void dropItem(World world, BlockPosition blockposition, ItemStack itemstack) { a(world, blockposition, itemstack); } // Purpur - OBFHELPER -- public static void a(World world, BlockPosition blockposition, ItemStack itemstack) { -- if (!world.isClientSide && !itemstack.isEmpty() && world.getGameRules().getBoolean(GameRules.DO_TILE_DROPS)) { diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java index 2291135eaef64c403183724cb6e413cd7e472672..6fcc7ed7c129e6a33386d65b37cbba4a44e96f0f 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java @@ -298,7 +142,7 @@ 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/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index febbcb3e36c7562ccc3dee2a36901979b58553d6..2d3a486f290ef096346b8667e696518506936eaf 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 @@ -311,7 +155,7 @@ index febbcb3e36c7562ccc3dee2a36901979b58553d6..2d3a486f290ef096346b8667e6965185 protected void af() { diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index a02f54ab3ac721a5697f8efea474d2999a0fd7bd..2faaf483cca26586226a2e08ac01285a62a68f6f 100644 +index 171e8553a339eb3c995369f274de86b824183ca6..4103f3c39e2ed7466824e8fecbb8d21b515b5f01 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -92,6 +92,13 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation @@ -438,41 +282,6 @@ index f9080f6f15f51ac6ce521f062010d4485fb97524..00000000000000000000000000000000 - } - - public boolean checkIfLeftOwner() { return this.h(); } // Purpur - OBFHELPER -diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 07b76471e29dc18f336604d635a325786e0dd73c..57b1381c31395b4233cbb6a5dbb5bd296a664ef4 100644 ---- a/src/main/java/net/minecraft/server/PlayerChunkMap.java -+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -853,7 +853,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - //this.dataRegionManager.addChunk(playerchunk.location.x, playerchunk.location.z); // Tuinity - } - -- this.updatingChunks.put(i, playerchunk); -+ // AirplaneL start -+ this.internalMap.addUpdatingChunk(i, playerchunk); -+ //this.updatingChunks.put(i, playerchunk); -+ // AirplaneL end - this.updatingChunksModified = true; - } - -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 8f76beb966ee37af62e4360704cf11ac84892dde..0000000000000000000000000000000000000000 ---- a/src/main/java/net/minecraft/server/PlayerChunkMap.java.rej -+++ /dev/null -@@ -1,13 +0,0 @@ --diff a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java (rejected hunks) --@@ -840,7 +862,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { -- } -- this.getVillagePlace().dequeueUnload(playerchunk.location.pair()); // Tuinity - unload POI data -- --- this.updatingChunks.put(i, playerchunk); --+ // AirplaneL start --+ this.internalMap.addUpdatingChunk(i, playerchunk); --+ //this.updatingChunks.put(i, playerchunk); --+ // AirplaneL end -- this.updatingChunksModified = true; -- } -- diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java index a62c87bceab2c9700a7b3925f208b0ffa2b9b393..1a6c593f5f20fb3a8e87ccb70cd3de7f0dcb0327 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java @@ -509,7 +318,7 @@ index dd52a8fe4fd46e57a5d1af49ba1965a483cf4fcc..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/World.java b/src/main/java/net/minecraft/server/World.java -index 6f243d1f8e99f66a29e3af689c2bdbdd5597b868..5b45051af00b823e7bbfd9407f2ff66539583863 100644 +index 07d47ad2362c5ebfa7993262a8faed240cc21717..107d7ac761bfb7667dfab88b31712e2061a46258 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -96,6 +96,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -602,7 +411,7 @@ index 39dce006ebf2bd81a9d6c62c25eb9bd55d24199e..00000000000000000000000000000000 - } - // Spigot Start diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java -index 186cc8b0ecaaf6cb6e3025a8c6df874635c34d52..3e809fd12c2cd76c2a23b540b6cbb6a487dd6f3f 100644 +index 23bc865ea46b9113194f7da023310b8559f8b819..6c25e22da6568837c636d0a30c970676184b576d 100644 --- a/src/main/java/net/pl3x/purpur/PurpurConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java @@ -1,5 +1,6 @@ @@ -624,11 +433,16 @@ index 186cc8b0ecaaf6cb6e3025a8c6df874635c34d52..3e809fd12c2cd76c2a23b540b6cbb6a4 public static double laggingThreshold = 19.0D; private static void tickLoopSettings() { laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold); -@@ -172,4 +168,30 @@ public class PurpurConfig { - private static void fixItemPositionDesync() { - fixItemPositionDesync = getBoolean("settings.fix-item-position-desync", fixItemPositionDesync); +@@ -162,4 +158,35 @@ public class PurpurConfig { + InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27); + enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows); } + ++ public static boolean dontSendUselessEntityPackets = false; ++ private static void dontSendUselessEntityPackets() { ++ dontSendUselessEntityPackets = getBoolean("settings.dont-send-useless-entity-packets", dontSendUselessEntityPackets); ++ } ++ + public static boolean allowInfinityMending = false; + private static void enchantmentSettings() { + if (version < 5) { @@ -636,7 +450,7 @@ index 186cc8b0ecaaf6cb6e3025a8c6df874635c34d52..3e809fd12c2cd76c2a23b540b6cbb6a4 + set("settings.enchantment.allow-infinity-and-mending-together", oldValue); + set("settings.enchantment.allow-infinite-and-mending-together", null); + } -+ allowInfinityMending = getBoolean("settings.enchantment.allow-infinity-and-mending-together", allowInfinityMending); ++ allowInfinityMending = getBoolean("settings.enchantment.allow-infinity-and-mending-together", allowInfinityMending); + } + + public static boolean useHexColorsInConsole = true; @@ -850,7 +664,7 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..117e32be8c34f264cfeae78081abefb4 } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej deleted file mode 100644 -index 34aadcfbf0d3a2ed1a689734fc5aaf5571ea39ab..0000000000000000000000000000000000000000 +index ad57dcdf457379d3282e710874808a6cebd3c17f..0000000000000000000000000000000000000000 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej +++ /dev/null @@ -1,26 +0,0 @@ @@ -869,7 +683,7 @@ index 34aadcfbf0d3a2ed1a689734fc5aaf5571ea39ab..00000000000000000000000000000000 -+ private void migrateDisableProjectileSaving() { -+ if (PurpurConfig.version < 6) { -+ final boolean saveProjectilesToDisk = PurpurConfig.config.getBoolean("world-settings." + worldName + ".gameplay-mechanics.save-projectiles-to-disk", true); --+ set("gameplay-mechanics.save-projectiles-to-disk", null); +-+ PurpurConfig.config.set("world-settings." + worldName + ".gameplay-mechanics.save-projectiles-to-disk", null); -+ if (!saveProjectilesToDisk) { -+ PaperConfig.config.set("world-settings." + worldName + ".projectile-load-save-per-chunk-limit", 0); -+ PaperConfig.saveConfig(); @@ -881,10 +695,10 @@ index 34aadcfbf0d3a2ed1a689734fc5aaf5571ea39ab..00000000000000000000000000000000 - public boolean armorstandFixNametags = false; - public float armorstandStepHeight = 0.0F; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1ed00fb04c8c8b5a823894a4c3df8f2eca4dd5ad..6c7eabe57ade13d9ac2a2bbfc406fcf73553bd78 100644 +index 00e6b6f29e042fb48c2fc8009659c57e9a930abc..fcf2bf8962cf6bc33d4213c1101debae4afa7114 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -858,6 +858,7 @@ public final class CraftServer implements Server { +@@ -863,6 +863,7 @@ 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 net.pl3x.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur @@ -892,7 +706,7 @@ index 1ed00fb04c8c8b5a823894a4c3df8f2eca4dd5ad..6c7eabe57ade13d9ac2a2bbfc406fcf7 for (WorldServer world : console.getWorlds()) { world.worldDataServer.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -894,6 +895,7 @@ public final class CraftServer implements Server { +@@ -899,6 +900,7 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper world.tuinityConfig.init(); // Tuinity - Server Config world.purpurConfig.init(); // Purpur @@ -900,7 +714,7 @@ index 1ed00fb04c8c8b5a823894a4c3df8f2eca4dd5ad..6c7eabe57ade13d9ac2a2bbfc406fcf7 } Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper -@@ -2301,6 +2303,13 @@ public final class CraftServer implements Server { +@@ -2309,6 +2311,13 @@ public final class CraftServer implements Server { } // Purpur end @@ -914,7 +728,7 @@ index 1ed00fb04c8c8b5a823894a4c3df8f2eca4dd5ad..6c7eabe57ade13d9ac2a2bbfc406fcf7 @Override public void restart() { org.spigotmc.RestartCommand.restart(); -@@ -2438,4 +2447,11 @@ public final class CraftServer implements Server { +@@ -2446,4 +2455,11 @@ public final class CraftServer implements Server { return mobGoals; } // Paper end @@ -928,12 +742,12 @@ index 1ed00fb04c8c8b5a823894a4c3df8f2eca4dd5ad..6c7eabe57ade13d9ac2a2bbfc406fcf7 } 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 1f7601aede1b8460f48ebaae18b9c5b68bc044c8..0000000000000000000000000000000000000000 +index b9dbdd5416862e325200e62b7d5821a73c230ec1..0000000000000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej +++ /dev/null @@ -1,12 +0,0 @@ -diff a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java (rejected hunks) --@@ -2443,5 +2443,10 @@ public final class CraftServer implements Server { +-@@ -2451,5 +2451,10 @@ public final class CraftServer implements Server { - public String getServerName() { - return getProperties().serverName; - } @@ -945,7 +759,7 @@ index 1f7601aede1b8460f48ebaae18b9c5b68bc044c8..00000000000000000000000000000000 - // Purpur end - } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 210cb10ea75b99d3b5d7b5bce5cea44e3cc0fc20..62012d2b780d3399bd641ca3ca4a4ac127e3bcb5 100644 +index 25501197b33441fa0d319082bd8d8b72110373af..dbc934b374ff1b9eb4b66d2365e89c39c951763b 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -154,6 +154,14 @@ public class Main { diff --git a/patches/server/0003-Brandings.patch b/patches/server/0003-Brandings.patch index 2c8ce66a..fd7b1881 100644 --- a/patches/server/0003-Brandings.patch +++ b/patches/server/0003-Brandings.patch @@ -5,24 +5,24 @@ Subject: [PATCH] Brandings diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java -index 961aa10e53d9630f34057389e3383da5074092ac..e276cd71e45fb800487f3b76c7835b44f2892dd3 100644 +index 3b9b44851c5832a3660a73449b52478c73ffb23a..72a66bac12af503488296c420f4cc3b13946db35 100644 --- a/src/main/java/com/destroystokyo/paper/Metrics.java +++ b/src/main/java/com/destroystokyo/paper/Metrics.java -@@ -581,7 +581,7 @@ public class Metrics { +@@ -585,7 +585,7 @@ public class Metrics { boolean logFailedRequests = config.getBoolean("logFailedRequests", false); // Only start Metrics, if it's enabled in the config if (config.getBoolean("enabled", true)) { -- Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger()); // Tuinity - we have our own bstats page // Purpur -+ Metrics metrics = new Metrics("Yatopia", serverUUID, logFailedRequests, Bukkit.getLogger()); // Tuinity - we have our own bstats page // Purpur // Yatopia +- Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger()); // Purpur ++ Metrics metrics = new Metrics("Yatopia", serverUUID, logFailedRequests, Bukkit.getLogger()); // Purpur // Yatopia metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> { String minecraftVersion = Bukkit.getVersion(); -@@ -591,7 +591,7 @@ public class Metrics { +@@ -595,7 +595,7 @@ public class Metrics { metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size())); metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (PaperConfig.isProxyOnlineMode() ? "bungee" : "offline"))); // Purpur -- metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Tuinity - we have our own bstats page // Purpur -+ metrics.addCustomChart(new Metrics.SimplePie("yatopia_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Tuinity - we have our own bstats page // Purpur // Yatopia +- metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Purpur ++ metrics.addCustomChart(new Metrics.SimplePie("yatopia_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Purpur // Yatopia metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> { Map> map = new HashMap<>(); @@ -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 2d61504e69b6d2ee18c3b71bb032e5ab13417138..4f0ab969ec222c78b85791653c81fa4e92985172 100644 +index 7510d4b98804f79276b02b40de5fa8e8bc2cde7a..8c34b3d0e6c0d2d4be42bea01abae2c47d6633f0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1524,7 +1524,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 4f0ab969ec222c78b85791653c81fa4e92985172..18cf697da5665c45e7ea84c85513a615379474c4 100644 +index 8c34b3d0e6c0d2d4be42bea01abae2c47d6633f0..eb9d61b5e76c7b40faebfa8308cd3348b7e31fac 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -937,6 +937,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant list = com.tuinity.tuinity.util.CachedLists.getTempGetEntitiesList(); -- this.world.getEntities(this, this.getBoundingBox(), IEntitySelector.a(this), list); -+ this.world.getEntities(this, this.getBoundingBox(), org.yatopiamc.yatopia.server.EntityFilter.getFilter(this), list); // Yatopia +- this.world.getEntities(this, this.getBoundingBox(), IEntitySelector.pushable(this, world.paperConfig.fixClimbingBypassingCrammingRule), list); // Paper - fix climbing bypassing cramming rule ++ this.world.getEntities(this, this.getBoundingBox(), org.yatopiamc.yatopia.server.EntityFilter.getFilter(this, world.paperConfig.fixClimbingBypassingCrammingRule), list); // Paper - fix climbing bypassing cramming rule // Yatopia try { // Tuinity end - reduce memory allocation from collideNearby diff --git a/src/main/java/org/yatopiamc/yatopia/server/EntityFilter.java b/src/main/java/org/yatopiamc/yatopia/server/EntityFilter.java new file mode 100644 -index 0000000000000000000000000000000000000000..32a3dd7087b73dc92d518d88c7eada8ff1ec8621 +index 0000000000000000000000000000000000000000..cb6bab603dcb20521868a482c872f65dd5733c15 --- /dev/null +++ b/src/main/java/org/yatopiamc/yatopia/server/EntityFilter.java @@ -0,0 +1,145 @@ @@ -89,10 +89,10 @@ index 0000000000000000000000000000000000000000..32a3dd7087b73dc92d518d88c7eada8f + +public class EntityFilter { + -+ public static Predicate getFilter(Entity entity) { ++ public static Predicate getFilter(Entity entity, boolean ignoreClimbing) { + OrigamiConfig.WorldConfig config = entity.world.origamiConfig; + if (config.allCollisionsEnabled) { -+ return IEntitySelector.a(entity); ++ return IEntitySelector.pushable(entity, ignoreClimbing); + } + + ScoreboardTeamBase entityTeam = entity.getScoreboardTeam(); @@ -107,7 +107,7 @@ index 0000000000000000000000000000000000000000..32a3dd7087b73dc92d518d88c7eada8f + } + + Predicate ret = (tested) -> { -+ if (!tested.canCollideWith(entity) || !entity.canCollideWith(tested)) { ++ if (!tested.isCollidable(ignoreClimbing) || !tested.canCollideWith(entity) || !entity.canCollideWith(tested)) { + return false; + } + ScoreboardTeamBase testedTeam = tested.getScoreboardTeam(); diff --git a/patches/server/0011-Modify-default-configs.patch b/patches/server/0011-Modify-default-configs.patch index 3f7cc8e7..54de9718 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 e21ef1bdc61b7ae98eb752130a4d125c78c652d9..d0ee3aeb973146b55c3b194c9407e9e5f91a0f62 100644 +index 5e24ddc7dce6f6ed45267df3217177583bdd9eb0..62e120242ec8cfbadc4d9e1b81f4ccc19c240aed 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -206,7 +206,7 @@ public class PaperConfig { @@ -18,7 +18,7 @@ index e21ef1bdc61b7ae98eb752130a4d125c78c652d9..d0ee3aeb973146b55c3b194c9407e9e5 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 f451b0aa68cc8efeeea536669770390c0506084f..5355acc4e0a526d3f131e330283c37b7d913f586 100644 +index 2452f54d96cab2d93140c64e25d9b799cbc94caa..c3f38f3228e0104d878b3e116f203efc64279710 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -598,7 +598,7 @@ public class PaperWorldConfig { diff --git a/patches/server/0014-lithium-enum_values.patch b/patches/server/0014-lithium-enum_values.patch index 1f1be7c9..39d6a26a 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 b280b9f657d75c7224f54daf9a426cd38d8ab57b..6ba89d0fde0ad2f8bc56584c65a50ba2530c3c4f 100644 +index d55f60c317465fe2849d12c8ca1e359d1837fd46..e476ce7a5fdb2d409471022be3cf81ac67b997b3 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2580,10 +2580,12 @@ public abstract class EntityLiving extends Entity { +@@ -2579,10 +2579,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 573112aa..3a59afce 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 f2af9cb9d7c88c51a1a2e004a0eeb47b3d407b44..4812adaadc7a28794590849d4773a4fa66a7f913 100644 +index 0ea6d243dfafab2184147f365ded3f992d9eda61..a3b0fa6afdc47b1589be58e0ddd2e69455ad31fb 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/0018-Option-for-simpler-Villagers.patch b/patches/server/0018-Option-for-simpler-Villagers.patch index 5cafee1b..5a0d3e00 100644 --- a/patches/server/0018-Option-for-simpler-Villagers.patch +++ b/patches/server/0018-Option-for-simpler-Villagers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option for simpler Villagers diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 2faaf483cca26586226a2e08ac01285a62a68f6f..4b291174493f163260b1f92372d882a99669514c 100644 +index 4103f3c39e2ed7466824e8fecbb8d21b515b5f01..bb187418cb9e38f266753ae8efae61147d5ef101 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -31,6 +31,7 @@ import org.bukkit.event.entity.VillagerReplenishTradeEvent; diff --git a/patches/server/0020-Optimize-TileEntity-load-unload.patch b/patches/server/0020-Optimize-TileEntity-load-unload.patch index d7c574b9..69d53a1d 100644 --- a/patches/server/0020-Optimize-TileEntity-load-unload.patch +++ b/patches/server/0020-Optimize-TileEntity-load-unload.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize TileEntity load/unload diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5b45051af00b823e7bbfd9407f2ff66539583863..de7ca87e74084c5cca109a6eff071da351dec91b 100644 +index 107d7ac761bfb7667dfab88b31712e2061a46258..95b9663e072991004904365cfc2ba11edb01de20 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -42,8 +42,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/patches/server/0022-Redirect-Configs.patch b/patches/server/0022-Redirect-Configs.patch index a4f014c3..ae7f011e 100644 --- a/patches/server/0022-Redirect-Configs.patch +++ b/patches/server/0022-Redirect-Configs.patch @@ -39,7 +39,7 @@ index 004184a7c3da4f72f68a5fd9b4dd5abd0b8f871d..a0ff3cdafbf499802600de2d2174781c for (final Method method : clazz.getDeclaredMethods()) { if (method.getReturnType() != void.class || method.getParameterCount() != 0 || diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 0808edf7a20ccf3eb4639543f73ac968cc25e148..21999986018b93315eea54d0c5f3bff6b7e417f7 100644 +index 0a9f03526abf0638ada15d9810b949887fca9f9a..64b662dc9146d0d414a9668d9b93e07aa6665f32 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -188,7 +188,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -52,7 +52,7 @@ index 0808edf7a20ccf3eb4639543f73ac968cc25e148..21999986018b93315eea54d0c5f3bff6 this.setAllowFlight(dedicatedserverproperties.allowFlight); this.setResourcePack(dedicatedserverproperties.resourcePack, this.ba()); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index da624fbeb5aaba2aa717ed3aada7633d324fb8cf..b189c4011000106631b98a7ca87bd9d114aaf350 100644 +index ce08abf2eabfdb606b806f4d6d374055f5e10168..b9d11f4ba9a49d955b487ccf5a6dac4e1c9ba19b 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -303,7 +303,7 @@ public class Main { diff --git a/patches/server/0025-Fix-lead-fall-dmg-config.patch b/patches/server/0025-Fix-lead-fall-dmg-config.patch index 9c00e5ce..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 2d3a486f290ef096346b8667e696518506936eaf..2d6c0235879ef2b9024d6b881048bb8b73d18abe 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/0029-Send-more-packets-immediately.patch b/patches/server/0029-Send-more-packets-immediately.patch deleted file mode 100644 index ea03fee0..00000000 --- a/patches/server/0029-Send-more-packets-immediately.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MrIvanPlays -Date: Mon, 17 Aug 2020 08:51:44 +0300 -Subject: [PATCH] Send more packets immediately - -Paper did some changes around packet sending by introducing a queue and making (most of) the PLAY packets -send synchronously. This is completely fine, however the are some people who want to have better experience -with "cosmetic" stuff such as boss bar's, title's and scoreboard's. We allow those packets to pass instantly, -as the server shouldn't really care about those packets - they're not related with overall gameplay. - -Additionally, I'm thinking of making those packets send asynchronously. - -diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 7a2a8acea90a0e6f08f366c3d397a515f38e5395..d346ecbd67f9ed48a343fdbc7e8b81b0e7dda3d9 100644 ---- a/src/main/java/net/minecraft/server/NetworkManager.java -+++ b/src/main/java/net/minecraft/server/NetworkManager.java -@@ -289,7 +289,11 @@ public class NetworkManager extends SimpleChannelInboundHandler> { - return networkManager.isPending || networkManager.protocol != EnumProtocol.PLAY || - packet instanceof PacketPlayOutKeepAlive || - packet instanceof PacketPlayOutChat || -- packet instanceof PacketPlayOutTabComplete; -+ packet instanceof PacketPlayOutTabComplete || // Yatopia -+ // Yatopia start -+ packet instanceof PacketPlayOutBoss || -+ packet instanceof PacketPlayOutTitle; -+ // Yatopia end - } - // Paper end - } diff --git a/patches/server/0030-Use-offline-uuids-if-we-need-to.patch b/patches/server/0029-Use-offline-uuids-if-we-need-to.patch similarity index 100% rename from patches/server/0030-Use-offline-uuids-if-we-need-to.patch rename to patches/server/0029-Use-offline-uuids-if-we-need-to.patch diff --git a/patches/server/0031-Highly-optimize-VillagePlace-filtering.patch b/patches/server/0030-Highly-optimize-VillagePlace-filtering.patch similarity index 100% rename from patches/server/0031-Highly-optimize-VillagePlace-filtering.patch rename to patches/server/0030-Highly-optimize-VillagePlace-filtering.patch diff --git a/patches/server/0032-Optimise-portals.patch b/patches/server/0031-Optimise-portals.patch similarity index 100% rename from patches/server/0032-Optimise-portals.patch rename to patches/server/0031-Optimise-portals.patch diff --git a/patches/server/0033-Nuke-streams-off-BlockPosition.patch b/patches/server/0032-Nuke-streams-off-BlockPosition.patch similarity index 100% rename from patches/server/0033-Nuke-streams-off-BlockPosition.patch rename to patches/server/0032-Nuke-streams-off-BlockPosition.patch diff --git a/patches/server/0034-Nuke-streams-off-SectionPosition.patch b/patches/server/0033-Nuke-streams-off-SectionPosition.patch similarity index 100% rename from patches/server/0034-Nuke-streams-off-SectionPosition.patch rename to patches/server/0033-Nuke-streams-off-SectionPosition.patch diff --git a/patches/server/0035-Stop-wasting-resources-on-JsonList-get.patch b/patches/server/0034-Stop-wasting-resources-on-JsonList-get.patch similarity index 97% rename from patches/server/0035-Stop-wasting-resources-on-JsonList-get.patch rename to patches/server/0034-Stop-wasting-resources-on-JsonList-get.patch index 2c0303b5..bab9d7b8 100644 --- a/patches/server/0035-Stop-wasting-resources-on-JsonList-get.patch +++ b/patches/server/0034-Stop-wasting-resources-on-JsonList-get.patch @@ -55,7 +55,7 @@ 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 b679a6ee7ee2fb00293fb02b3537eddf5580e596..e54706b9c65f0a15bd5ff0e0f227bb881fc172b3 100644 +index ce7724a1797a992561d074f85c7bdef71b4dbe78..1a61ff4c7d532c39883aedba90f17ef81b1a9409 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 { diff --git a/patches/server/0036-ProxyForwardDataEvent.patch b/patches/server/0035-ProxyForwardDataEvent.patch similarity index 92% rename from patches/server/0036-ProxyForwardDataEvent.patch rename to patches/server/0035-ProxyForwardDataEvent.patch index f1a9f55f..5bc6fa91 100644 --- a/patches/server/0036-ProxyForwardDataEvent.patch +++ b/patches/server/0035-ProxyForwardDataEvent.patch @@ -5,11 +5,11 @@ Subject: [PATCH] ProxyForwardDataEvent diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index 1d60def8fa7041b3383c287153cbb9c6cec3d0f9..4b7caf04981e811c937f44b27662a9c220ba62f5 100644 +index 79f726ef43e70b8882890007146df199824d14e3..edb7a9de55718d9c860c82580aca78c3d254ad57 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -92,6 +92,7 @@ public class HandshakeListener implements PacketHandshakingInListener { - this.getNetworkManager().socketAddress = new java.net.InetSocketAddress(event.getSocketAddressHostname(), ((java.net.InetSocketAddress) this.getNetworkManager().getSocketAddress()).getPort()); + if (event.getSocketAddressHostname() != null) this.getNetworkManager().socketAddress = new java.net.InetSocketAddress(event.getSocketAddressHostname(), ((java.net.InetSocketAddress) this.getNetworkManager().getSocketAddress()).getPort()); this.getNetworkManager().spoofedUUID = event.getUniqueId(); this.getNetworkManager().spoofedProfile = gson.fromJson(event.getPropertiesJson(), com.mojang.authlib.properties.Property[].class); + if (proxyLogicEnabled) c.proxyProfileSpoof = true; // Yatopia @@ -83,7 +83,7 @@ index d987483255195c0bde713a92676baced1eaff2b3..2fa0f21cfa81670f6c3f18f76e7fa8d0 } catch (Exception ex) { disconnect("Failed to verify username!"); diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index d346ecbd67f9ed48a343fdbc7e8b81b0e7dda3d9..837056fdd8b8125bcfe39a1d49fa6e1797bba708 100644 +index 6a0ec0105399066dede622b45c9471b32c162cf6..8ae1378e4cb5694130630943a84884dddecb9b3b 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -51,6 +51,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { diff --git a/patches/server/0037-Fix-LightEngineThreaded-memory-leak.patch b/patches/server/0036-Fix-LightEngineThreaded-memory-leak.patch similarity index 100% rename from patches/server/0037-Fix-LightEngineThreaded-memory-leak.patch rename to patches/server/0036-Fix-LightEngineThreaded-memory-leak.patch diff --git a/patches/server/0038-Respect-PlayerKickEvent-leaveMessage.patch b/patches/server/0037-Respect-PlayerKickEvent-leaveMessage.patch similarity index 89% rename from patches/server/0038-Respect-PlayerKickEvent-leaveMessage.patch rename to patches/server/0037-Respect-PlayerKickEvent-leaveMessage.patch index 7584d1bd..1470fb9a 100644 --- a/patches/server/0038-Respect-PlayerKickEvent-leaveMessage.patch +++ b/patches/server/0037-Respect-PlayerKickEvent-leaveMessage.patch @@ -5,10 +5,10 @@ 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 a7373681b8442b302a5f9cf5a7408443defc6f8c..292eef68b8d71236c845dd5c42c5366b5b55efc0 100644 +index 81ac7dae3b51c67a1a279fdb96cd1d50dd901f0b..c0fa18179cdd5367a5b346d7f795f969c0a6e2b7 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -320,7 +320,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -323,7 +323,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.networkManager.sendPacket(new PacketPlayOutKickDisconnect(ichatbasecomponent), (future) -> { this.networkManager.close(ichatbasecomponent); }); @@ -17,7 +17,7 @@ index a7373681b8442b302a5f9cf5a7408443defc6f8c..292eef68b8d71236c845dd5c42c5366b this.networkManager.stopReading(); MinecraftServer minecraftserver = this.minecraftServer; NetworkManager networkmanager = this.networkManager; -@@ -1678,6 +1678,11 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1681,6 +1681,11 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(IChatBaseComponent ichatbasecomponent) { @@ -29,7 +29,7 @@ index a7373681b8442b302a5f9cf5a7408443defc6f8c..292eef68b8d71236c845dd5c42c5366b // CraftBukkit start - Rarely it would send a disconnect line twice if (this.processedDisconnect) { return; -@@ -1693,7 +1698,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1696,7 +1701,7 @@ public class PlayerConnection implements PacketListenerPlayIn { */ this.player.p(); @@ -39,7 +39,7 @@ index a7373681b8442b302a5f9cf5a7408443defc6f8c..292eef68b8d71236c845dd5c42c5366b 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 e54706b9c65f0a15bd5ff0e0f227bb881fc172b3..1ef3df97c5af937a342a9e2c18e51e707e9bd203 100644 +index 1a61ff4c7d532c39883aedba90f17ef81b1a9409..0b7dc3d88a34c32e36ebb14f1e8b463664860f95 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 { diff --git a/patches/server/0039-Shutdown-Bootstrap-thread-pool.patch b/patches/server/0038-Shutdown-Bootstrap-thread-pool.patch similarity index 100% rename from patches/server/0039-Shutdown-Bootstrap-thread-pool.patch rename to patches/server/0038-Shutdown-Bootstrap-thread-pool.patch diff --git a/patches/server/0040-Optimize-Villagers.patch b/patches/server/0039-Optimize-Villagers.patch similarity index 100% rename from patches/server/0040-Optimize-Villagers.patch rename to patches/server/0039-Optimize-Villagers.patch diff --git a/patches/server/0041-Optimize-whitelist-command-for-multiple-additions-re.patch b/patches/server/0040-Optimize-whitelist-command-for-multiple-additions-re.patch similarity index 98% rename from patches/server/0041-Optimize-whitelist-command-for-multiple-additions-re.patch rename to patches/server/0040-Optimize-whitelist-command-for-multiple-additions-re.patch index 6d9d19f3..b3d035e5 100644 --- a/patches/server/0041-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 18cf697da5665c45e7ea84c85513a615379474c4..f24c33280ccb17a316c982f4cc4f004c3cc70c4b 100644 +index eb9d61b5e76c7b40faebfa8308cd3348b7e31fac..ba62404dae5b4c8af41921eb7a3fbcf9b2e0b58e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1969,6 +1969,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant -Date: Mon, 28 Sep 2020 16:25:34 +0300 -Subject: [PATCH] PaperPR: Fix merging spawning values - -This patch is licensed under bukkit's original license, GPLv3 - -diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 6c15409982fd8005fede7c56c1ca74db5993d548..5e8c57aa026f5be735b0316da450b919692385f6 100644 ---- a/src/main/java/net/minecraft/server/SpawnerCreature.java -+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -157,9 +157,12 @@ public final class SpawnerCreature { - spawnercreature_d.a(entityinsentient, ichunkaccess); - }, - difference, worldserver.paperConfig.perPlayerMobSpawns ? worldserver.getChunkProvider().playerChunkMap::updatePlayerMobTypeMap : null); -- spawnercreature_d.getEntityCountsByType().mergeInt(enumcreaturetype, spawnCount, (keyInMap, valueInMap) -> { -- return Integer.valueOf(spawnCount + valueInMap.intValue()); -- }); -+ // Yatopia start - fix this -+ //spawnercreature_d.getEntityCountsByType().mergeInt(enumcreaturetype, spawnCount, (keyInMap, valueInMap) -> { -+ // return Integer.valueOf(spawnCount + valueInMap.intValue()); -+ //}); -+ spawnercreature_d.getEntityCountsByType().mergeInt(enumcreaturetype, spawnCount, Integer::sum); -+ // Yatopia end - // Paper end - per player mob spawning - } - } diff --git a/patches/server/0049-Configurable-flight-checks.patch b/patches/server/0047-Configurable-flight-checks.patch similarity index 92% rename from patches/server/0049-Configurable-flight-checks.patch rename to patches/server/0047-Configurable-flight-checks.patch index fee9d87e..42b75903 100644 --- a/patches/server/0049-Configurable-flight-checks.patch +++ b/patches/server/0047-Configurable-flight-checks.patch @@ -5,10 +5,10 @@ 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 292eef68b8d71236c845dd5c42c5366b5b55efc0..793be022028be7557cfd6d96f408c7039e5f9ca5 100644 +index c0fa18179cdd5367a5b346d7f795f969c0a6e2b7..86eb4b768eb52f0ff9371c65260c633f818e91af 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -177,7 +177,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -179,7 +179,7 @@ public class PlayerConnection implements PacketListenerPlayIn { ++this.e; this.processedMovePackets = this.receivedMovePackets; if (this.B && !this.player.isSleeping()) { @@ -17,7 +17,7 @@ index 292eef68b8d71236c845dd5c42c5366b5b55efc0..793be022028be7557cfd6d96f408c703 PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getDisplayName().getString()); this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message return; -@@ -196,7 +196,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -198,7 +198,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.w = this.r.locY(); this.x = this.r.locZ(); if (this.D && this.player.getRootVehicle().getRidingPassenger() == this.player) { diff --git a/patches/server/0050-Heavily-optimize-recipe-lookups-in-CraftingManager.patch b/patches/server/0048-Heavily-optimize-recipe-lookups-in-CraftingManager.patch similarity index 100% rename from patches/server/0050-Heavily-optimize-recipe-lookups-in-CraftingManager.patch rename to patches/server/0048-Heavily-optimize-recipe-lookups-in-CraftingManager.patch diff --git a/patches/server/0051-Improve-task-performance.patch b/patches/server/0049-Improve-task-performance.patch similarity index 100% rename from patches/server/0051-Improve-task-performance.patch rename to patches/server/0049-Improve-task-performance.patch diff --git a/patches/server/0052-Optimize-advancement-loading.patch b/patches/server/0050-Optimize-advancement-loading.patch similarity index 100% rename from patches/server/0052-Optimize-advancement-loading.patch rename to patches/server/0050-Optimize-advancement-loading.patch diff --git a/patches/server/0053-PaperPR-Fix-harming-potion-dupe.patch b/patches/server/0051-PaperPR-Fix-harming-potion-dupe.patch similarity index 100% rename from patches/server/0053-PaperPR-Fix-harming-potion-dupe.patch rename to patches/server/0051-PaperPR-Fix-harming-potion-dupe.patch diff --git a/patches/server/0054-lithium-PerlinNoiseSamplerMixin.patch b/patches/server/0052-lithium-PerlinNoiseSamplerMixin.patch similarity index 100% rename from patches/server/0054-lithium-PerlinNoiseSamplerMixin.patch rename to patches/server/0052-lithium-PerlinNoiseSamplerMixin.patch diff --git a/patches/server/0055-lithium-VoronoiBiomeAccessTypeMixin.patch b/patches/server/0053-lithium-VoronoiBiomeAccessTypeMixin.patch similarity index 100% rename from patches/server/0055-lithium-VoronoiBiomeAccessTypeMixin.patch rename to patches/server/0053-lithium-VoronoiBiomeAccessTypeMixin.patch diff --git a/patches/server/0056-lithium-NoiseChunkGeneratorMixin.patch b/patches/server/0054-lithium-NoiseChunkGeneratorMixin.patch similarity index 100% rename from patches/server/0056-lithium-NoiseChunkGeneratorMixin.patch rename to patches/server/0054-lithium-NoiseChunkGeneratorMixin.patch diff --git a/patches/server/0057-lithium-reduce-allocations.patch b/patches/server/0055-lithium-reduce-allocations.patch similarity index 100% rename from patches/server/0057-lithium-reduce-allocations.patch rename to patches/server/0055-lithium-reduce-allocations.patch diff --git a/patches/server/0058-Smarter-statistics-ticking.patch b/patches/server/0056-Smarter-statistics-ticking.patch similarity index 100% rename from patches/server/0058-Smarter-statistics-ticking.patch rename to patches/server/0056-Smarter-statistics-ticking.patch diff --git a/patches/server/0059-Configurable-criterion-triggers.patch b/patches/server/0057-Configurable-criterion-triggers.patch similarity index 91% rename from patches/server/0059-Configurable-criterion-triggers.patch rename to patches/server/0057-Configurable-criterion-triggers.patch index 9405c894..162317c4 100644 --- a/patches/server/0059-Configurable-criterion-triggers.patch +++ b/patches/server/0057-Configurable-criterion-triggers.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable criterion triggers This patch adds toggles for three criterion triggers that are called every tick. These can be very unnecessary, and especially in the case of CriterionTriggerEnterBlock, quite heavy. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 42451ff5b9b345cd549fcbb496fc7bc053935580..1f54ce29006749e59cb4088b260b70596884a45d 100644 +index 9b4c3b1a6eab4b399b3bfe957defcba585cb95d6..bb8c5ba0eccc2633652f662bb7fe2dcae2f2db18 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -431,6 +431,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -433,6 +433,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override protected void a(IBlockData iblockdata) { @@ -17,7 +17,7 @@ index 42451ff5b9b345cd549fcbb496fc7bc053935580..1f54ce29006749e59cb4088b260b7059 CriterionTriggers.d.a(this, iblockdata); } -@@ -573,7 +574,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -575,7 +576,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.playerConnection.sendPacket(new PacketPlayOutExperience(this.exp, this.expTotal, this.expLevel)); } diff --git a/patches/server/0060-Configurable-BlockPhysicsEvent.patch b/patches/server/0058-Configurable-BlockPhysicsEvent.patch similarity index 93% rename from patches/server/0060-Configurable-BlockPhysicsEvent.patch rename to patches/server/0058-Configurable-BlockPhysicsEvent.patch index 7d55814b..8feda2cd 100644 --- a/patches/server/0060-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 f24c33280ccb17a316c982f4cc4f004c3cc70c4b..76d3c208e60385f842471128e4591f757cc2138c 100644 +index ba62404dae5b4c8af41921eb7a3fbcf9b2e0b58e..571483166c69079961c3297e1b40265b62f34217 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1412,7 +1412,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 2147483647L ? Integer.MAX_VALUE : (int) l; int j1 = this.u(i1); @@ -96,7 +96,7 @@ index 1f54ce29006749e59cb4088b260b70596884a45d..6fe7151ba7d8ad105bf21aa89be5a7ab for (int l1 = 0; l1 < i1; ++l1) { int i2 = (k1 + j1 * l1) % i1; -@@ -224,7 +224,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -226,7 +226,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { long l = k * k; int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l; int j1 = this.u(i1); @@ -145,10 +145,10 @@ index 9190caed195b9987e3af545f4de63b8d956788a6..178386cfb44152b50757234a624afef0 private final MinecraftServer server; public final NetworkManager networkManager; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 76d3c208e60385f842471128e4591f757cc2138c..bdbbb6ea881fccbfc753dfb6a401dafb6a056a03 100644 +index 571483166c69079961c3297e1b40265b62f34217..55d22bfa2f30e2eaaf11836c29c90c86e764a41a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -196,7 +196,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant methodProfiler; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ae2cc01c10d2884da67ff0953e6ded8ba76c844f..957a7374a1f4feadc6ed7e897be189c00d1f4de6 100644 +index a69b38f293723a58691b2777d170f9cc146d1148..b746d1efbb06173e16a5b3a7f6bf0f3303a5ae05 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -334,7 +334,7 @@ public class CraftWorld implements World { diff --git a/patches/server/0065-Tile-Entity-optimizations.patch b/patches/server/0063-Tile-Entity-optimizations.patch similarity index 98% rename from patches/server/0065-Tile-Entity-optimizations.patch rename to patches/server/0063-Tile-Entity-optimizations.patch index eca2fbcb..688c07a5 100644 --- a/patches/server/0065-Tile-Entity-optimizations.patch +++ b/patches/server/0063-Tile-Entity-optimizations.patch @@ -30,7 +30,7 @@ index c9066cb5f51cb2ad078aca3019e1df557062d286..46b18b6364645106b00bd4f1d721b8cd 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/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 84fb0492abca5a2443e89adc18b3fa17c636054f..8aa734e1bf8cca717d6b079458f328d19599a505 100644 +index c63d728082e28c13bc9724e74b154d02fbb2392e..2fedaf62905445fe91fd627420cfca337b8d37a7 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -917,13 +917,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/patches/server/0064-Do-not-update-distance-map-when-animal-and-mob-spawn.patch b/patches/server/0064-Do-not-update-distance-map-when-animal-and-mob-spawn.patch new file mode 100644 index 00000000..0c65d9eb --- /dev/null +++ b/patches/server/0064-Do-not-update-distance-map-when-animal-and-mob-spawn.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Beech Horn +Date: Mon, 7 Dec 2020 21:16:51 +0200 +Subject: [PATCH] Do not update distance map when animal and mob spawning is + disabled in the particular world + +Original author: Beech Horn +Licensed under Bukkit and CraftBukkit's original license, GPLv3 +The following patch should be treated as it is licensed in GPLv3 + +diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java +index 84429f12d0c6e0990b7cbb1b503b7868b3a02b14..f04a5a526748f913e885b673dda793e5bb16c1b7 100644 +--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java ++++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +@@ -982,7 +982,7 @@ public class ChunkProviderServer extends IChunkProvider { + int l = this.chunkMapDistance.b(); + // Paper start - per player mob spawning + SpawnerCreature.d spawnercreature_d; // moved down +- if (this.playerChunkMap.playerMobDistanceMap != null) { ++ if ((this.allowAnimals || this.allowMonsters) && this.playerChunkMap.playerMobDistanceMap != null) { // Yatopia + // update distance map + this.world.timings.playerMobDistanceMapUpdate.startTiming(); + this.playerChunkMap.playerMobDistanceMap.update(this.world.players, this.playerChunkMap.viewDistance);