From 50c77a59be6ffae1c89825431d0dbb0b5dbcbcf1 Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Thu, 18 May 2023 22:49:16 +0800 Subject: [PATCH] Update Paper --- gradle.properties | 2 +- patches/api/0001-Leaves-Server-Config.patch | 4 +-- patches/server/0001-Build-changes.patch | 6 ++--- patches/server/0002-Leaves-Server-Utils.patch | 10 +++---- ...004-Leaves-Server-Config-And-Command.patch | 12 ++++----- .../server/0005-Fix-gravity-block-duper.patch | 8 +++--- patches/server/0009-Fakeplayer-support.patch | 26 +++++++------------ patches/server/0017-No-chat-sign.patch | 8 +++--- .../0022-Optimize-entity-coordinate-key.patch | 4 +-- .../0034-Reduce-entity-allocations.patch | 4 +-- ...-streams-from-getting-nearby-players.patch | 4 +-- ...ce-entity-fluid-lookups-if-no-fluids.patch | 6 ++--- patches/server/0045-PCA-sync-protocol.patch | 16 ++++++------ patches/server/0046-BBOR-Protocol.patch | 16 ++++++------ patches/server/0049-Jade-Protocol.patch | 14 +++++----- ...alternative-block-placement-Protocol.patch | 4 +-- .../0051-Player-operation-limiter.patch | 8 +++--- .../0056-Return-nether-portal-fix.patch | 16 ++++++------ patches/server/0057-Appleskin-Protocol.patch | 10 +++---- patches/server/0058-Xaero-Map-Protocol.patch | 4 +-- .../0060-Use-vanilla-random-config.patch | 4 +-- patches/server/0063-Syncmatica-Protocol.patch | 10 +++---- 22 files changed, 94 insertions(+), 102 deletions(-) diff --git a/gradle.properties b/gradle.properties index da78770d..82f9aa47 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,5 +4,5 @@ version=1.19.4-R0.1-SNAPSHOT mcVersion=1.19.4 packageVersion=1_19_R3 org.gradle.jvmargs=-Xmx2G -paperRef=9846d0d89e7598fc28a8c8534d80d4c5dc42021c +paperRef=bcd8dc2c1189293c4fc0b57048f0f0668c1b7e60 preVersion=false diff --git a/patches/api/0001-Leaves-Server-Config.patch b/patches/api/0001-Leaves-Server-Config.patch index 7f8c1b08..e2dc6757 100644 --- a/patches/api/0001-Leaves-Server-Config.patch +++ b/patches/api/0001-Leaves-Server-Config.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Leaves Server Config diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 8621dba7f10ab822b5b99ce0d05da58823605cb6..d50945983927fd167b9a94808f97113c7556d785 100644 +index 9f7029d327b55c8b1b9cfef8ea2678b87dad8ddb..2d14421051ffa6951aef42f3d2742e7207f63859 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1967,6 +1967,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -1966,6 +1966,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi throw new UnsupportedOperationException("Not supported yet."); } // Paper end diff --git a/patches/server/0001-Build-changes.patch b/patches/server/0001-Build-changes.patch index f8424c3a..70f677f9 100644 --- a/patches/server/0001-Build-changes.patch +++ b/patches/server/0001-Build-changes.patch @@ -92,10 +92,10 @@ index 9f15d9dbdfa74a0640b1a2b4ff695609d4758a4c..e5d4c3eb2f6bfe446d6520564a263dbc public SystemReport fillSystemReport(SystemReport details) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0ba8446065def1b120fd73241de5bc14d60d3b82..fe97a756c466b370aa2ff9cafeb64ff73b271c54 100644 +index e769f7b0904814ee63e2a73dca57e5dc33382fba..0d9f5e8b880bff78c122e863c42a23e47c455b9c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -256,7 +256,7 @@ import javax.annotation.Nullable; // Paper +@@ -257,7 +257,7 @@ import javax.annotation.Nullable; // Paper import javax.annotation.Nonnull; // Paper public final class CraftServer implements Server { @@ -105,7 +105,7 @@ index 0ba8446065def1b120fd73241de5bc14d60d3b82..fe97a756c466b370aa2ff9cafeb64ff7 private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 755c223ab2a046285eb9916b6195093714f4c5ba..5891f67ccdddaa137a77ef2a2742fb965bdca6ef 100644 +index c103f10dbb6c06e14bb7b5df73a797f456803301..ca4925d43413600ba092581c71086a7f5e357853 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -285,7 +285,7 @@ public class Main { diff --git a/patches/server/0002-Leaves-Server-Utils.patch b/patches/server/0002-Leaves-Server-Utils.patch index 5ecd8b08..7b658fad 100644 --- a/patches/server/0002-Leaves-Server-Utils.patch +++ b/patches/server/0002-Leaves-Server-Utils.patch @@ -31,10 +31,10 @@ index 46954db7ecd35ac4018fdf476df7c8020d7ce6c8..044c51ebb058fc36074fd178929e3279 public PlayerAreaMap() { super(); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 4705d7066207250c03a5f98eef61554c901f2e35..48093cbb9606c23d53a6a37d8d72190caa199d1a 100644 +index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..8544ee07fa72f848e330697823233a201f8cd052 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -399,6 +399,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -400,6 +400,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { private UUID originWorld; public boolean freezeLocked = false; // Paper - Freeze Tick Lock API public boolean collidingWithWorldBorder; // Paper @@ -42,7 +42,7 @@ index 4705d7066207250c03a5f98eef61554c901f2e35..48093cbb9606c23d53a6a37d8d72190c public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -2304,6 +2305,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2305,6 +2306,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { nbt.putBoolean("Paper.FreezeLock", true); } // Paper end @@ -50,7 +50,7 @@ index 4705d7066207250c03a5f98eef61554c901f2e35..48093cbb9606c23d53a6a37d8d72190c return nbt; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT"); -@@ -2472,6 +2474,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2473,6 +2475,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { freezeLocked = nbt.getBoolean("Paper.FreezeLock"); } // Paper end @@ -62,7 +62,7 @@ index 4705d7066207250c03a5f98eef61554c901f2e35..48093cbb9606c23d53a6a37d8d72190c } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT"); -@@ -4637,4 +4644,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4638,4 +4645,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this); } // Paper end diff --git a/patches/server/0004-Leaves-Server-Config-And-Command.patch b/patches/server/0004-Leaves-Server-Config-And-Command.patch index 5d06b427..2072b2cc 100644 --- a/patches/server/0004-Leaves-Server-Config-And-Command.patch +++ b/patches/server/0004-Leaves-Server-Config-And-Command.patch @@ -65,10 +65,10 @@ index 973ecd50f9cb6b86c353586e84d15dcb118ccb60..31f0034115a88a42b18e0b838eab8b80 this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 44216c40177222b5c3ef2e58690d95efe0c10318..d6e2c67650341f823f08c07c3eb576530959338d 100644 +index 0d9f5e8b880bff78c122e863c42a23e47c455b9c..4cc3d03b30db2057b6e03a3b3e92459f8ad81eae 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -956,6 +956,7 @@ public final class CraftServer implements Server { +@@ -957,6 +957,7 @@ public final class CraftServer implements Server { org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot this.console.paperConfigurations.reloadConfigs(this.console); @@ -76,7 +76,7 @@ index 44216c40177222b5c3ef2e58690d95efe0c10318..d6e2c67650341f823f08c07c3eb57653 for (ServerLevel world : this.console.getAllLevels()) { // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean)) -@@ -971,6 +972,7 @@ public final class CraftServer implements Server { +@@ -972,6 +973,7 @@ public final class CraftServer implements Server { } } world.spigotConfig.init(); // Spigot @@ -84,7 +84,7 @@ index 44216c40177222b5c3ef2e58690d95efe0c10318..d6e2c67650341f823f08c07c3eb57653 } Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper -@@ -986,6 +988,7 @@ public final class CraftServer implements Server { +@@ -987,6 +989,7 @@ public final class CraftServer implements Server { this.reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper @@ -92,7 +92,7 @@ index 44216c40177222b5c3ef2e58690d95efe0c10318..d6e2c67650341f823f08c07c3eb57653 this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*"); this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2739,6 +2742,14 @@ public final class CraftServer implements Server { +@@ -2740,6 +2743,14 @@ public final class CraftServer implements Server { { return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console); } @@ -108,7 +108,7 @@ index 44216c40177222b5c3ef2e58690d95efe0c10318..d6e2c67650341f823f08c07c3eb57653 @Override public void restart() { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 5891f67ccdddaa137a77ef2a2742fb965bdca6ef..570021680faa7a67165692345efe8c7fde6786ba 100644 +index ca4925d43413600ba092581c71086a7f5e357853..62e21fff47afa7b63c779e7271446dc3c92924e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -165,6 +165,14 @@ public class Main { diff --git a/patches/server/0005-Fix-gravity-block-duper.patch b/patches/server/0005-Fix-gravity-block-duper.patch index 099a6d08..2b933ae7 100644 --- a/patches/server/0005-Fix-gravity-block-duper.patch +++ b/patches/server/0005-Fix-gravity-block-duper.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix gravity block duper diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index fc79183a6bd979d98d79e88422801f9bb2646ea6..98a03fd18916ec2cf0104790d8683ebbfe87ba8e 100644 +index 8544ee07fa72f848e330697823233a201f8cd052..62e90767096b8998253d4bde99ec7968bd079529 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -513,36 +513,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -514,36 +514,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this)); } // Paper end - optimise entity tracking @@ -46,7 +46,7 @@ index fc79183a6bd979d98d79e88422801f9bb2646ea6..98a03fd18916ec2cf0104790d8683ebb public Entity(EntityType type, Level world) { this.id = Entity.ENTITY_COUNTER.incrementAndGet(); -@@ -2951,7 +2923,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2952,7 +2924,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } this.processPortalCooldown(); @@ -56,7 +56,7 @@ index fc79183a6bd979d98d79e88422801f9bb2646ea6..98a03fd18916ec2cf0104790d8683ebb } diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index ce2c3c146ef64400e00084bd2245d2b87a67fbc2..12aae043042c5352fbe564fc777172a6adb19680 100644 +index 536856300da929c101f50da5827677bada5feb50..5537ee2c32367ad253f4fdad5d9e74980013153f 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -64,7 +64,7 @@ public class FallingBlockEntity extends Entity { diff --git a/patches/server/0009-Fakeplayer-support.patch b/patches/server/0009-Fakeplayer-support.patch index d1e0f280..9b6db1f5 100644 --- a/patches/server/0009-Fakeplayer-support.patch +++ b/patches/server/0009-Fakeplayer-support.patch @@ -61,10 +61,10 @@ index 26888ebd38280de92e41dd8006d2b24e874afe26..a1ce0cce055ad5c92b0f20760471795f AdvancementProgress advancementprogress = this.getOrStartProgress(advancement); boolean flag1 = advancementprogress.isDone(); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index a0053455eaeca04855b689f3b00b78dac39d08e3..fa1125c32f601e67fa3f9a1912b430cf975a1af8 100644 +index 98df2463bf41fc736aa6a2b6ddf89e5abde6eb39..efd4c9882338559f8fba3b17919270f06ee5d8b6 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -183,6 +183,7 @@ import org.bukkit.event.player.PlayerTeleportEvent; +@@ -185,6 +185,7 @@ import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; import org.bukkit.event.player.PlayerToggleSneakEvent; import org.bukkit.inventory.MainHand; @@ -72,7 +72,7 @@ index a0053455eaeca04855b689f3b00b78dac39d08e3..fa1125c32f601e67fa3f9a1912b430cf // CraftBukkit end public class ServerPlayer extends Player { -@@ -1222,6 +1223,13 @@ public class ServerPlayer extends Player { +@@ -1224,6 +1225,13 @@ public class ServerPlayer extends Player { this.lastSentHealth = -1.0F; this.lastSentFood = -1; @@ -87,7 +87,7 @@ index a0053455eaeca04855b689f3b00b78dac39d08e3..fa1125c32f601e67fa3f9a1912b430cf PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver1.getWorld()); this.level.getCraftServer().getPluginManager().callEvent(changeEvent); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 4d837c1530a3031a4c2a5a39d87bd013d60e14a6..18fde115b543f6db866779f20f363fab8d569dd6 100644 +index 5c21de0d48fba88c3164b72e0eb624706b683fab..1b62288cd4d4cd4bb9e44795dcb08fea850051dc 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -81,6 +81,7 @@ import net.minecraft.server.ServerScoreboard; @@ -106,15 +106,7 @@ index 4d837c1530a3031a4c2a5a39d87bd013d60e14a6..18fde115b543f6db866779f20f363fab import org.slf4j.Logger; // CraftBukkit start -@@ -118,7 +120,6 @@ import org.bukkit.Location; - import org.bukkit.craftbukkit.CraftServer; - import org.bukkit.craftbukkit.CraftWorld; - import org.bukkit.craftbukkit.entity.CraftPlayer; --import org.bukkit.craftbukkit.util.CraftChatMessage; - import org.bukkit.entity.Player; - import org.bukkit.event.player.PlayerChangedWorldEvent; - import org.bukkit.event.player.PlayerJoinEvent; -@@ -333,6 +334,19 @@ public abstract class PlayerList { +@@ -335,6 +337,19 @@ public abstract class PlayerList { return; } @@ -134,7 +126,7 @@ index 4d837c1530a3031a4c2a5a39d87bd013d60e14a6..18fde115b543f6db866779f20f363fab final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure -@@ -1077,11 +1091,16 @@ public abstract class PlayerList { +@@ -1079,11 +1094,16 @@ public abstract class PlayerList { } public String[] getPlayerNamesArray() { @@ -152,7 +144,7 @@ index 4d837c1530a3031a4c2a5a39d87bd013d60e14a6..18fde115b543f6db866779f20f363fab return astring; } -@@ -1545,4 +1564,16 @@ public abstract class PlayerList { +@@ -1547,4 +1567,16 @@ public abstract class PlayerList { public boolean isAllowCheatsForAllPlayers() { return this.allowCheatsForAllPlayers; } @@ -183,7 +175,7 @@ index 0629c471d38a77c44fc1c86ccdfcb0690f61ca17..3476b51ded6488ef54dc5c10bdb4b48a if (itemstack.getItem() instanceof SwordItem) { diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -index d77410588a1c10d8ac902f21a8bd7e35f74fecd2..f6b462314450a234d639ee96ae22575c207aa131 100644 +index bcb0f3fd09ed064b64dc6495302b40828d906837..fbc09a6c84d6d16c7825a9a210ebe79bfdbaaabd 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java @@ -61,7 +61,7 @@ public class FishingHook extends Projectile { @@ -233,7 +225,7 @@ index c84908095a93d42826b21bf5f3490410fb0a5708..4b0bdf8705eadd2ca6c0fd5a3494fd87 FeatureFlagSet featureflagset = player.getLevel().enabledFeatures(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 57a0dbb23a32123d30c3b3572f4d129be9d97847..deb7057a684b81741edb9f0903cda0439df5623d 100644 +index 56c75029a94e8812c9e0ce5375aaa7cbcda90b87..bd3ef5cf7f13a24be86cbeecf264bc76b16124ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -191,6 +191,8 @@ import org.bukkit.plugin.Plugin; diff --git a/patches/server/0017-No-chat-sign.patch b/patches/server/0017-No-chat-sign.patch index e5d59f48..54d85981 100644 --- a/patches/server/0017-No-chat-sign.patch +++ b/patches/server/0017-No-chat-sign.patch @@ -123,10 +123,10 @@ index cd0f05aa0f2720d450ee1b975648e73dc22ac9a5..90d284192f27a69f6694544c885c3e4d protected boolean convertOldUsers() { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9c5754ac3b00d3f0cb80ec83a2beefadee6d0a14..7221272dd2786dd47afb6af5d4198ed96af1cce3 100644 +index aa287d7f37f38d938d195114408cb6dbda59063d..fe5355824a87e4b792dd1e7cc731ce1ed8d9fef6 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2142,10 +2142,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2143,10 +2143,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void send(Packet packet) { @@ -155,10 +155,10 @@ index 9c5754ac3b00d3f0cb80ec83a2beefadee6d0a14..7221272dd2786dd47afb6af5d4198ed9 if (packet == null || this.processedDisconnect) { // Spigot return; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 18fde115b543f6db866779f20f363fab8d569dd6..4b01d4e247936b56cc4a833002ee081fb12dc0b0 100644 +index 1b62288cd4d4cd4bb9e44795dcb08fea850051dc..e38ad358f9fc4c4567e48f87ab57a39f6d2cd466 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1440,7 +1440,7 @@ public abstract class PlayerList { +@@ -1443,7 +1443,7 @@ public abstract class PlayerList { } public boolean verifyChatTrusted(PlayerChatMessage message) { // Paper - private -> public diff --git a/patches/server/0022-Optimize-entity-coordinate-key.patch b/patches/server/0022-Optimize-entity-coordinate-key.patch index ecf97c5f..09d36ff4 100644 --- a/patches/server/0022-Optimize-entity-coordinate-key.patch +++ b/patches/server/0022-Optimize-entity-coordinate-key.patch @@ -25,10 +25,10 @@ index 6efb8b10f17c70b05128039376d254e6beda3841..abbb75af4ffad5b82d8b785b4a747b06 public static long getCoordinateKey(final ChunkPos pair) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index a5842db77bdba6061e0bdd8a7118d93e16d9f793..14dc0a75043274bf0ff31f4982ca7224e8db6c19 100644 +index 62e90767096b8998253d4bde99ec7968bd079529..6bac5eb6534b6f5c47a136afa17a3dd7b2bc1577 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -291,7 +291,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -292,7 +292,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public double yo; public double zo; private Vec3 position; diff --git a/patches/server/0034-Reduce-entity-allocations.patch b/patches/server/0034-Reduce-entity-allocations.patch index 3c27b9a5..bc5ff9bc 100644 --- a/patches/server/0034-Reduce-entity-allocations.patch +++ b/patches/server/0034-Reduce-entity-allocations.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Reduce entity allocations This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 14dc0a75043274bf0ff31f4982ca7224e8db6c19..9f5b14295f85d32a8ebee44b3aab939cb7ea6230 100644 +index 6bac5eb6534b6f5c47a136afa17a3dd7b2bc1577..91d87917ce7b693c4cc55a5e9c98320b4e7a5ef9 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -416,6 +416,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -417,6 +417,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return this.originWorld; } // Paper end diff --git a/patches/server/0037-Remove-streams-from-getting-nearby-players.patch b/patches/server/0037-Remove-streams-from-getting-nearby-players.patch index 47834d3c..a4d64b15 100644 --- a/patches/server/0037-Remove-streams-from-getting-nearby-players.patch +++ b/patches/server/0037-Remove-streams-from-getting-nearby-players.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Remove streams from getting nearby players This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 9f5b14295f85d32a8ebee44b3aab939cb7ea6230..cf1694ada40fab9e06f702bcf6bf3a6a07b2cee3 100644 +index 91d87917ce7b693c4cc55a5e9c98320b4e7a5ef9..57f32de8f536eedda907ab352ca3f2b29f4db6c3 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -492,25 +492,50 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -493,25 +493,50 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.isLegacyTrackingEntity = isLegacyTrackingEntity; } diff --git a/patches/server/0042-Reduce-entity-fluid-lookups-if-no-fluids.patch b/patches/server/0042-Reduce-entity-fluid-lookups-if-no-fluids.patch index 182954e9..d61a9361 100644 --- a/patches/server/0042-Reduce-entity-fluid-lookups-if-no-fluids.patch +++ b/patches/server/0042-Reduce-entity-fluid-lookups-if-no-fluids.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Reduce entity fluid lookups if no fluids This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index cf1694ada40fab9e06f702bcf6bf3a6a07b2cee3..f0b113a4da3e5f6f064e5daa50ac9171d4563078 100644 +index 57f32de8f536eedda907ab352ca3f2b29f4db6c3..0f5ad5a35bc47a46da0f0b5a0ca3350b7992000c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4168,16 +4168,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4169,16 +4169,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public boolean updateFluidHeightAndDoFluidPushing(TagKey tag, double speed) { @@ -35,7 +35,7 @@ index cf1694ada40fab9e06f702bcf6bf3a6a07b2cee3..f0b113a4da3e5f6f064e5daa50ac9171 double d1 = 0.0D; boolean flag = this.isPushedByFluid(); boolean flag1 = false; -@@ -4185,38 +4187,123 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4186,38 +4188,123 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { int k1 = 0; BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos(); diff --git a/patches/server/0045-PCA-sync-protocol.patch b/patches/server/0045-PCA-sync-protocol.patch index d725dae6..16bea929 100644 --- a/patches/server/0045-PCA-sync-protocol.patch +++ b/patches/server/0045-PCA-sync-protocol.patch @@ -6,10 +6,10 @@ Subject: [PATCH] PCA sync protocol This patch is Powered by plusls-carpet-addition(https://github.com/plusls/plusls-carpet-addition) diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7221272dd2786dd47afb6af5d4198ed96af1cce3..8985a92d78ebf150088f8a1f9df7dd881a7789b0 100644 +index fe5355824a87e4b792dd1e7cc731ce1ed8d9fef6..d0e06dd6097d8983fed7aac1b1c839d480981c89 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -244,6 +244,7 @@ import org.bukkit.inventory.CraftingInventory; +@@ -245,6 +245,7 @@ import org.bukkit.inventory.CraftingInventory; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.SmithingInventory; @@ -17,7 +17,7 @@ index 7221272dd2786dd47afb6af5d4198ed96af1cce3..8985a92d78ebf150088f8a1f9df7dd88 // CraftBukkit end public class ServerGamePacketListenerImpl implements ServerPlayerConnection, TickablePacketListener, ServerGamePacketListener { -@@ -3575,6 +3576,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3582,6 +3583,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.disconnect("Invalid payload UNREGISTER!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); // Paper - kick event cause } } else { @@ -35,10 +35,10 @@ index 7221272dd2786dd47afb6af5d4198ed96af1cce3..8985a92d78ebf150088f8a1f9df7dd88 byte[] data = new byte[packet.data.readableBytes()]; packet.data.readBytes(data); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 4b01d4e247936b56cc4a833002ee081fb12dc0b0..cf961362bcfa2f8d3042a0f0995a35d9bbcb4f6f 100644 +index e38ad358f9fc4c4567e48f87ab57a39f6d2cd466..4e63c4b9f873dc392646f758e1dff8bf72a7bf06 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -346,6 +346,7 @@ public abstract class PlayerList { +@@ -349,6 +349,7 @@ public abstract class PlayerList { bot1.render(playerconnection, true,player.getBukkitEntity().getWorld() == bot1.getBukkitEntity().getWorld())); // Leaves - render bot } // Leaves end - bot support @@ -343,10 +343,10 @@ index b7686fd63b7c5d88c3a12ec4ee9bc01a17f997e0..25a9c38c60d183bb65b14f4d7550ab98 public int[] getSlotsForFace(Direction side) { return ShulkerBoxBlockEntity.SLOTS; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d6e2c67650341f823f08c07c3eb576530959338d..7f2602056b595ab7435defb9ddfb66889ad5f08d 100644 +index 4cc3d03b30db2057b6e03a3b3e92459f8ad81eae..5821d377f54dddbdf4766311f76ccacb35b262e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -381,6 +381,7 @@ public final class CraftServer implements Server { +@@ -382,6 +382,7 @@ public final class CraftServer implements Server { MapPalette.setMapColorCache(new CraftMapColorCache(this.logger)); } datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper @@ -354,7 +354,7 @@ index d6e2c67650341f823f08c07c3eb576530959338d..7f2602056b595ab7435defb9ddfb6688 } public boolean getCommandBlockOverride(String command) { -@@ -957,6 +958,13 @@ public final class CraftServer implements Server { +@@ -958,6 +959,13 @@ public final class CraftServer implements Server { org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot this.console.paperConfigurations.reloadConfigs(this.console); top.leavesmc.leaves.LeavesConfig.init((File) console.options.valueOf("leaves-settings")); // Leaves - Server Config diff --git a/patches/server/0046-BBOR-Protocol.patch b/patches/server/0046-BBOR-Protocol.patch index cf9ddd0d..8d712e4f 100644 --- a/patches/server/0046-BBOR-Protocol.patch +++ b/patches/server/0046-BBOR-Protocol.patch @@ -18,10 +18,10 @@ index 161321c0064f55ba3623d24dfabf6a9bfd55e5ae..b02c2dbed413a06d01e41a3dbd1701d0 for (int i = 0; i < this.tickables.size(); ++i) { ((Runnable) this.tickables.get(i)).run(); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 8985a92d78ebf150088f8a1f9df7dd881a7789b0..a859aac2accb462c2f3ed1a93a34e0bba8a0acb5 100644 +index d0e06dd6097d8983fed7aac1b1c839d480981c89..01e524b5c4f810028f85549fe16c57fdac20cd6c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3581,6 +3581,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3588,6 +3588,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (top.leavesmc.leaves.LeavesConfig.pcaSyncProtocol && ProtocolUtils.isNamespacePacket(packet, top.leavesmc.leaves.protocol.PcaSyncProtocol.PROTOCOL_ID)) { top.leavesmc.leaves.protocol.PcaSyncProtocol.handlePacket(server, player, packet); } @@ -32,10 +32,10 @@ index 8985a92d78ebf150088f8a1f9df7dd881a7789b0..a859aac2accb462c2f3ed1a93a34e0bb ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); this.disconnect("Invalid custom payload!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index cf961362bcfa2f8d3042a0f0995a35d9bbcb4f6f..61266233d27e97dc21c0291c66341bd2d2efbdf5 100644 +index 4e63c4b9f873dc392646f758e1dff8bf72a7bf06..378333c7ebf2b9c7400e3cf7efc7d02bad23b8db 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -347,6 +347,7 @@ public abstract class PlayerList { +@@ -350,6 +350,7 @@ public abstract class PlayerList { } // Leaves end - bot support top.leavesmc.leaves.protocol.PcaSyncProtocol.onJoin(player); // Leaves - pca @@ -43,7 +43,7 @@ index cf961362bcfa2f8d3042a0f0995a35d9bbcb4f6f..61266233d27e97dc21c0291c66341bd2 final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); -@@ -590,6 +591,7 @@ public abstract class PlayerList { +@@ -593,6 +594,7 @@ public abstract class PlayerList { return this.remove(entityplayer, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : PaperAdventure.asAdventure(entityplayer.getDisplayName()))); } public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer, net.kyori.adventure.text.Component leaveMessage) { @@ -51,7 +51,7 @@ index cf961362bcfa2f8d3042a0f0995a35d9bbcb4f6f..61266233d27e97dc21c0291c66341bd2 // Paper end ServerLevel worldserver = entityplayer.getLevel(); -@@ -1559,7 +1561,7 @@ public abstract class PlayerList { +@@ -1562,7 +1564,7 @@ public abstract class PlayerList { entityplayer.connection.send(packetplayoutrecipeupdate); entityplayer.getRecipeBook().sendInitialRecipeBook(entityplayer); } @@ -77,10 +77,10 @@ index 19012c60ea6f725248f7e4a18d78eb1025f4b3a4..3a093befff648b394afd51d44b85f935 public Level getLevel() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7f2602056b595ab7435defb9ddfb66889ad5f08d..14553aaea6224fe7e6461c64d1ba2b0d427d0cda 100644 +index 5821d377f54dddbdf4766311f76ccacb35b262e4..56411422eff8fe741fe15e278293dddb69654c6a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -965,6 +965,13 @@ public final class CraftServer implements Server { +@@ -966,6 +966,13 @@ public final class CraftServer implements Server { top.leavesmc.leaves.protocol.PcaSyncProtocol.disablePcaSyncProtocolGlobal(); } // Leaves end - pca diff --git a/patches/server/0049-Jade-Protocol.patch b/patches/server/0049-Jade-Protocol.patch index 0c1ab12a..4b485690 100644 --- a/patches/server/0049-Jade-Protocol.patch +++ b/patches/server/0049-Jade-Protocol.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Jade Protocol This patch is Powered by Jade(https://github.com/Snownee/Jade) diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a859aac2accb462c2f3ed1a93a34e0bba8a0acb5..b7264b1bcbc72adc44fdca3a2990c037deeadc13 100644 +index 01e524b5c4f810028f85549fe16c57fdac20cd6c..9f3898e3b079a1d59e66546c66a64b3f5179b0b5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3584,6 +3584,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3591,6 +3591,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (top.leavesmc.leaves.LeavesConfig.bborProtocol && packet.identifier.equals(top.leavesmc.leaves.protocol.BBORProtocol.SUBSCRIBE)) { top.leavesmc.leaves.protocol.BBORProtocol.onPlayerSubscribed(player); } @@ -20,10 +20,10 @@ index a859aac2accb462c2f3ed1a93a34e0bba8a0acb5..b7264b1bcbc72adc44fdca3a2990c037 ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); this.disconnect("Invalid custom payload!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 61266233d27e97dc21c0291c66341bd2d2efbdf5..63ed9e70756a3bed4a4357b2dcf3f201b0a61833 100644 +index 378333c7ebf2b9c7400e3cf7efc7d02bad23b8db..5a697351408e5f681620328996b06dfda0fa2f34 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -348,6 +348,7 @@ public abstract class PlayerList { +@@ -351,6 +351,7 @@ public abstract class PlayerList { // Leaves end - bot support top.leavesmc.leaves.protocol.PcaSyncProtocol.onJoin(player); // Leaves - pca top.leavesmc.leaves.protocol.BBORProtocol.onPlayerLoggedIn(player); // Leaves - bbor @@ -45,10 +45,10 @@ index 9058f9f2e561cda9f475f33218bf7a78297de4bc..196adc124a06e7c7712e4f70fada6d50 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 14553aaea6224fe7e6461c64d1ba2b0d427d0cda..640bf562bc2b29bbba5375eea5bc4714b4bb9873 100644 +index 56411422eff8fe741fe15e278293dddb69654c6a..b669bfc2b3d9271e173015d20fa8753423307ec8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -382,6 +382,7 @@ public final class CraftServer implements Server { +@@ -383,6 +383,7 @@ public final class CraftServer implements Server { } datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper top.leavesmc.leaves.protocol.PcaSyncProtocol.init(); // Leaves - pca @@ -56,7 +56,7 @@ index 14553aaea6224fe7e6461c64d1ba2b0d427d0cda..640bf562bc2b29bbba5375eea5bc4714 } public boolean getCommandBlockOverride(String command) { -@@ -972,6 +973,11 @@ public final class CraftServer implements Server { +@@ -973,6 +974,11 @@ public final class CraftServer implements Server { top.leavesmc.leaves.protocol.BBORProtocol.loggedOutAllPlayer(); } // Leaves end - bbor diff --git a/patches/server/0050-Carpet-alternative-block-placement-Protocol.patch b/patches/server/0050-Carpet-alternative-block-placement-Protocol.patch index 72a64411..0e8cdae5 100644 --- a/patches/server/0050-Carpet-alternative-block-placement-Protocol.patch +++ b/patches/server/0050-Carpet-alternative-block-placement-Protocol.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Carpet alternative block placement Protocol This patch is Powered by carpet-extra(https://github.com/gnembon/carpet-extra) diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b7264b1bcbc72adc44fdca3a2990c037deeadc13..845858a5d24af704e360af16753e533ad6b43d33 100644 +index 9f3898e3b079a1d59e66546c66a64b3f5179b0b5..cbf9750994ca008f467d82e34a455efd7d7e87bb 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1947,7 +1947,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1948,7 +1948,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic Vec3 vec3d2 = vec3d.subtract(vec3d1); double d0 = 1.0000001D; diff --git a/patches/server/0051-Player-operation-limiter.patch b/patches/server/0051-Player-operation-limiter.patch index 7284ed59..776fc276 100644 --- a/patches/server/0051-Player-operation-limiter.patch +++ b/patches/server/0051-Player-operation-limiter.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Player operation limiter This patch is Powered by plusls-carpet-addition(https://github.com/plusls/plusls-carpet-addition) diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index fa1125c32f601e67fa3f9a1912b430cf975a1af8..6d2c2a73fe06c4b45ccc43a2702539ec824b2989 100644 +index efd4c9882338559f8fba3b17919270f06ee5d8b6..c15eadd90e143a7b2a1974fff696b1b2426d3fb8 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -276,6 +276,10 @@ public class ServerPlayer extends Player { +@@ -278,6 +278,10 @@ public class ServerPlayer extends Player { public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event @@ -20,7 +20,7 @@ index fa1125c32f601e67fa3f9a1912b430cf975a1af8..6d2c2a73fe06c4b45ccc43a2702539ec public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) { super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile); -@@ -668,6 +672,7 @@ public class ServerPlayer extends Player { +@@ -670,6 +674,7 @@ public class ServerPlayer extends Player { this.joining = false; } // CraftBukkit end @@ -28,7 +28,7 @@ index fa1125c32f601e67fa3f9a1912b430cf975a1af8..6d2c2a73fe06c4b45ccc43a2702539ec this.gameMode.tick(); this.wardenSpawnTracker.tick(); --this.spawnInvulnerableTime; -@@ -2558,5 +2563,32 @@ public class ServerPlayer extends Player { +@@ -2571,5 +2576,32 @@ public class ServerPlayer extends Player { public CraftPlayer getBukkitEntity() { return (CraftPlayer) super.getBukkitEntity(); } diff --git a/patches/server/0056-Return-nether-portal-fix.patch b/patches/server/0056-Return-nether-portal-fix.patch index 21235391..de6e9e84 100644 --- a/patches/server/0056-Return-nether-portal-fix.patch +++ b/patches/server/0056-Return-nether-portal-fix.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Return nether portal fix This patch is powered by NetherPortalFix(https://github.com/TwelveIterationMods/NetherPortalFix) diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 6d2c2a73fe06c4b45ccc43a2702539ec824b2989..07ef654c1c3eca0b28f2f788935a9eb9f2c8073d 100644 +index c15eadd90e143a7b2a1974fff696b1b2426d3fb8..04203fd2f4e790e0d1f306a11cb17ad668dc75f5 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -184,6 +184,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; +@@ -186,6 +186,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; import org.bukkit.event.player.PlayerToggleSneakEvent; import org.bukkit.inventory.MainHand; import top.leavesmc.leaves.bot.ServerBot; @@ -17,7 +17,7 @@ index 6d2c2a73fe06c4b45ccc43a2702539ec824b2989..07ef654c1c3eca0b28f2f788935a9eb9 // CraftBukkit end public class ServerPlayer extends Player { -@@ -1239,6 +1240,24 @@ public class ServerPlayer extends Player { +@@ -1241,6 +1242,24 @@ public class ServerPlayer extends Player { PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver1.getWorld()); this.level.getCraftServer().getPluginManager().callEvent(changeEvent); // CraftBukkit end @@ -42,7 +42,7 @@ index 6d2c2a73fe06c4b45ccc43a2702539ec824b2989..07ef654c1c3eca0b28f2f788935a9eb9 } // Paper start if (this.isBlocking()) { -@@ -1291,6 +1310,30 @@ public class ServerPlayer extends Player { +@@ -1293,6 +1312,30 @@ public class ServerPlayer extends Player { protected Optional getExitPortal(ServerLevel worldserver, BlockPos blockposition, boolean flag, WorldBorder worldborder, int searchRadius, boolean canCreatePortal, int createRadius) { // CraftBukkit Optional optional = super.getExitPortal(worldserver, blockposition, flag, worldborder, searchRadius, canCreatePortal, createRadius); // CraftBukkit @@ -74,7 +74,7 @@ index 6d2c2a73fe06c4b45ccc43a2702539ec824b2989..07ef654c1c3eca0b28f2f788935a9eb9 return optional; } else { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 63ed9e70756a3bed4a4357b2dcf3f201b0a61833..e78973ade9c934a6b8472ae83ff47bbf328996b4 100644 +index 5a697351408e5f681620328996b06dfda0fa2f34..7bda5a4766cbe3a1f96851a58e1bd1dd4756d527 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -27,6 +27,8 @@ import java.util.UUID; @@ -86,8 +86,8 @@ index 63ed9e70756a3bed4a4357b2dcf3f201b0a61833..e78973ade9c934a6b8472ae83ff47bbf import net.minecraft.ChatFormatting; import net.minecraft.FileUtil; import net.minecraft.commands.CommandSourceStack; -@@ -129,6 +131,8 @@ import org.bukkit.event.player.PlayerRespawnEvent; - import org.bukkit.event.player.PlayerRespawnEvent.RespawnReason; +@@ -132,6 +134,8 @@ import org.bukkit.event.player.PlayerRespawnEvent.RespawnReason; + import org.bukkit.event.player.PlayerSpawnChangeEvent; // CraftBukkit end +import top.leavesmc.leaves.util.ReturnPortalManager; // Leaves - return portal fix @@ -95,7 +95,7 @@ index 63ed9e70756a3bed4a4357b2dcf3f201b0a61833..e78973ade9c934a6b8472ae83ff47bbf public abstract class PlayerList { public static final File USERBANLIST_FILE = new File("banned-players.json"); -@@ -972,6 +976,24 @@ public abstract class PlayerList { +@@ -975,6 +979,24 @@ public abstract class PlayerList { if (fromWorld != location.getWorld()) { PlayerChangedWorldEvent event = new PlayerChangedWorldEvent(entityplayer.getBukkitEntity(), fromWorld); server.server.getPluginManager().callEvent(event); diff --git a/patches/server/0057-Appleskin-Protocol.patch b/patches/server/0057-Appleskin-Protocol.patch index 075bdccf..b4321527 100644 --- a/patches/server/0057-Appleskin-Protocol.patch +++ b/patches/server/0057-Appleskin-Protocol.patch @@ -17,10 +17,10 @@ index b02c2dbed413a06d01e41a3dbd1701d070c27d5b..7c90cc6ceedd4103c210757b2cc8a6ee MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper for (int i = 0; i < this.tickables.size(); ++i) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index e78973ade9c934a6b8472ae83ff47bbf328996b4..023196e501f627621861851d3bcd7576d883994d 100644 +index 7bda5a4766cbe3a1f96851a58e1bd1dd4756d527..afb3bbe9589e5398cd6a2252417f225ae773de43 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -353,6 +353,7 @@ public abstract class PlayerList { +@@ -356,6 +356,7 @@ public abstract class PlayerList { top.leavesmc.leaves.protocol.PcaSyncProtocol.onJoin(player); // Leaves - pca top.leavesmc.leaves.protocol.BBORProtocol.onPlayerLoggedIn(player); // Leaves - bbor top.leavesmc.leaves.protocol.JadeProtocol.onPlayerJoin(player); // Leaves - Jade @@ -28,7 +28,7 @@ index e78973ade9c934a6b8472ae83ff47bbf328996b4..023196e501f627621861851d3bcd7576 final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); -@@ -597,6 +598,7 @@ public abstract class PlayerList { +@@ -600,6 +601,7 @@ public abstract class PlayerList { } public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer, net.kyori.adventure.text.Component leaveMessage) { top.leavesmc.leaves.protocol.BBORProtocol.onPlayerLoggedOut(entityplayer); // Leaves - bbor @@ -37,10 +37,10 @@ index e78973ade9c934a6b8472ae83ff47bbf328996b4..023196e501f627621861851d3bcd7576 ServerLevel worldserver = entityplayer.getLevel(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 640bf562bc2b29bbba5375eea5bc4714b4bb9873..2a4c9ed93790a77b00dcc32996043f5a6304c09a 100644 +index b669bfc2b3d9271e173015d20fa8753423307ec8..79dbeceee5a89dd97873f06a2c08b0798ded68fa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -978,6 +978,13 @@ public final class CraftServer implements Server { +@@ -979,6 +979,13 @@ public final class CraftServer implements Server { top.leavesmc.leaves.protocol.JadeProtocol.enableAllPlayer(); } // Leaves end - Jade diff --git a/patches/server/0058-Xaero-Map-Protocol.patch b/patches/server/0058-Xaero-Map-Protocol.patch index e8493aeb..4e31821a 100644 --- a/patches/server/0058-Xaero-Map-Protocol.patch +++ b/patches/server/0058-Xaero-Map-Protocol.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Xaero Map Protocol diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 023196e501f627621861851d3bcd7576d883994d..528a039c1edc2edafadd56b5dc5cb337d72edab2 100644 +index afb3bbe9589e5398cd6a2252417f225ae773de43..3d2302c87160be94f73b43625049efd68a490f82 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1285,6 +1285,7 @@ public abstract class PlayerList { +@@ -1288,6 +1288,7 @@ public abstract class PlayerList { player.connection.send(new ClientboundInitializeBorderPacket(worldborder)); player.connection.send(new ClientboundSetTimePacket(world.getGameTime(), world.getDayTime(), world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); player.connection.send(new ClientboundSetDefaultSpawnPositionPacket(world.getSharedSpawnPos(), world.getSharedSpawnAngle())); diff --git a/patches/server/0060-Use-vanilla-random-config.patch b/patches/server/0060-Use-vanilla-random-config.patch index 4bfbc89d..67301c03 100644 --- a/patches/server/0060-Use-vanilla-random-config.patch +++ b/patches/server/0060-Use-vanilla-random-config.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Use vanilla random config diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index f0b113a4da3e5f6f064e5daa50ac9171d4563078..6425a01d622d0b9b377614b95fc9d4b4b404eec0 100644 +index 0f5ad5a35bc47a46da0f0b5a0ca3350b7992000c..ab05e4cae6a86d42ec054cf17e8d51068e1550cf 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -550,7 +550,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -551,7 +551,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.bb = Entity.INITIAL_AABB; this.stuckSpeedMultiplier = Vec3.ZERO; this.nextStep = 1.0F; diff --git a/patches/server/0063-Syncmatica-Protocol.patch b/patches/server/0063-Syncmatica-Protocol.patch index 6e5f0806..de80ae3f 100644 --- a/patches/server/0063-Syncmatica-Protocol.patch +++ b/patches/server/0063-Syncmatica-Protocol.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Syncmatica Protocol This patch is Powered by Syncmatica(https://github.com/End-Tech/syncmatica) diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 845858a5d24af704e360af16753e533ad6b43d33..735c9ac641671c4a92de3fc079664be446aaab5f 100644 +index cbf9750994ca008f467d82e34a455efd7d7e87bb..fa6400b62905d7cbf8ec35b220121240e8651cd5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -321,6 +321,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -322,6 +322,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.chatMessageChain = new FutureChain(server.chatExecutor); // CraftBukkit - async chat // CraftBukkit start - add fields and methods this.cserver = server.server; @@ -22,7 +22,7 @@ index 845858a5d24af704e360af16753e533ad6b43d33..735c9ac641671c4a92de3fc079664be4 } private final org.bukkit.craftbukkit.CraftServer cserver; -@@ -345,6 +351,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -346,6 +352,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end @@ -31,7 +31,7 @@ index 845858a5d24af704e360af16753e533ad6b43d33..735c9ac641671c4a92de3fc079664be4 @Override public void tick() { if (this.ackBlockChangesUpTo > -1) { -@@ -2108,6 +2116,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2109,6 +2117,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.processedDisconnect = true; } // CraftBukkit end @@ -43,7 +43,7 @@ index 845858a5d24af704e360af16753e533ad6b43d33..735c9ac641671c4a92de3fc079664be4 this.chatMessageChain.close(); ServerGamePacketListenerImpl.LOGGER.info("{} lost connection: {}", this.player.getName().getString(), reason.getString()); // CraftBukkit start - Replace vanilla quit message handling with our own. -@@ -3587,6 +3600,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3594,6 +3607,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (top.leavesmc.leaves.LeavesConfig.jadeProtocol && ProtocolUtils.isNamespacePacket(packet, top.leavesmc.leaves.protocol.JadeProtocol.PROTOCOL_ID)) { top.leavesmc.leaves.protocol.JadeProtocol.handlePacket(server, player, packet); }