From 32c195bd4f11d3bdefbc754b7c97d484a352a0fe Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Tue, 7 Jun 2022 17:42:07 -0700 Subject: [PATCH] i love jmp --- ...ble-connection-throttle-kick-message.patch | 8 +-- .../0267-Hook-into-CB-plugin-rewrites.patch | 0 .../server/0268-PreSpawnerSpawnEvent.patch | 4 +- ...269-Add-LivingEntity-getTargetEntity.patch | 6 +-- .../server/0270-Add-sun-related-API.patch | 4 +- .../server/0271-Turtle-API.patch | 6 +-- ...tator-target-events-and-improve-impl.patch | 4 +- ...ther-worlds-for-shooter-of-projectil.patch | 2 +- ...4-Add-Velocity-IP-Forwarding-Support.patch | 54 ++++++++----------- .../server/0275-Add-more-Witch-API.patch | 0 ...owned-for-Villager-Aggression-Config.patch | 2 +- ...event-players-from-moving-into-unloa.patch | 10 ++-- ...78-Reset-players-airTicks-on-respawn.patch | 4 +- ...-after-profile-lookups-if-not-needed.patch | 0 ...er-Thread-Pool-and-Thread-Priorities.patch | 12 ++--- .../0281-Optimize-World-Time-Updates.patch | 4 +- ...store-custom-InventoryHolder-support.patch | 2 +- .../0283-Use-Vanilla-Minecart-Speeds.patch | 2 +- 18 files changed, 58 insertions(+), 66 deletions(-) rename patches/{unapplied => }/server/0266-Configurable-connection-throttle-kick-message.patch (81%) rename patches/{unapplied => }/server/0267-Hook-into-CB-plugin-rewrites.patch (100%) rename patches/{unapplied => }/server/0268-PreSpawnerSpawnEvent.patch (91%) rename patches/{unapplied => }/server/0269-Add-LivingEntity-getTargetEntity.patch (95%) rename patches/{unapplied => }/server/0270-Add-sun-related-API.patch (89%) rename patches/{unapplied => }/server/0271-Turtle-API.patch (96%) rename patches/{unapplied => }/server/0272-Call-player-spectator-target-events-and-improve-impl.patch (96%) rename patches/{unapplied => }/server/0273-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch (94%) rename patches/{unapplied => }/server/0274-Add-Velocity-IP-Forwarding-Support.patch (83%) rename patches/{unapplied => }/server/0275-Add-more-Witch-API.patch (100%) rename patches/{unapplied => }/server/0276-Check-Drowned-for-Villager-Aggression-Config.patch (94%) rename patches/{unapplied => }/server/0277-Add-option-to-prevent-players-from-moving-into-unloa.patch (94%) rename patches/{unapplied => }/server/0278-Reset-players-airTicks-on-respawn.patch (83%) rename patches/{unapplied => }/server/0279-Don-t-sleep-after-profile-lookups-if-not-needed.patch (100%) rename patches/{unapplied => }/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch (92%) rename patches/{unapplied => }/server/0281-Optimize-World-Time-Updates.patch (94%) rename patches/{unapplied => }/server/0282-Restore-custom-InventoryHolder-support.patch (99%) rename patches/{unapplied => }/server/0283-Use-Vanilla-Minecart-Speeds.patch (92%) diff --git a/patches/unapplied/server/0266-Configurable-connection-throttle-kick-message.patch b/patches/server/0266-Configurable-connection-throttle-kick-message.patch similarity index 81% rename from patches/unapplied/server/0266-Configurable-connection-throttle-kick-message.patch rename to patches/server/0266-Configurable-connection-throttle-kick-message.patch index 8d23dc2d8..5d2614d75 100644 --- a/patches/unapplied/server/0266-Configurable-connection-throttle-kick-message.patch +++ b/patches/server/0266-Configurable-connection-throttle-kick-message.patch @@ -21,15 +21,15 @@ index 5def23f470c9737884bdf7551e426faf887bca9c..51dd358137d37eb078aff036ccf12db7 Object val = config.get("settings.save-player-data"); if (val instanceof Boolean) { diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index a95b2ee0e80832f786bdb8f3d0bc00cbfae26fd4..86f99fbe3eb7a6c7ef288d7bff1d653df6f34790 100644 +index 4170bda451df3db43e7d57d87d1abb81934d7dad..941a9d8addd44e95c467b34f77658592b9f4ef06 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -@@ -50,7 +50,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL +@@ -49,7 +49,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL synchronized (ServerHandshakePacketListenerImpl.throttleTracker) { if (ServerHandshakePacketListenerImpl.throttleTracker.containsKey(address) && !"127.0.0.1".equals(address.getHostAddress()) && currentTime - ServerHandshakePacketListenerImpl.throttleTracker.get(address) < connectionThrottle) { ServerHandshakePacketListenerImpl.throttleTracker.put(address, currentTime); -- TranslatableComponent chatmessage = new TranslatableComponent("Connection throttled! Please wait before reconnecting."); -+ TranslatableComponent chatmessage = new TranslatableComponent(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage); // Paper - Configurable connection throttle kick message +- MutableComponent chatmessage = Component.literal("Connection throttled! Please wait before reconnecting."); ++ MutableComponent chatmessage = Component.literal(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage); // Paper - Configurable connection throttle kick message this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage)); this.connection.disconnect(chatmessage); return; diff --git a/patches/unapplied/server/0267-Hook-into-CB-plugin-rewrites.patch b/patches/server/0267-Hook-into-CB-plugin-rewrites.patch similarity index 100% rename from patches/unapplied/server/0267-Hook-into-CB-plugin-rewrites.patch rename to patches/server/0267-Hook-into-CB-plugin-rewrites.patch diff --git a/patches/unapplied/server/0268-PreSpawnerSpawnEvent.patch b/patches/server/0268-PreSpawnerSpawnEvent.patch similarity index 91% rename from patches/unapplied/server/0268-PreSpawnerSpawnEvent.patch rename to patches/server/0268-PreSpawnerSpawnEvent.patch index 0e9cb1f01..1db8901d9 100644 --- a/patches/unapplied/server/0268-PreSpawnerSpawnEvent.patch +++ b/patches/server/0268-PreSpawnerSpawnEvent.patch @@ -9,10 +9,10 @@ SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for spawners. diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 18b1b7c05665ee1fb06670ceded719b19f3a4ee3..1c76a59eb25148bf2523e9d68cc165b6cd3e1d23 100644 +index 031bb42a1921966e8dd45c9e57dcd09f2dece7fb..3e8848cbf22902b1a0e015ecf9e330c9235bc638 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -128,11 +128,11 @@ public abstract class BaseSpawner { +@@ -130,11 +130,11 @@ public abstract class BaseSpawner { org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key); if (type != null) { diff --git a/patches/unapplied/server/0269-Add-LivingEntity-getTargetEntity.patch b/patches/server/0269-Add-LivingEntity-getTargetEntity.patch similarity index 95% rename from patches/unapplied/server/0269-Add-LivingEntity-getTargetEntity.patch rename to patches/server/0269-Add-LivingEntity-getTargetEntity.patch index eefafb25f..2b35aa9de 100644 --- a/patches/unapplied/server/0269-Add-LivingEntity-getTargetEntity.patch +++ b/patches/server/0269-Add-LivingEntity-getTargetEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 681ca7f6049016f7661215e4d5ee56257a32a9b2..1d679a04a49af796074c27d56e8ab07f0b09b002 100644 +index 260f51f6a3d3a6da4ff9a0a3a67193abccb31e56..370ec54f5c6741e7c9f3630e7f42ea7d7a7d1423 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -115,6 +115,7 @@ import net.minecraft.world.level.storage.loot.LootTable; +@@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable; import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.phys.AABB; @@ -16,7 +16,7 @@ index 681ca7f6049016f7661215e4d5ee56257a32a9b2..1d679a04a49af796074c27d56e8ab07f import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; import net.minecraft.world.scores.PlayerTeam; -@@ -3743,6 +3744,38 @@ public abstract class LivingEntity extends Entity { +@@ -3781,6 +3782,38 @@ public abstract class LivingEntity extends Entity { return level.clip(raytrace); } diff --git a/patches/unapplied/server/0270-Add-sun-related-API.patch b/patches/server/0270-Add-sun-related-API.patch similarity index 89% rename from patches/unapplied/server/0270-Add-sun-related-API.patch rename to patches/server/0270-Add-sun-related-API.patch index 2ce2081d0..40952bb82 100644 --- a/patches/unapplied/server/0270-Add-sun-related-API.patch +++ b/patches/server/0270-Add-sun-related-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3c4f06c9446dd769999e8f52bd43709cdd5cf9b0..6871ee1f69b2dced4874c0d28b27b6ba11ef1c9f 100644 +index 5eb8aad09826c94defcc8c42bc395e6a617f60e6..4a98dc57a5d3f3e1e55ba366f38062514e85ed34 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -683,6 +683,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -684,6 +684,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } diff --git a/patches/unapplied/server/0271-Turtle-API.patch b/patches/server/0271-Turtle-API.patch similarity index 96% rename from patches/unapplied/server/0271-Turtle-API.patch rename to patches/server/0271-Turtle-API.patch index fb6ff88d3..ded24b7ec 100644 --- a/patches/unapplied/server/0271-Turtle-API.patch +++ b/patches/server/0271-Turtle-API.patch @@ -18,10 +18,10 @@ index e3983370c09e3e3445c4557fcca50dd25f29cba0..6efba52c2e5d7811ee329ed22c1c76f7 private final int searchRange; private final int verticalSearchRange; diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -index ea1bb6924043dfd05452b793afd7651c867de5dc..1b0be28ebfd7ec2f978b5d87f6d26e4d5913fb06 100644 +index 37125ffe47fcd5fe93ab62ad8a46e8188f362436..69c98c2cb2fd8f149a39bbddcbfe0c5c5adc3904 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -@@ -482,14 +482,17 @@ public class Turtle extends Animal { +@@ -480,14 +480,17 @@ public class Turtle extends Animal { if (!this.turtle.isInWater() && this.isReachedTarget()) { if (this.turtle.layEggCounter < 1) { @@ -42,7 +42,7 @@ index ea1bb6924043dfd05452b793afd7651c867de5dc..1b0be28ebfd7ec2f978b5d87f6d26e4d } // CraftBukkit end this.turtle.setHasEgg(false); -@@ -557,7 +560,7 @@ public class Turtle extends Animal { +@@ -555,7 +558,7 @@ public class Turtle extends Animal { @Override public boolean canUse() { diff --git a/patches/unapplied/server/0272-Call-player-spectator-target-events-and-improve-impl.patch b/patches/server/0272-Call-player-spectator-target-events-and-improve-impl.patch similarity index 96% rename from patches/unapplied/server/0272-Call-player-spectator-target-events-and-improve-impl.patch rename to patches/server/0272-Call-player-spectator-target-events-and-improve-impl.patch index ec6af1953..76559491a 100644 --- a/patches/unapplied/server/0272-Call-player-spectator-target-events-and-improve-impl.patch +++ b/patches/server/0272-Call-player-spectator-target-events-and-improve-impl.patch @@ -19,10 +19,10 @@ spectate the target entity. Co-authored-by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 919fcca5d23002d1637c1f03f2255c74c6df7f5a..02ce18a1904057e74b2953e525818f772c7a5df7 100644 +index db5f63dcb0b44a5ba0a1eae892415af73746d7e1..46c26fb9919b468409ac71cbde48419fbbe46846 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1854,14 +1854,58 @@ public class ServerPlayer extends Player { +@@ -1880,14 +1880,58 @@ public class ServerPlayer extends Player { } public void setCamera(@Nullable Entity entity) { diff --git a/patches/unapplied/server/0273-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/patches/server/0273-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch similarity index 94% rename from patches/unapplied/server/0273-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename to patches/server/0273-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch index 5d84ab043..125086517 100644 --- a/patches/unapplied/server/0273-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch +++ b/patches/server/0273-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch @@ -11,7 +11,7 @@ If the projectile fails to find the shooter in the current world, check other worlds. diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index 54dfc45f9b350a9d4c2872ded5199ad13c797c80..7837fb0419c94731eba618e903353ddc047bbed6 100644 +index cadcd3060e1c0e459ea064d2ac7a3ab5a4214d1d..80fdb953d7a49b05108672e18ea326182fa7cfd6 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java @@ -57,6 +57,18 @@ public abstract class Projectile extends Entity { diff --git a/patches/unapplied/server/0274-Add-Velocity-IP-Forwarding-Support.patch b/patches/server/0274-Add-Velocity-IP-Forwarding-Support.patch similarity index 83% rename from patches/unapplied/server/0274-Add-Velocity-IP-Forwarding-Support.patch rename to patches/server/0274-Add-Velocity-IP-Forwarding-Support.patch index c8c46395b..824e90769 100644 --- a/patches/unapplied/server/0274-Add-Velocity-IP-Forwarding-Support.patch +++ b/patches/server/0274-Add-Velocity-IP-Forwarding-Support.patch @@ -128,18 +128,10 @@ index 0000000000000000000000000000000000000000..41d73aa91fb401612e087aa1b7278ba6 + } +} diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 5ebc450432805d52457b9f8ff1e2b1981bdd78e6..4c06e62e967f28eb844d74237948834e61daeab0 100644 +index 136ff7de4ffb91d3fc84a90560a2f5db84703cff..cbb0865b08185d1c9dc95f6dc5507cc39f92f15e 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -17,6 +17,7 @@ import javax.crypto.Cipher; - import javax.crypto.SecretKey; - import net.minecraft.DefaultUncaughtExceptionHandler; - import net.minecraft.network.Connection; -+import net.minecraft.network.FriendlyByteBuf; - import net.minecraft.network.chat.Component; - import net.minecraft.network.chat.TextComponent; - import net.minecraft.network.chat.TranslatableComponent; -@@ -40,6 +41,7 @@ import org.bukkit.craftbukkit.util.Waitable; +@@ -46,6 +46,7 @@ import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.player.AsyncPlayerPreLoginEvent; import org.bukkit.event.player.PlayerPreLoginEvent; // CraftBukkit end @@ -147,30 +139,30 @@ index 5ebc450432805d52457b9f8ff1e2b1981bdd78e6..4c06e62e967f28eb844d74237948834e public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener { -@@ -58,6 +60,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener +@@ -69,6 +70,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener @Nullable - private ServerPlayer delayedAcceptPlayer; + private ProfilePublicKey playerProfilePublicKey; public String hostname = ""; // CraftBukkit - add field + private int velocityLoginMessageId = -1; // Paper - Velocity support public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) { this.state = ServerLoginPacketListenerImpl.State.HELLO; -@@ -231,6 +234,14 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener - this.state = ServerLoginPacketListenerImpl.State.KEY; - this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce)); - } else { -+ // Paper start - Velocity support -+ if (com.destroystokyo.paper.PaperConfig.velocitySupport) { -+ this.velocityLoginMessageId = java.util.concurrent.ThreadLocalRandom.current().nextInt(); -+ net.minecraft.network.protocol.login.ClientboundCustomQueryPacket packet1 = new net.minecraft.network.protocol.login.ClientboundCustomQueryPacket(this.velocityLoginMessageId, com.destroystokyo.paper.proxy.VelocityProxy.PLAYER_INFO_CHANNEL, new FriendlyByteBuf(Unpooled.EMPTY_BUFFER)); -+ this.connection.send(packet1); -+ return; -+ } -+ // Paper end - // Spigot start +@@ -279,6 +281,14 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener + this.state = ServerLoginPacketListenerImpl.State.KEY; + this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce)); + } else { ++ // Paper start - Velocity support ++ if (com.destroystokyo.paper.PaperConfig.velocitySupport) { ++ this.velocityLoginMessageId = java.util.concurrent.ThreadLocalRandom.current().nextInt(); ++ net.minecraft.network.protocol.login.ClientboundCustomQueryPacket packet1 = new net.minecraft.network.protocol.login.ClientboundCustomQueryPacket(this.velocityLoginMessageId, com.destroystokyo.paper.proxy.VelocityProxy.PLAYER_INFO_CHANNEL, new net.minecraft.network.FriendlyByteBuf(Unpooled.EMPTY_BUFFER)); ++ this.connection.send(packet1); ++ return; ++ } ++ // Paper end + // Spigot start // Paper start - Cache authenticator threads authenticatorPool.execute(new Runnable() { -@@ -338,6 +349,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener +@@ -392,6 +402,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener public class LoginHandler { public void fireEvents() throws Exception { @@ -183,13 +175,13 @@ index 5ebc450432805d52457b9f8ff1e2b1981bdd78e6..4c06e62e967f28eb844d74237948834e String playerName = ServerLoginPacketListenerImpl.this.gameProfile.getName(); java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(); java.util.UUID uniqueId = ServerLoginPacketListenerImpl.this.gameProfile.getId(); -@@ -385,6 +402,40 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener +@@ -439,6 +455,40 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener // Spigot end public void handleCustomQueryPacket(ServerboundCustomQueryPacket packet) { + // Paper start - Velocity support + if (com.destroystokyo.paper.PaperConfig.velocitySupport && packet.getTransactionId() == this.velocityLoginMessageId) { -+ FriendlyByteBuf buf = packet.getData(); ++ net.minecraft.network.FriendlyByteBuf buf = packet.getData(); + if (buf == null) { + this.disconnect("This server requires you to connect with Velocity."); + return; @@ -221,14 +213,14 @@ index 5ebc450432805d52457b9f8ff1e2b1981bdd78e6..4c06e62e967f28eb844d74237948834e + return; + } + // Paper end - this.disconnect(new TranslatableComponent("multiplayer.disconnect.unexpected_query_response")); + this.disconnect(Component.translatable("multiplayer.disconnect.unexpected_query_response")); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ee25c3a9f499017dcd2adbc789030bd2d7cce7c4..c4c7120808a42dc36fbd85d9a842792797193a55 100644 +index 907de15edda4f9b1165d985ff6b2c2a8317f06b5..ff47276975bac1dfa83c310a8944ec6335247a54 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -760,7 +760,7 @@ public final class CraftServer implements Server { +@@ -755,7 +755,7 @@ public final class CraftServer implements Server { @Override public long getConnectionThrottle() { // Spigot Start - Automatically set connection throttle for bungee configurations diff --git a/patches/unapplied/server/0275-Add-more-Witch-API.patch b/patches/server/0275-Add-more-Witch-API.patch similarity index 100% rename from patches/unapplied/server/0275-Add-more-Witch-API.patch rename to patches/server/0275-Add-more-Witch-API.patch diff --git a/patches/unapplied/server/0276-Check-Drowned-for-Villager-Aggression-Config.patch b/patches/server/0276-Check-Drowned-for-Villager-Aggression-Config.patch similarity index 94% rename from patches/unapplied/server/0276-Check-Drowned-for-Villager-Aggression-Config.patch rename to patches/server/0276-Check-Drowned-for-Villager-Aggression-Config.patch index dc3022d4f..ec62c27d6 100644 --- a/patches/unapplied/server/0276-Check-Drowned-for-Villager-Aggression-Config.patch +++ b/patches/server/0276-Check-Drowned-for-Villager-Aggression-Config.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Check Drowned for Villager Aggression Config diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java -index abc88d6dcebec75d4b4336891d480a0b7b1d23df..0a318583a5fc5ecb50f858d93d357baf1edf5a93 100644 +index 2a3e9d3b847c155ba1d18c0711210c3e41bc3eac..1b1305f5eaf5710b72c57ab4c3953e703a23f1e0 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java +++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java @@ -78,7 +78,7 @@ public class Drowned extends Zombie implements RangedAttackMob { diff --git a/patches/unapplied/server/0277-Add-option-to-prevent-players-from-moving-into-unloa.patch b/patches/server/0277-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 94% rename from patches/unapplied/server/0277-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to patches/server/0277-Add-option-to-prevent-players-from-moving-into-unloa.patch index 7190093cf..aad338d79 100644 --- a/patches/unapplied/server/0277-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/patches/server/0277-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -20,10 +20,10 @@ index 85ad9a1a29d0cb11f552d8f34b210f1bf4bdd810..0078fb8df378058a6ddeb5dbea4132c8 + } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 84403ae9d6900c3dfce4e4e9063a28275277fc2d..6c7b30c0363b7965bc71704d8432cf21c20a1cc7 100644 +index 27725c9c1ad03f8f2263c027ebf6f175efb8b986..eea6bd6fa0e08c6242d13d2458bdcbdb67bfbb57 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -498,9 +498,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -525,9 +525,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser double d0 = entity.getX(); double d1 = entity.getY(); double d2 = entity.getZ(); @@ -36,7 +36,7 @@ index 84403ae9d6900c3dfce4e4e9063a28275277fc2d..6c7b30c0363b7965bc71704d8432cf21 float f = Mth.wrapDegrees(packet.getYRot()); float f1 = Mth.wrapDegrees(packet.getXRot()); double d6 = d3 - this.vehicleFirstGoodX; -@@ -535,6 +535,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -562,6 +562,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser } speed *= 2f; // TODO: Get the speed of the vehicle instead of the player @@ -53,7 +53,7 @@ index 84403ae9d6900c3dfce4e4e9063a28275277fc2d..6c7b30c0363b7965bc71704d8432cf21 if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { // CraftBukkit end ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8}); -@@ -1149,9 +1159,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1179,9 +1189,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser this.allowedPlayerTicks = 20; // CraftBukkit } else { this.awaitingTeleportTime = this.tickCount; @@ -66,7 +66,7 @@ index 84403ae9d6900c3dfce4e4e9063a28275277fc2d..6c7b30c0363b7965bc71704d8432cf21 float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot())); float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot())); -@@ -1207,6 +1217,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1237,6 +1247,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser } else { speed = this.player.getAbilities().walkingSpeed * 10f; } diff --git a/patches/unapplied/server/0278-Reset-players-airTicks-on-respawn.patch b/patches/server/0278-Reset-players-airTicks-on-respawn.patch similarity index 83% rename from patches/unapplied/server/0278-Reset-players-airTicks-on-respawn.patch rename to patches/server/0278-Reset-players-airTicks-on-respawn.patch index a70549499..cd26f2bf4 100644 --- a/patches/unapplied/server/0278-Reset-players-airTicks-on-respawn.patch +++ b/patches/server/0278-Reset-players-airTicks-on-respawn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 02ce18a1904057e74b2953e525818f772c7a5df7..d020dd3ce45835813a40b1432f8e203b1ea9911e 100644 +index 46c26fb9919b468409ac71cbde48419fbbe46846..222452a5549e29ef43d183390cc41783aeb8f3e9 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2256,6 +2256,7 @@ public class ServerPlayer extends Player { +@@ -2293,6 +2293,7 @@ public class ServerPlayer extends Player { this.setHealth(this.getMaxHealth()); this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset diff --git a/patches/unapplied/server/0279-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/patches/server/0279-Don-t-sleep-after-profile-lookups-if-not-needed.patch similarity index 100% rename from patches/unapplied/server/0279-Don-t-sleep-after-profile-lookups-if-not-needed.patch rename to patches/server/0279-Don-t-sleep-after-profile-lookups-if-not-needed.patch diff --git a/patches/unapplied/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/patches/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch similarity index 92% rename from patches/unapplied/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch rename to patches/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index 07bee411a..b92d03b4e 100644 --- a/patches/unapplied/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/patches/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -12,10 +12,10 @@ server threads Allow usage of a single thread executor by not using ForkJoin so single core CPU's. diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java -index 307c930d6d295012c8ec6332314b4043befbdafd..47fcfb1e5b65ce2ae3fcdfc5eecf3a1cf4a8d67f 100644 +index d7e22ddf89619b58516ccef1d75a4c33df61b73c..70b8b86ed827217e536e35a690160adf9e974bb5 100644 --- a/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java -@@ -68,8 +68,8 @@ public class Util { +@@ -78,8 +78,8 @@ public class Util { private static final int DEFAULT_MAX_THREADS = 255; private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads"; private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1); @@ -26,7 +26,7 @@ index 307c930d6d295012c8ec6332314b4043befbdafd..47fcfb1e5b65ce2ae3fcdfc5eecf3a1c private static final ExecutorService IO_POOL = makeIoExecutor(); public static LongSupplier timeSource = System::nanoTime; public static final Ticker TICKER = new Ticker() { -@@ -111,14 +111,18 @@ public class Util { +@@ -121,14 +121,18 @@ public class Util { return Instant.now().toEpochMilli(); } @@ -49,7 +49,7 @@ index 307c930d6d295012c8ec6332314b4043befbdafd..47fcfb1e5b65ce2ae3fcdfc5eecf3a1c @Override protected void onTermination(Throwable throwable) { if (throwable != null) { -@@ -134,6 +138,7 @@ public class Util { +@@ -144,6 +148,7 @@ public class Util { return forkJoinWorkerThread; }, Util::onThreadException, true); } @@ -58,10 +58,10 @@ index 307c930d6d295012c8ec6332314b4043befbdafd..47fcfb1e5b65ce2ae3fcdfc5eecf3a1c return executorService; } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 311a51f91f6f4572d56dcd700c652b2690239f75..4525b3012269a98fb825273d358d414e01119abd 100644 +index 2ad76722a54d4cc1a4f4799d14d0148c86e93198..7af89d152b13870a8495f94dffd34c948a9148fa 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -318,6 +318,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop