diff --git a/patches/unapplied/server/0444-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch b/patches/removed/1.19.3/0444-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch similarity index 100% rename from patches/unapplied/server/0444-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch rename to patches/removed/1.19.3/0444-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch diff --git a/patches/unapplied/server/0493-Improve-inlinig-for-some-hot-IBlockData-methods.patch b/patches/removed/1.19.3/0493-Improve-inlinig-for-some-hot-IBlockData-methods.patch similarity index 100% rename from patches/unapplied/server/0493-Improve-inlinig-for-some-hot-IBlockData-methods.patch rename to patches/removed/1.19.3/0493-Improve-inlinig-for-some-hot-IBlockData-methods.patch diff --git a/patches/server/0009-Adventure.patch b/patches/server/0009-Adventure.patch index 37fd9dfc70..26d7a42648 100644 --- a/patches/server/0009-Adventure.patch +++ b/patches/server/0009-Adventure.patch @@ -100,10 +100,10 @@ index 0000000000000000000000000000000000000000..07cd02c6f9df00844b808218be2afd79 +} diff --git a/src/main/java/io/papermc/paper/adventure/ChatDecorationProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatDecorationProcessor.java new file mode 100644 -index 0000000000000000000000000000000000000000..87e791801b624859477025df49824637eb347dec +index 0000000000000000000000000000000000000000..a9c2b67cab07b3a4e996159176919c7695f62951 --- /dev/null +++ b/src/main/java/io/papermc/paper/adventure/ChatDecorationProcessor.java -@@ -0,0 +1,141 @@ +@@ -0,0 +1,140 @@ +package io.papermc.paper.adventure; + +import io.papermc.paper.event.player.AsyncChatCommandDecorateEvent; @@ -146,14 +146,12 @@ index 0000000000000000000000000000000000000000..87e791801b624859477025df49824637 + final @Nullable ServerPlayer player; + final @Nullable CommandSourceStack commandSourceStack; + final Component originalMessage; -+ final boolean isPreview; + -+ public ChatDecorationProcessor(final MinecraftServer server, final @Nullable ServerPlayer player, final @Nullable CommandSourceStack commandSourceStack, final net.minecraft.network.chat.Component originalMessage, final boolean isPreview) { ++ public ChatDecorationProcessor(final MinecraftServer server, final @Nullable ServerPlayer player, final @Nullable CommandSourceStack commandSourceStack, final net.minecraft.network.chat.Component originalMessage) { + this.server = server; + this.player = player; + this.commandSourceStack = commandSourceStack; + this.originalMessage = PaperAdventure.asAdventure(originalMessage); -+ this.isPreview = isPreview; + } + + public CompletableFuture process() { @@ -190,11 +188,12 @@ index 0000000000000000000000000000000000000000..87e791801b624859477025df49824637 + + final Component initialResult = input.message().component(); + final AsyncChatDecorateEvent event; ++ //TODO + if (this.commandSourceStack != null) { + // TODO more command decorate context -+ event = new AsyncChatCommandDecorateEvent(true, player, this.originalMessage, this.isPreview, initialResult); ++ event = new AsyncChatCommandDecorateEvent(true, player, this.originalMessage, false, initialResult); + } else { -+ event = new AsyncChatDecorateEvent(true, player, this.originalMessage, this.isPreview, initialResult); ++ event = new AsyncChatDecorateEvent(true, player, this.originalMessage, false, initialResult); + } + this.post(event); + if (!event.isCancelled() && !event.result().equals(initialResult)) { @@ -1845,7 +1844,7 @@ index 762a9392ffac3042356709dddd15bb3516048bed..3544e2dc2522e9d6305d727d56e73490 buf.writeComponent(this.footer); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0f7dd33d51281b383be0fb47d4e6b133f123ce1f..fce3826745cf753247e0a7df02f3c73cf49dac06 100644 +index 0f7dd33d51281b383be0fb47d4e6b133f123ce1f..011c3d2dbd34dd0c2afba477202c937c654d42a4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -241,6 +241,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { -+ final io.papermc.paper.adventure.ChatDecorationProcessor processor = new io.papermc.paper.adventure.ChatDecorationProcessor(this, sender, commandSourceStack, message, isPreview); ++ return ChatDecorator.create((sender, commandSourceStack, message) -> { ++ final io.papermc.paper.adventure.ChatDecorationProcessor processor = new io.papermc.paper.adventure.ChatDecorationProcessor(this, sender, commandSourceStack, message); + return processor.process(); + }); + // Paper end diff --git a/patches/unapplied/server/0381-Prevent-opening-inventories-when-frozen.patch b/patches/server/0380-Prevent-opening-inventories-when-frozen.patch similarity index 94% rename from patches/unapplied/server/0381-Prevent-opening-inventories-when-frozen.patch rename to patches/server/0380-Prevent-opening-inventories-when-frozen.patch index 0be8769b5a..c86b24adfa 100644 --- a/patches/unapplied/server/0381-Prevent-opening-inventories-when-frozen.patch +++ b/patches/server/0380-Prevent-opening-inventories-when-frozen.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 84bcabdd92cefe16f7bf5270e1d2989dd7d010d7..90992b652941365a46f9e01985365447ba2ff461 100644 +index 300658b41ed77c5f9403c260b6cdc62f3a323a35..21b5f0742f16409ace4fabf44f04d5964d486aeb 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -622,7 +622,7 @@ public class ServerPlayer extends Player { +@@ -644,7 +644,7 @@ public class ServerPlayer extends Player { containerUpdateDelay = level.paperConfig().tickRates.containerUpdate; } // Paper end @@ -17,7 +17,7 @@ index 84bcabdd92cefe16f7bf5270e1d2989dd7d010d7..90992b652941365a46f9e01985365447 this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper this.containerMenu = this.inventoryMenu; } -@@ -1500,7 +1500,7 @@ public class ServerPlayer extends Player { +@@ -1522,7 +1522,7 @@ public class ServerPlayer extends Player { } else { // CraftBukkit start this.containerMenu = container; diff --git a/patches/server/0381-Don-t-run-entity-collision-code-if-not-needed.patch b/patches/server/0381-Don-t-run-entity-collision-code-if-not-needed.patch new file mode 100644 index 0000000000..319b924df8 --- /dev/null +++ b/patches/server/0381-Don-t-run-entity-collision-code-if-not-needed.patch @@ -0,0 +1,43 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf +Date: Wed, 15 Apr 2020 17:56:07 -0700 +Subject: [PATCH] Don't run entity collision code if not needed + +Will not run if: +Max entity cramming is disabled and the max collisions per entity is less than or equal to 0. +Entity#isPushable() returns false, meaning all entities will not be able to collide with this +entity anyways. +The entity's current team collision rule causes them to NEVER collide. + +Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> + +diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java +index 37b1354edb2974e82eaa5c859f58c588df70c575..c5a11e22c44d5adb55844bde964ca43acbc03fdf 100644 +--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java ++++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +@@ -3364,10 +3364,24 @@ public abstract class LivingEntity extends Entity { + if (this.level.isClientSide()) { + this.level.getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush); + } else { ++ // Paper start - don't run getEntities if we're not going to use its result ++ if (!this.isPushable()) { ++ return; ++ } ++ net.minecraft.world.scores.Team team = this.getTeam(); ++ if (team != null && team.getCollisionRule() == net.minecraft.world.scores.Team.CollisionRule.NEVER) { ++ return; ++ } ++ ++ int i = this.level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING); ++ if (i <= 0 && level.paperConfig().collisions.maxEntityCollisions <= 0) { ++ return; ++ } ++ // Paper end - don't run getEntities if we're not going to use its result + List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushableBy(this)); + + if (!list.isEmpty()) { +- int i = this.level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING); ++ // Paper - moved up + int j; + + if (i > 0 && list.size() > i - 1 && this.random.nextInt(4) == 0) { diff --git a/patches/unapplied/server/0383-Implement-Player-Client-Options-API.patch b/patches/server/0382-Implement-Player-Client-Options-API.patch similarity index 96% rename from patches/unapplied/server/0383-Implement-Player-Client-Options-API.patch rename to patches/server/0382-Implement-Player-Client-Options-API.patch index 5bdae6f55a..707a2c77e3 100644 --- a/patches/unapplied/server/0383-Implement-Player-Client-Options-API.patch +++ b/patches/server/0382-Implement-Player-Client-Options-API.patch @@ -87,10 +87,10 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 90992b652941365a46f9e01985365447ba2ff461..fd2bc49f713cccdcb2a3e49db52f56374690c5de 100644 +index 21b5f0742f16409ace4fabf44f04d5964d486aeb..9ec157712b9c891067507f9a308428cee2895fed 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1861,9 +1861,24 @@ public class ServerPlayer extends Player { +@@ -1885,9 +1885,24 @@ public class ServerPlayer extends Player { return s; } @@ -116,10 +116,10 @@ index 90992b652941365a46f9e01985365447ba2ff461..fd2bc49f713cccdcb2a3e49db52f5637 if (getMainArm() != packet.mainHand()) { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index cdc4ef88c8369b3bd1c607ff5301fc1b04ec4582..a9ec1f77b7b9e60d735c72a01f0bce32d3083cb9 100644 +index b9e484ec8173be94fae307830e87a9205e56a11e..d9e278d2f7f4bc767c0211736817748d4ca6dae0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -615,6 +615,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -617,6 +617,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message); } } diff --git a/patches/unapplied/server/0384-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/patches/server/0383-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 100% rename from patches/unapplied/server/0384-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to patches/server/0383-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch diff --git a/patches/unapplied/server/0385-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/patches/server/0384-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 80% rename from patches/unapplied/server/0385-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to patches/server/0384-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index f2a58fb581..79caa4f853 100644 --- a/patches/unapplied/server/0385-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/patches/server/0384-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -31,10 +31,10 @@ delays anymore. public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 9fbdb834559df0da45ea4a61eb3963fa8e371af3..1bf18259505997c39e7880abf49e583cc763beb1 100644 +index e8a52daa2ff7782fa39862e97580234058b8766e..6b01d5b5535887eef0ac7b8a5e0a669a2700e83f 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1024,6 +1024,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1036,6 +1036,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + ": " + entity + (this.entityMap.containsKey(entity.getId()) ? " ALREADY CONTAINED (This would have crashed your server)" : ""), new Throwable()); return; } @@ -43,10 +43,10 @@ index 9fbdb834559df0da45ea4a61eb3963fa8e371af3..1bf18259505997c39e7880abf49e583c if (!(entity instanceof EnderDragonPart)) { EntityType entitytypes = entity.getType(); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index fd2bc49f713cccdcb2a3e49db52f56374690c5de..8660fc4bc748131d9bc3088afb5bb9af073300f8 100644 +index 9ec157712b9c891067507f9a308428cee2895fed..ecaf03a72caac6e7866094bae7256f5447a962e4 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -254,6 +254,7 @@ public class ServerPlayer extends Player { +@@ -259,6 +259,7 @@ public class ServerPlayer extends Player { public double maxHealthCache; public boolean joining = true; public boolean sentListPacket = false; @@ -55,12 +55,12 @@ index fd2bc49f713cccdcb2a3e49db52f56374690c5de..8660fc4bc748131d9bc3088afb5bb9af public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 89d45ae9b2856aaed265d7333ba2e69a3836bb2e..6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5 100644 +index 6c5c00e2fb29b5bdd73540badd159778eb1c1ff6..cfc497822e4e1dfc21807ec93bcfabb215cdbb95 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -282,6 +282,12 @@ public abstract class PlayerList { +@@ -291,6 +291,12 @@ public abstract class PlayerList { this.playersByUUID.put(player.getUUID(), player); - // this.broadcastAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer})); // CraftBukkit - replaced with loop below + // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below + // Paper start - correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks + player.supressTrackerForLogin = true; @@ -71,16 +71,16 @@ index 89d45ae9b2856aaed265d7333ba2e69a3836bb2e..6cc70d6eb84fb819fb7f1b8b1ef1bbb4 // CraftBukkit start CraftPlayer bukkitPlayer = player.getBukkitEntity(); -@@ -320,6 +326,8 @@ public abstract class PlayerList { - player.connection.send(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.ADD_PLAYER, new ServerPlayer[]{entityplayer1})); +@@ -329,6 +335,8 @@ public abstract class PlayerList { + player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1))); } player.sentListPacket = true; + player.supressTrackerForLogin = false; // Paper + ((ServerLevel)player.level).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now // CraftBukkit end - player.connection.send(new ClientboundSetEntityDataPacket(player.getId(), player.getEntityData(), true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -345,6 +353,11 @@ public abstract class PlayerList { + player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn +@@ -353,6 +361,11 @@ public abstract class PlayerList { playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect)); } @@ -92,7 +92,7 @@ index 89d45ae9b2856aaed265d7333ba2e69a3836bb2e..6cc70d6eb84fb819fb7f1b8b1ef1bbb4 if (nbttagcompound != null && nbttagcompound.contains("RootVehicle", 10)) { CompoundTag nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); // CraftBukkit start -@@ -393,6 +406,10 @@ public abstract class PlayerList { +@@ -401,6 +414,10 @@ public abstract class PlayerList { } } @@ -103,7 +103,7 @@ index 89d45ae9b2856aaed265d7333ba2e69a3836bb2e..6cc70d6eb84fb819fb7f1b8b1ef1bbb4 player.initInventoryMenu(); // CraftBukkit - Moved from above, added world // Paper start - Add to collideRule team if needed -@@ -402,6 +419,7 @@ public abstract class PlayerList { +@@ -410,6 +427,7 @@ public abstract class PlayerList { scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); } // Paper end diff --git a/patches/unapplied/server/0386-Load-Chunks-for-Login-Asynchronously.patch b/patches/server/0385-Load-Chunks-for-Login-Asynchronously.patch similarity index 88% rename from patches/unapplied/server/0386-Load-Chunks-for-Login-Asynchronously.patch rename to patches/server/0385-Load-Chunks-for-Login-Asynchronously.patch index f4b0211b06..158d0d9a63 100644 --- a/patches/unapplied/server/0386-Load-Chunks-for-Login-Asynchronously.patch +++ b/patches/server/0385-Load-Chunks-for-Login-Asynchronously.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Load Chunks for Login Asynchronously diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index ceab806cf008f8c9306283c86a92164176f8f1c5..d18337c4c123819e4d5f55b65985e548da492627 100644 +index 8646b9b07bc61ec1ee11b4053c67119c8ae20459..3bd645d9f642e6484d8ac8f02872873bc306e3de 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -170,6 +170,7 @@ import org.bukkit.event.world.GenericGameEvent; +@@ -173,6 +173,7 @@ import org.bukkit.event.world.GenericGameEvent; import org.bukkit.event.world.TimeSkipEvent; // CraftBukkit end import it.unimi.dsi.fastutil.ints.IntArrayList; // Paper @@ -16,7 +16,7 @@ index ceab806cf008f8c9306283c86a92164176f8f1c5..d18337c4c123819e4d5f55b65985e548 public class ServerLevel extends Level implements WorldGenLevel { -@@ -436,6 +437,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -439,6 +440,7 @@ public class ServerLevel extends Level implements WorldGenLevel { return player != null && player.level == this ? player : null; } // Paper end @@ -25,10 +25,10 @@ index ceab806cf008f8c9306283c86a92164176f8f1c5..d18337c4c123819e4d5f55b65985e548 // Add env and gen to constructor, IWorldDataServer -> WorldDataServer public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 8660fc4bc748131d9bc3088afb5bb9af073300f8..7ad1d2cd3b2d4b1f9b21f0de5ddbf2626aea0310 100644 +index ecaf03a72caac6e7866094bae7256f5447a962e4..55705fca6dba1bebe0cb444a68c130f8f2785ae3 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -182,6 +182,7 @@ public class ServerPlayer extends Player { +@@ -184,6 +184,7 @@ public class ServerPlayer extends Player { private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ = 32; private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10; public ServerGamePacketListenerImpl connection; @@ -36,7 +36,7 @@ index 8660fc4bc748131d9bc3088afb5bb9af073300f8..7ad1d2cd3b2d4b1f9b21f0de5ddbf262 public final MinecraftServer server; public final ServerPlayerGameMode gameMode; private final PlayerAdvancements advancements; -@@ -255,6 +256,7 @@ public class ServerPlayer extends Player { +@@ -260,6 +261,7 @@ public class ServerPlayer extends Player { public boolean joining = true; public boolean sentListPacket = false; public boolean supressTrackerForLogin = false; // Paper @@ -57,10 +57,10 @@ index 97d1ff2af23bac14e67bca5896843325aaa5bfc1..e9bc61590d33dc341074371859ceec54 public static final TicketType UNKNOWN = TicketType.create("unknown", Comparator.comparingLong(ChunkPos::toLong), 1); public static final TicketType PLUGIN = TicketType.create("plugin", (a, b) -> 0); // CraftBukkit diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c40da6e0f5da3a6663aba74720c530713b94650b..2a75c77ac51b620098f5cc49a8a6bebafdfc06a1 100644 +index c6ad5963540b5f51776ba52eefdf7d5be3475906..a4a2e560304def17ab0943a2d876f6e8e521809b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -346,6 +346,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -339,6 +339,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void tick() { @@ -71,7 +71,7 @@ index c40da6e0f5da3a6663aba74720c530713b94650b..2a75c77ac51b620098f5cc49a8a6beba if (this.ackBlockChangesUpTo > -1) { this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo)); this.ackBlockChangesUpTo = -1; -@@ -392,7 +396,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -385,7 +389,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.lastVehicle = null; this.clientVehicleIsFloating = false; this.aboveGroundVehicleTickCount = 0; @@ -81,10 +81,10 @@ index c40da6e0f5da3a6663aba74720c530713b94650b..2a75c77ac51b620098f5cc49a8a6beba this.server.getProfiler().push("keepAlive"); // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 3a20c6e2214ad075e4cdd3fbdf0b59e1891b0f2b..42cdb2c70f6b906d27c4b1409df92f7459bf2c1b 100644 +index 203786383387765d1f5a2d2ccce79d792fd5b187..82f2872cf32638a0df82fe751af4b634d8691c9c 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -89,7 +89,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -84,7 +84,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, } // Paper end } else if (this.state == ServerLoginPacketListenerImpl.State.DELAY_ACCEPT) { @@ -93,7 +93,7 @@ index 3a20c6e2214ad075e4cdd3fbdf0b59e1891b0f2b..42cdb2c70f6b906d27c4b1409df92f74 if (entityplayer == null) { this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT; -@@ -188,7 +188,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -169,7 +169,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, } this.connection.send(new ClientboundGameProfilePacket(this.gameProfile)); @@ -103,10 +103,10 @@ index 3a20c6e2214ad075e4cdd3fbdf0b59e1891b0f2b..42cdb2c70f6b906d27c4b1409df92f74 try { ServerPlayer entityplayer1 = this.server.getPlayerList().getPlayerForLogin(this.gameProfile, s); // CraftBukkit - add player reference diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe9917592384984e 100644 +index cfc497822e4e1dfc21807ec93bcfabb215cdbb95..2c0e45b3d0f5a1178ccecc851a110e5dc6f2023c 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -139,6 +139,7 @@ public abstract class PlayerList { +@@ -143,6 +143,7 @@ public abstract class PlayerList { private final IpBanList ipBans; private final ServerOpList ops; private final UserWhiteList whitelist; @@ -114,7 +114,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759 // CraftBukkit start // private final Map stats; // private final Map advancements; -@@ -180,6 +181,13 @@ public abstract class PlayerList { +@@ -186,6 +187,13 @@ public abstract class PlayerList { public void placeNewPlayer(Connection connection, ServerPlayer player) { player.isRealPlayer = true; // Paper player.loginTime = System.currentTimeMillis(); // Paper @@ -128,7 +128,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759 GameProfile gameprofile = player.getGameProfile(); GameProfileCache usercache = this.server.getProfileCache(); Optional optional = usercache.get(gameprofile.getId()); -@@ -192,7 +200,7 @@ public abstract class PlayerList { +@@ -198,7 +206,7 @@ public abstract class PlayerList { if (nbttagcompound != null && nbttagcompound.contains("bukkit")) { CompoundTag bukkit = nbttagcompound.getCompound("bukkit"); s = bukkit.contains("lastKnownName", 8) ? bukkit.getString("lastKnownName") : s; @@ -137,7 +137,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759 // CraftBukkit end if (nbttagcompound != null) { -@@ -219,11 +227,15 @@ public abstract class PlayerList { +@@ -225,11 +233,15 @@ public abstract class PlayerList { if (nbttagcompound == null) player.fudgeSpawnLocation(worldserver1); // Paper - only move to spawn on first login, otherwise, stay where you are.... player.setLevel(worldserver1); @@ -154,7 +154,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759 // Spigot start - spawn location event Player spawnPlayer = player.getBukkitEntity(); -@@ -265,6 +277,56 @@ public abstract class PlayerList { +@@ -272,6 +284,56 @@ public abstract class PlayerList { player.getRecipeBook().sendInitialRecipeBook(player); this.updateEntireScoreboard(worldserver1.getScoreboard(), player); this.server.invalidateStatus(); @@ -211,7 +211,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759 MutableComponent ichatmutablecomponent; if (player.getGameProfile().getName().equalsIgnoreCase(s)) { -@@ -506,6 +568,7 @@ public abstract class PlayerList { +@@ -514,6 +576,7 @@ public abstract class PlayerList { protected void save(ServerPlayer player) { if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit @@ -219,7 +219,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759 this.playerIo.save(player); ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit -@@ -533,7 +596,7 @@ public abstract class PlayerList { +@@ -541,7 +604,7 @@ public abstract class PlayerList { } PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), 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() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName()))); @@ -228,7 +228,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759 entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); if (server.isSameThread()) entityplayer.doTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog) -@@ -578,6 +641,13 @@ public abstract class PlayerList { +@@ -586,6 +649,13 @@ public abstract class PlayerList { // this.advancements.remove(uuid); // CraftBukkit end } @@ -241,8 +241,8 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759 + // Paper end // CraftBukkit start - // this.broadcastAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{entityplayer})); -@@ -595,7 +665,7 @@ public abstract class PlayerList { + // this.broadcastAll(new ClientboundPlayerInfoRemovePacket(List.of(entityplayer.getUUID()))); +@@ -603,7 +673,7 @@ public abstract class PlayerList { this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity()); // CraftBukkit end @@ -251,7 +251,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759 } // CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer -@@ -614,6 +684,13 @@ public abstract class PlayerList { +@@ -622,6 +692,13 @@ public abstract class PlayerList { list.add(entityplayer); } } @@ -266,10 +266,10 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759 Iterator iterator = list.iterator(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a2750cba8540caa9f12f5d5179b51f7753d38bba..e5c5a514e6b7bdf663d33074557e34372f18ea77 100644 +index 026a9decf87965ebe3c45df7e129cf6758364e5a..e28b973efe4f107d0a0d18dd2492f03ce2b424e9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1219,7 +1219,7 @@ public final class CraftServer implements Server { +@@ -1243,7 +1243,7 @@ public final class CraftServer implements Server { return false; } diff --git a/patches/unapplied/server/0387-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/patches/server/0386-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch similarity index 89% rename from patches/unapplied/server/0387-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to patches/server/0386-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch index 1dbc8c834f..2534e3d104 100644 --- a/patches/unapplied/server/0387-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch +++ b/patches/server/0386-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch @@ -7,10 +7,10 @@ The code following this has better support for null worlds to move them back to the world spawn. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 5de420c0a2f0881abb03c16b2621d081ef7ad4fd..58a8bbda3ddff1ed561d9035d45176c6ca689115 100644 +index fada693b270d0954f6bbc5965fb3af82a8bd524e..0a07a99e67e087db87c493d7c2b8b0c94d5b3771 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2162,9 +2162,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2177,9 +2177,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { bworld = server.getWorld(worldName); } diff --git a/patches/unapplied/server/0388-Add-PlayerAttackEntityCooldownResetEvent.patch b/patches/server/0387-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 92% rename from patches/unapplied/server/0388-Add-PlayerAttackEntityCooldownResetEvent.patch rename to patches/server/0387-Add-PlayerAttackEntityCooldownResetEvent.patch index 5e4a101415..50898b6c98 100644 --- a/patches/unapplied/server/0388-Add-PlayerAttackEntityCooldownResetEvent.patch +++ b/patches/server/0387-Add-PlayerAttackEntityCooldownResetEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 67c3e02bf4ee61237a7d0ea72e7bb0260af159e9..df3aad08242b40fca5be719ae9fb13bc1c2e8091 100644 +index c5a11e22c44d5adb55844bde964ca43acbc03fdf..632119d31b2c2821ef4871abf4fd6916668b0de7 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -2115,7 +2115,16 @@ public abstract class LivingEntity extends Entity { +@@ -2128,7 +2128,16 @@ public abstract class LivingEntity extends Entity { EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption); if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) { diff --git a/patches/unapplied/server/0389-Don-t-fire-BlockFade-on-worldgen-threads.patch b/patches/server/0388-Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 94% rename from patches/unapplied/server/0389-Don-t-fire-BlockFade-on-worldgen-threads.patch rename to patches/server/0388-Don-t-fire-BlockFade-on-worldgen-threads.patch index 032b44ebcd..4f55d73e39 100644 --- a/patches/unapplied/server/0389-Don-t-fire-BlockFade-on-worldgen-threads.patch +++ b/patches/server/0388-Don-t-fire-BlockFade-on-worldgen-threads.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Don't fire BlockFade on worldgen threads Caused a deadlock diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index 69903bad7b3e143b73b20624c06909458564396c..8d79612cdba48756bb0352c41b98f8a9ea489ff6 100644 +index 7e48326b6dc847a84e0aff2d393cadf9bace7979..68be050e5187d372a65290c01c69f3582053f7a1 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java @@ -100,6 +100,7 @@ public class FireBlock extends BaseFireBlock { diff --git a/patches/unapplied/server/0390-Add-phantom-creative-and-insomniac-controls.patch b/patches/server/0389-Add-phantom-creative-and-insomniac-controls.patch similarity index 97% rename from patches/unapplied/server/0390-Add-phantom-creative-and-insomniac-controls.patch rename to patches/server/0389-Add-phantom-creative-and-insomniac-controls.patch index 307c92bd32..1f27738587 100644 --- a/patches/unapplied/server/0390-Add-phantom-creative-and-insomniac-controls.patch +++ b/patches/server/0389-Add-phantom-creative-and-insomniac-controls.patch @@ -29,7 +29,7 @@ index 0e96e9d7e4d636f4222f60cec556663f506c3906..5432b3eff8ac09e45c7e118ddc1bc530 return true; } diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java -index 0dbb0c4d038379c6ffdae8528d98431e98faeb93..2093d08bccbfbe096ea24cc4f70cbfdfa07d6a56 100644 +index 900a66fc7eb817509df904b71ccc3bd3976f3b35..24fa62da17ad6c84d45c6fb726305a87df85d2aa 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java +++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java @@ -51,7 +51,7 @@ public class PhantomSpawner implements CustomSpawner { diff --git a/patches/unapplied/server/0391-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/patches/server/0390-Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 93% rename from patches/unapplied/server/0391-Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to patches/server/0390-Fix-numerous-item-duplication-issues-and-teleport-is.patch index 2d059506de..c244ea06fb 100644 --- a/patches/unapplied/server/0391-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/patches/server/0390-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the same item twice because the source was destroyed. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 58a8bbda3ddff1ed561d9035d45176c6ca689115..32623f90a5bc4fb6fe99897c682ef4f55f056dea 100644 +index 0a07a99e67e087db87c493d7c2b8b0c94d5b3771..19218e993052d44a830f825f9a0eb695635861c1 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2292,11 +2292,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2307,11 +2307,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } else { // CraftBukkit start - Capture drops for death event if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) { @@ -34,7 +34,7 @@ index 58a8bbda3ddff1ed561d9035d45176c6ca689115..32623f90a5bc4fb6fe99897c682ef4f5 entityitem.setDefaultPickUpDelay(); // CraftBukkit start -@@ -3060,6 +3061,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3086,6 +3087,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @Nullable public Entity teleportTo(ServerLevel worldserver, PositionImpl location) { // CraftBukkit end @@ -47,7 +47,7 @@ index 58a8bbda3ddff1ed561d9035d45176c6ca689115..32623f90a5bc4fb6fe99897c682ef4f5 if (this.level instanceof ServerLevel && !this.isRemoved()) { this.level.getProfiler().push("changeDimension"); // CraftBukkit start -@@ -3086,6 +3093,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3112,6 +3119,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { // CraftBukkit end this.level.getProfiler().popPush("reloading"); @@ -59,7 +59,7 @@ index 58a8bbda3ddff1ed561d9035d45176c6ca689115..32623f90a5bc4fb6fe99897c682ef4f5 Entity entity = this.getType().create(worldserver); if (entity != null) { -@@ -3099,10 +3111,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3125,10 +3137,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { // CraftBukkit start - Forward the CraftEntity to the new entity this.getBukkitEntity().setHandle(entity); entity.bukkitEntity = this.getBukkitEntity(); @@ -70,7 +70,7 @@ index 58a8bbda3ddff1ed561d9035d45176c6ca689115..32623f90a5bc4fb6fe99897c682ef4f5 // CraftBukkit end } -@@ -3223,7 +3231,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3249,7 +3257,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public boolean canChangeDimensions() { @@ -80,10 +80,10 @@ index 58a8bbda3ddff1ed561d9035d45176c6ca689115..32623f90a5bc4fb6fe99897c682ef4f5 public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index df3aad08242b40fca5be719ae9fb13bc1c2e8091..a337ce97a31998a63e7c329ac94cad9a5f783a5c 100644 +index 632119d31b2c2821ef4871abf4fd6916668b0de7..b6741c72216378368392e65aad3ff75a3191d0ce 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1646,9 +1646,9 @@ public abstract class LivingEntity extends Entity { +@@ -1647,9 +1647,9 @@ public abstract class LivingEntity extends Entity { // Paper start org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource); if (deathEvent == null || !deathEvent.isCancelled()) { @@ -96,7 +96,7 @@ index df3aad08242b40fca5be719ae9fb13bc1c2e8091..a337ce97a31998a63e7c329ac94cad9a // Paper start - clear equipment if event is not cancelled if (this instanceof Mob) { for (EquipmentSlot slot : this.clearedEquipmentSlots) { -@@ -1746,8 +1746,13 @@ public abstract class LivingEntity extends Entity { +@@ -1747,8 +1747,13 @@ public abstract class LivingEntity extends Entity { this.dropCustomDeathLoot(source, i, flag); this.clearEquipmentSlots = prev; // Paper } @@ -135,7 +135,7 @@ index e463ae13ce6f65675c2b6d553ecf91db5a047dbc..7ff1e7e4d493770bfdbc0ad5e8f10387 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 118d7068700bbd4aeaf766ee8d3984b474c6bf9a..751f376e175881d9e9f750c90143a7c39431ce6c 100644 +index b35dd78b08b15842e87182de9afef6c49c249366..120e21edad328f382b5edc030f546e3b9a80916b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -809,6 +809,11 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0392-Villager-Restocks-API.patch b/patches/server/0391-Villager-Restocks-API.patch similarity index 92% rename from patches/unapplied/server/0392-Villager-Restocks-API.patch rename to patches/server/0391-Villager-Restocks-API.patch index 0808988af9..6d4323cd05 100644 --- a/patches/unapplied/server/0392-Villager-Restocks-API.patch +++ b/patches/server/0391-Villager-Restocks-API.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Villager Restocks API public net.minecraft.world.entity.npc.Villager numberOfRestocksToday diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java -index 1400f8c0cac3d653465b3750078de4d2691ac2a1..1a8a49bd269ed52879866ff3853e131d04aa8bba 100644 +index e4f0770b0c9a00b813f3473298fb0d5e21e7c008..4f73b71fb39eab10c44da31617632a83e4f0b83f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java @@ -91,6 +91,18 @@ public class CraftVillager extends CraftAbstractVillager implements Villager { diff --git a/patches/unapplied/server/0393-Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/0392-Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 91% rename from patches/unapplied/server/0393-Validate-PickItem-Packet-and-kick-for-invalid.patch rename to patches/server/0392-Validate-PickItem-Packet-and-kick-for-invalid.patch index 69c20e6f3b..c4875638df 100644 --- a/patches/unapplied/server/0393-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/patches/server/0392-Validate-PickItem-Packet-and-kick-for-invalid.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2a75c77ac51b620098f5cc49a8a6bebafdfc06a1..6c17ae02e3c076b738037454afb7ea08f0f0e79e 100644 +index a4a2e560304def17ab0943a2d876f6e8e521809b..f9c84bc2018391670d4e2dd97d0fca224cd1a728 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -967,7 +967,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -959,7 +959,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handlePickItem(ServerboundPickItemPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); diff --git a/patches/unapplied/server/0394-Expose-game-version.patch b/patches/server/0393-Expose-game-version.patch similarity index 82% rename from patches/unapplied/server/0394-Expose-game-version.patch rename to patches/server/0393-Expose-game-version.patch index 0d2ba75f07..279c93291f 100644 --- a/patches/unapplied/server/0394-Expose-game-version.patch +++ b/patches/server/0393-Expose-game-version.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose game version diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e5c5a514e6b7bdf663d33074557e34372f18ea77..86402126b13e5e6542f880cbdc978eb581d33a8a 100644 +index e28b973efe4f107d0a0d18dd2492f03ce2b424e9..c2e018cc05d6c6aaa615150ab4b62b85acfe1d05 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -579,6 +579,13 @@ public final class CraftServer implements Server { +@@ -592,6 +592,13 @@ public final class CraftServer implements Server { return this.bukkitVersion; } diff --git a/patches/unapplied/server/0395-Optimize-Voxel-Shape-Merging.patch b/patches/server/0394-Optimize-Voxel-Shape-Merging.patch similarity index 98% rename from patches/unapplied/server/0395-Optimize-Voxel-Shape-Merging.patch rename to patches/server/0394-Optimize-Voxel-Shape-Merging.patch index 7bfe849396..2c47963e34 100644 --- a/patches/unapplied/server/0395-Optimize-Voxel-Shape-Merging.patch +++ b/patches/server/0394-Optimize-Voxel-Shape-Merging.patch @@ -30,7 +30,7 @@ Additionally, this lets us avoid even allocating new objects for this too, furth reducing memory usage. diff --git a/src/main/java/net/minecraft/world/phys/shapes/IndirectMerger.java b/src/main/java/net/minecraft/world/phys/shapes/IndirectMerger.java -index 9e0afab2329e560c4b2512548dd4b02dd1a2e69f..06662dbff8180751a8684841aa35f709007078ae 100644 +index 0d9c15120148409967027dead617e80769939697..2214a3198c712deaac0f3d3478c85352185761d4 100644 --- a/src/main/java/net/minecraft/world/phys/shapes/IndirectMerger.java +++ b/src/main/java/net/minecraft/world/phys/shapes/IndirectMerger.java @@ -10,12 +10,33 @@ public class IndirectMerger implements IndexMerger { diff --git a/patches/unapplied/server/0396-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/patches/server/0395-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 93% rename from patches/unapplied/server/0396-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to patches/server/0395-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch index 6e0cb176e9..27ef65dc80 100644 --- a/patches/unapplied/server/0396-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch +++ b/patches/server/0395-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch @@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache. Set system properly at server startup if not set already to help protect from this. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index cce6886bb3973eed8f0c7ca7b1189547324fd4e2..0aef4fc4a89e627bc80504d7402f1ca2cdc95a74 100644 +index 8fbc14fb4b38bb73439b0b5d31d29c69f1f229b2..6a9485f1c3743562700779930282285c6ad1067a 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -28,6 +28,7 @@ public class Main { diff --git a/patches/unapplied/server/0397-misc-debugging-dumps.patch b/patches/server/0396-misc-debugging-dumps.patch similarity index 83% rename from patches/unapplied/server/0397-misc-debugging-dumps.patch rename to patches/server/0396-misc-debugging-dumps.patch index 758bcb8e94..bb3cdeaff7 100644 --- a/patches/unapplied/server/0397-misc-debugging-dumps.patch +++ b/patches/server/0396-misc-debugging-dumps.patch @@ -29,10 +29,10 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c5ecf010fff3af1c9b4ebf24ca80fb6b19afccfc..7c7114193fadc6c14d6d8a87cc2d734eaa68b864 100644 +index d406df9626d29ee257b8eedcbea2af09ed4b6baf..366959f9841eb0ef3669b3b3b069d7670f0ba7e6 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -881,6 +881,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop set, boolean flag) { diff --git a/patches/unapplied/server/0399-Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/0398-Deobfuscate-stacktraces-in-log-messages-crash-report.patch similarity index 97% rename from patches/unapplied/server/0399-Deobfuscate-stacktraces-in-log-messages-crash-report.patch rename to patches/server/0398-Deobfuscate-stacktraces-in-log-messages-crash-report.patch index 246cea7f87..424a8ff634 100644 --- a/patches/unapplied/server/0399-Deobfuscate-stacktraces-in-log-messages-crash-report.patch +++ b/patches/server/0398-Deobfuscate-stacktraces-in-log-messages-crash-report.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and diff --git a/build.gradle.kts b/build.gradle.kts -index e260462933a9f7065b2360e6bf9e4ee56069a705..2ff278cdc3dfef4644b12755be2e3a69a43e1f07 100644 +index a4b47b69e14643cd82d71d18941144ecbf50db8b..ce7a583355a6f4ce98c571fa7b60d9034f51bd3c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,12 +19,14 @@ dependencies { @@ -15,7 +15,7 @@ index e260462933a9f7065b2360e6bf9e4ee56069a705..2ff278cdc3dfef4644b12755be2e3a69 implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation + annotationProcessor("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - Needed to generate meta for our Log4j plugins // Paper end - implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper + implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion implementation("org.ow2.asm:asm:9.3") implementation("org.ow2.asm:asm-commons:9.3") // Paper - ASM event executor generation implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files @@ -503,10 +503,10 @@ index 8bc8b6013ea5803e091cf3534130b72278b9c29e..dca0c978b30962d4216dc443d7d105e5 protected void channelRead0(ChannelHandlerContext channelhandlercontext, Packet packet) { diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 6fba140877e7369cdb7933ec225572c6b153e3a8..e3a62579067209c447f2fdcb76b2a11e489a376b 100644 +index 549ea8e0fe702615eefcbfd1cd6a30e05b7b3fd5..771677c0e1cd7bfe089b9a5bb9095650216ff588 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -200,6 +200,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -195,6 +195,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface org.spigotmc.SpigotConfig.registerCommands(); // Spigot end // Paper start @@ -515,10 +515,10 @@ index 6fba140877e7369cdb7933ec225572c6b153e3a8..e3a62579067209c447f2fdcb76b2a11e paperConfigurations.initializeWorldDefaultsConfiguration(); org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index d18337c4c123819e4d5f55b65985e548da492627..6cdd0c13189f372dcf562c4190f4c6155b33dd13 100644 +index 3bd645d9f642e6484d8ac8f02872873bc306e3de..3fff95ffe0e343f873dda31507567cbd8fa2460e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -218,7 +218,9 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -221,7 +221,9 @@ public class ServerLevel extends Level implements WorldGenLevel { public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper public static Throwable getAddToWorldStackTrace(Entity entity) { @@ -529,7 +529,7 @@ index d18337c4c123819e4d5f55b65985e548da492627..6cdd0c13189f372dcf562c4190f4c615 } @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI -@@ -1290,7 +1292,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1330,7 +1332,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (entity.isRemoved()) { // Paper start if (DEBUG_ENTITIES) { @@ -556,10 +556,10 @@ index a24ef433d0c9d06b86fd612978cfd6d877036791..1b38326c9a709536dc4cccf9af93aede final MinecraftServer server; public volatile boolean running; diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 930da83ff754bab6b6b6fff651df417baa76c46f..c3027735725c68eeb1b42a42ebb8646f3a35a518 100644 +index 8cb9606cf791d6f0e241cc92baa87988414d94e0..d92aaec3a4535d3683e842f9a712ba06c03014ef 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -204,7 +204,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -185,7 +185,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, MutableComponent ichatmutablecomponent = Component.translatable("multiplayer.disconnect.invalid_player_data"); // Paper start if (MinecraftServer.getServer().isDebugging()) { @@ -591,7 +591,7 @@ index 6599f874d9f97e9ef4862039ecad7277bbc5fd91..7edd4b88eb0476f0630630bc4681e859 } } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index b2d06181ad76b1db2abb1ddca075f4ec6dab55dc..aa3adc628178962ce89df0e372c925e8f4801606 100644 +index 6e95a98727322106d2c418de80f5f0aad2ea1953..a3c1bba1c1f795d203207776bab41b4b8f4e69d7 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -640,7 +640,7 @@ public class LevelChunk extends ChunkAccess { diff --git a/patches/unapplied/server/0400-Implement-Mob-Goal-API.patch b/patches/server/0399-Implement-Mob-Goal-API.patch similarity index 99% rename from patches/unapplied/server/0400-Implement-Mob-Goal-API.patch rename to patches/server/0399-Implement-Mob-Goal-API.patch index e8c80476f1..af0835fe46 100644 --- a/patches/unapplied/server/0400-Implement-Mob-Goal-API.patch +++ b/patches/server/0399-Implement-Mob-Goal-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API diff --git a/build.gradle.kts b/build.gradle.kts -index 2ff278cdc3dfef4644b12755be2e3a69a43e1f07..2d1e639bd2880469d849ca1242184b0af1f6903c 100644 +index ce7a583355a6f4ce98c571fa7b60d9034f51bd3c..8f32e0c3078366f4b07a499b1838929564a05b76 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,6 +35,7 @@ dependencies { @@ -789,10 +789,10 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..3f081183521603824430709886a9cc31 LOOK, JUMP, diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8d4388df7e62016df262e377e5f75cc44e17e284..f1134bce181e8ea5eebb241e3af9691390cd2533 100644 +index 718126fbd5829ec6030d5fb2a75f6c8ce76059d7..3e48976a9f0317b02241ed9e313fbce1d373efe3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2691,5 +2691,11 @@ public final class CraftServer implements Server { +@@ -2715,5 +2715,11 @@ public final class CraftServer implements Server { public boolean isStopping() { return net.minecraft.server.MinecraftServer.getServer().hasStopped(); } diff --git a/patches/unapplied/server/0401-Add-villager-reputation-API.patch b/patches/server/0400-Add-villager-reputation-API.patch similarity index 91% rename from patches/unapplied/server/0401-Add-villager-reputation-API.patch rename to patches/server/0400-Add-villager-reputation-API.patch index 0d5199af29..a9a5db5c0b 100644 --- a/patches/unapplied/server/0401-Add-villager-reputation-API.patch +++ b/patches/server/0400-Add-villager-reputation-API.patch @@ -8,19 +8,19 @@ public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips ()V diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java -index 76dfb546ddddb14497269d22ac1c8f84a0a9c15c..92beb137d86ae89d90b1963a024c0be308d81a42 100644 +index 6c021402ab7522f132193619fae4be4ca70d70f8..4e7b7a3910840908b73c80faf9a83b728186f775 100644 --- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java +++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java -@@ -27,7 +27,7 @@ import net.minecraft.util.VisibleForDebug; - +@@ -30,7 +30,7 @@ import org.slf4j.Logger; public class GossipContainer { + private static final Logger LOGGER = LogUtils.getLogger(); public static final int DISCARD_THRESHOLD = 2; - private final Map gossips = Maps.newHashMap(); + private final Map gossips = Maps.newHashMap(); public Map getReputations() { return this.gossips; } // Paper - add getter for reputations @VisibleForDebug public Map> getGossipEntries() { -@@ -226,6 +226,43 @@ public class GossipContainer { +@@ -231,6 +231,43 @@ public class GossipContainer { public void remove(GossipType gossipType) { this.entries.removeInt(gossipType); } @@ -63,9 +63,9 @@ index 76dfb546ddddb14497269d22ac1c8f84a0a9c15c..92beb137d86ae89d90b1963a024c0be3 + // Paper end } - static class GossipEntry { + static record GossipEntry(UUID target, GossipType type, int value) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java -index 1a8a49bd269ed52879866ff3853e131d04aa8bba..d1f5e1292246e0fb252d3d3409bbf37cc8166bbc 100644 +index 4f73b71fb39eab10c44da31617632a83e4f0b83f..11e44a81934255fd4efa418009d8bb78c785cfd5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java @@ -17,6 +17,13 @@ import org.bukkit.entity.Villager; @@ -84,7 +84,7 @@ index 1a8a49bd269ed52879866ff3853e131d04aa8bba..d1f5e1292246e0fb252d3d3409bbf37c public CraftVillager(CraftServer server, net.minecraft.world.entity.npc.Villager entity) { @@ -146,4 +153,45 @@ public class CraftVillager extends CraftAbstractVillager implements Villager { public static VillagerProfession bukkitToNmsProfession(Profession bukkit) { - return Registry.VILLAGER_PROFESSION.get(CraftNamespacedKey.toMinecraft(bukkit.getKey())); + return BuiltInRegistries.VILLAGER_PROFESSION.get(CraftNamespacedKey.toMinecraft(bukkit.getKey())); } + + // Paper start - Add villager reputation API diff --git a/patches/unapplied/server/0402-Option-for-maximum-exp-value-when-merging-orbs.patch b/patches/server/0401-Option-for-maximum-exp-value-when-merging-orbs.patch similarity index 96% rename from patches/unapplied/server/0402-Option-for-maximum-exp-value-when-merging-orbs.patch rename to patches/server/0401-Option-for-maximum-exp-value-when-merging-orbs.patch index 206989dbdd..b5449e0ac6 100644 --- a/patches/unapplied/server/0402-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/patches/server/0401-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option for maximum exp value when merging orbs diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 751f376e175881d9e9f750c90143a7c39431ce6c..2dde21dea012f4531e737586752ae1b1f5023d99 100644 +index 120e21edad328f382b5edc030f546e3b9a80916b..2fd5e1b4f20c28ebed0b480cc866ed05cb739462 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -630,16 +630,30 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0403-ExperienceOrbMergeEvent.patch b/patches/server/0402-ExperienceOrbMergeEvent.patch similarity index 94% rename from patches/unapplied/server/0403-ExperienceOrbMergeEvent.patch rename to patches/server/0402-ExperienceOrbMergeEvent.patch index bfca9b565e..baf8b9eba9 100644 --- a/patches/unapplied/server/0403-ExperienceOrbMergeEvent.patch +++ b/patches/server/0402-ExperienceOrbMergeEvent.patch @@ -9,7 +9,7 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor metadata such as spawn reason, or conditionally move data from source to target. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 2dde21dea012f4531e737586752ae1b1f5023d99..359964cd8820b8ef8b8dba5501119164cebcf743 100644 +index 2fd5e1b4f20c28ebed0b480cc866ed05cb739462..571eb0eea3bf7b0cf567cdf571699e729402fda0 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -640,7 +640,7 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0404-Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/0403-Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from patches/unapplied/server/0404-Fix-PotionEffect-ignores-icon-flag.patch rename to patches/server/0403-Fix-PotionEffect-ignores-icon-flag.patch diff --git a/patches/unapplied/server/0405-Optimize-brigadier-child-sorting-performance.patch b/patches/server/0404-Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from patches/unapplied/server/0405-Optimize-brigadier-child-sorting-performance.patch rename to patches/server/0404-Optimize-brigadier-child-sorting-performance.patch diff --git a/patches/unapplied/server/0406-Potential-bed-API.patch b/patches/server/0405-Potential-bed-API.patch similarity index 100% rename from patches/unapplied/server/0406-Potential-bed-API.patch rename to patches/server/0405-Potential-bed-API.patch diff --git a/patches/unapplied/server/0407-Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/0406-Wait-for-Async-Tasks-during-shutdown.patch similarity index 89% rename from patches/unapplied/server/0407-Wait-for-Async-Tasks-during-shutdown.patch rename to patches/server/0406-Wait-for-Async-Tasks-during-shutdown.patch index f8854a8a4e..642acd32bc 100644 --- a/patches/unapplied/server/0407-Wait-for-Async-Tasks-during-shutdown.patch +++ b/patches/server/0406-Wait-for-Async-Tasks-during-shutdown.patch @@ -10,10 +10,10 @@ Adds a 5 second grace period for any async tasks to finish and warns if any are still running after that delay just as reload does. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7c7114193fadc6c14d6d8a87cc2d734eaa68b864..fb2d02ad6f6a4a1c69dde06e7e193aaef8655028 100644 +index 366959f9841eb0ef3669b3b3b069d7670f0ba7e6..93c1a1bf602af1e73202590e78dac8336a5d3296 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -921,6 +921,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0.0F; f -= 0.22500001F) { BlockPos blockposition = new BlockPos(d4, d5, d6); BlockState iblockdata = this.level.getBlockState(blockposition); @@ -24,7 +24,7 @@ index 38bb502e9f1272020a23a3ef8ebb0cb1a5a251ef..b18b0e1b5e059f08fd3117eaa0fb28a1 FluidState fluid = iblockdata.getFluidState(); // Paper if (!this.level.isInWorldBounds(blockposition)) { -@@ -350,7 +351,7 @@ public class Explosion { +@@ -346,7 +347,7 @@ public class Explosion { BlockState iblockdata = this.level.getBlockState(blockposition); Block block = iblockdata.getBlock(); @@ -34,10 +34,10 @@ index 38bb502e9f1272020a23a3ef8ebb0cb1a5a251ef..b18b0e1b5e059f08fd3117eaa0fb28a1 this.level.getProfiler().push("explosion_blocks"); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index cff803e60a7592fc55fc4a76e39f2254196c07f6..e58f576c1bd7a3b1f3d57ed384bbdbc13248147b 100644 +index 6498a4073867fc2cb24e2d75776d2a84661846fb..44f0325e8762e1bc528ab22d56a71322dbc84bd6 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -429,6 +429,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -428,6 +428,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { @@ -49,10 +49,10 @@ index cff803e60a7592fc55fc4a76e39f2254196c07f6..e58f576c1bd7a3b1f3d57ed384bbdbc1 if (blockstate == null) { blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags); diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 77125720fcbeb7bfc180effb27cfb78c74832ce5..cb11cef117fc896ddcb40993ddb852a2e717c2ad 100644 +index 11b0b1a217648496ccf08f09bb3aa53904ffa9cb..a9171ca47e836428e1b5c8366898a94702242e13 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java -@@ -92,6 +92,19 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -90,6 +90,19 @@ public class Block extends BlockBehaviour implements ItemLike { protected final StateDefinition stateDefinition; private BlockState defaultBlockState; // Paper start @@ -115,10 +115,10 @@ index 76720517cd2d82065eb8430cf854b536295341db..29755807fdb6c30e31c0ec2bbf33bed9 world.playSound((Player) null, pos, SoundEvents.PISTON_CONTRACT, SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.15F + 0.6F); diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 61a792c5ccf3688d4f78c6e7461090f63a0cc26a..b2ab7749e3ddf124d5ef97271a76dc875a650771 100644 +index c53b80cba9ea658d20e527a9bfcd6b5d7d9f51fc..6a549229037c8b8c2093feb563780ef8565d709f 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -223,7 +223,7 @@ public abstract class BlockBehaviour { +@@ -234,7 +234,7 @@ public abstract class BlockBehaviour implements FeatureElement { /** @deprecated */ @Deprecated public boolean canBeReplaced(BlockState state, BlockPlaceContext context) { @@ -127,7 +127,7 @@ index 61a792c5ccf3688d4f78c6e7461090f63a0cc26a..b2ab7749e3ddf124d5ef97271a76dc87 } /** @deprecated */ -@@ -741,6 +741,12 @@ public abstract class BlockBehaviour { +@@ -775,6 +775,12 @@ public abstract class BlockBehaviour implements FeatureElement { return ((Block) this.owner).builtInRegistryHolder(); } @@ -140,7 +140,7 @@ index 61a792c5ccf3688d4f78c6e7461090f63a0cc26a..b2ab7749e3ddf124d5ef97271a76dc87 public Material getMaterial() { return this.material; } -@@ -838,7 +844,7 @@ public abstract class BlockBehaviour { +@@ -872,7 +878,7 @@ public abstract class BlockBehaviour implements FeatureElement { } public PushReaction getPistonPushReaction() { @@ -150,10 +150,10 @@ index 61a792c5ccf3688d4f78c6e7461090f63a0cc26a..b2ab7749e3ddf124d5ef97271a76dc87 public boolean isSolidRender(BlockGetter world, BlockPos pos) { diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java -index 953a1dfd71605ac123133dc1d4e8133a33884f4a..1369d4f818d203e3092fd6ba4def106dda16d6d2 100644 +index d1c7eba29c64a6dbf55d3062ced9769eecb548ed..faaf50cb9bce254aef554ed8b402b145532e12a4 100644 --- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java -@@ -215,6 +215,13 @@ public class PortalForcer { +@@ -221,6 +221,13 @@ public class PortalForcer { for (int j = -1; j < 3; ++j) { for (int k = -1; k < 4; ++k) { temp.setWithOffset(pos, portalDirection.getStepX() * j + enumdirection1.getStepX() * distanceOrthogonalToPortal, k, portalDirection.getStepZ() * j + enumdirection1.getStepZ() * distanceOrthogonalToPortal); diff --git a/patches/unapplied/server/0410-Reduce-MutableInt-allocations-from-light-engine.patch b/patches/server/0409-Reduce-MutableInt-allocations-from-light-engine.patch similarity index 100% rename from patches/unapplied/server/0410-Reduce-MutableInt-allocations-from-light-engine.patch rename to patches/server/0409-Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/patches/unapplied/server/0411-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/patches/server/0410-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 85% rename from patches/unapplied/server/0411-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to patches/server/0410-Reduce-allocation-of-Vec3D-by-entity-tracker.patch index 578741a729..b74866731e 100644 --- a/patches/unapplied/server/0411-Reduce-allocation-of-Vec3D-by-entity-tracker.patch +++ b/patches/server/0410-Reduce-allocation-of-Vec3D-by-entity-tracker.patch @@ -5,23 +5,23 @@ Subject: [PATCH] Reduce allocation of Vec3D by entity tracker diff --git a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java -index 3167f5c6be39757e3cc42cbb17ab0cf13a2fe470..3768a71491ef7836b9739bdaec7a077c523dbacd 100644 +index 05ac41e136da43284fb24a6b698ebd36318278fb..5ca3ad7b3d7606accd0a58b3c708fadb349608f7 100644 --- a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java +++ b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java -@@ -5,7 +5,7 @@ import net.minecraft.world.phys.Vec3; +@@ -5,7 +5,7 @@ import org.jetbrains.annotations.VisibleForTesting; public class VecDeltaCodec { private static final double TRUNCATION_STEPS = 4096.0D; - private Vec3 base = Vec3.ZERO; + public Vec3 base = Vec3.ZERO; // Paper - private static long encode(double value) { - return Mth.lfloor(value * 4096.0D); + @VisibleForTesting + static long encode(double value) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 1bf18259505997c39e7880abf49e583cc763beb1..2651e6d22658beea7247a93a6c73f99f1d258752 100644 +index 6b01d5b5535887eef0ac7b8a5e0a669a2700e83f..f18df9d9e569bda32865a05e85a843f0422e17cf 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1302,9 +1302,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1339,9 +1339,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public void updatePlayer(ServerPlayer player) { org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot if (player != this.entity) { @@ -38,10 +38,10 @@ index 1bf18259505997c39e7880abf49e583cc763beb1..2651e6d22658beea7247a93a6c73f99f boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(player); diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 286a14aafe2e8b4662515165ede8a74833897f33..5d16d9dc07349c4193084ba9e70c16e58155c892 100644 +index 841bb7741ae6b0e9cb98120ee1649b93ef4c3dab..4ebe6bdc01b2d80fc84ba31aae9eb9ac26339436 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -148,7 +148,13 @@ public class ServerEntity { +@@ -152,7 +152,13 @@ public class ServerEntity { i = Mth.floor(this.entity.getYRot() * 256.0F / 360.0F); j = Mth.floor(this.entity.getXRot() * 256.0F / 360.0F); Vec3 vec3d = this.entity.trackingPosition(); diff --git a/patches/unapplied/server/0412-Ensure-safe-gateway-teleport.patch b/patches/server/0411-Ensure-safe-gateway-teleport.patch similarity index 89% rename from patches/unapplied/server/0412-Ensure-safe-gateway-teleport.patch rename to patches/server/0411-Ensure-safe-gateway-teleport.patch index b466eeb164..b9d9013d68 100644 --- a/patches/unapplied/server/0412-Ensure-safe-gateway-teleport.patch +++ b/patches/server/0411-Ensure-safe-gateway-teleport.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Ensure safe gateway teleport diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index 9bb730b489006c7baaaf55194ef796ff20771dd3..89bf5fc4fab2cf39378600aa8925ac4bb7707428 100644 +index 1c0c1be2b08fc8a28ff36896da01d668308570f4..f80545f80948db27d1fbde77d0505c916eb504ed 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -@@ -105,7 +105,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { +@@ -106,7 +106,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { List list = world.getEntitiesOfClass(Entity.class, new AABB(pos), TheEndGatewayBlockEntity::canEntityTeleport); if (!list.isEmpty()) { diff --git a/patches/unapplied/server/0413-Add-option-for-console-having-all-permissions.patch b/patches/server/0412-Add-option-for-console-having-all-permissions.patch similarity index 100% rename from patches/unapplied/server/0413-Add-option-for-console-having-all-permissions.patch rename to patches/server/0412-Add-option-for-console-having-all-permissions.patch diff --git a/patches/unapplied/server/0414-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch b/patches/server/0413-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch similarity index 95% rename from patches/unapplied/server/0414-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch rename to patches/server/0413-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch index f34e3c3ef7..e78ad78821 100644 --- a/patches/unapplied/server/0414-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch +++ b/patches/server/0413-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch @@ -42,10 +42,10 @@ index 2ba3bb4e5670ece798a8882801a856d82851c00a..a61f55ed1fbe5aac5289014cb95cb695 this.newChunkHolder = newChunkHolder; // Paper - rewrite chunk system this.chunkToSaveHistory = null; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 2651e6d22658beea7247a93a6c73f99f1d258752..c68be481bbedbe347651f73741bf378a501e450e 100644 +index f18df9d9e569bda32865a05e85a843f0422e17cf..d17a5b8d6f1b61ac1894e642d70704881c343f25 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -152,12 +152,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -156,12 +156,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); public final io.papermc.paper.chunk.PlayerChunkLoader playerChunkManager = new io.papermc.paper.chunk.PlayerChunkLoader(this, this.pooledLinkedPlayerHashSets); // Paper - replace chunk loader @@ -70,7 +70,7 @@ index 2651e6d22658beea7247a93a6c73f99f1d258752..c68be481bbedbe347651f73741bf378a // Paper start - per player mob spawning if (this.playerMobDistanceMap != null) { this.playerMobDistanceMap.add(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player)); -@@ -168,6 +180,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -172,6 +184,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider void removePlayerFromDistanceMaps(ServerPlayer player) { this.playerChunkManager.removePlayer(player); // Paper - replace chunk loader @@ -81,7 +81,7 @@ index 2651e6d22658beea7247a93a6c73f99f1d258752..c68be481bbedbe347651f73741bf378a // Paper start - per player mob spawning if (this.playerMobDistanceMap != null) { this.playerMobDistanceMap.remove(player); -@@ -180,6 +196,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -184,6 +200,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); // Note: players need to be explicitly added to distance maps before they can be updated this.playerChunkManager.updatePlayer(player); // Paper - replace chunk loader @@ -89,7 +89,7 @@ index 2651e6d22658beea7247a93a6c73f99f1d258752..c68be481bbedbe347651f73741bf378a // Paper start - per player mob spawning if (this.playerMobDistanceMap != null) { this.playerMobDistanceMap.update(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player)); -@@ -267,6 +284,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -275,6 +292,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.regionManagers.add(this.dataRegionManager); // Paper end this.playerMobDistanceMap = this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets) : null; // Paper @@ -128,7 +128,7 @@ index 2651e6d22658beea7247a93a6c73f99f1d258752..c68be481bbedbe347651f73741bf378a } protected ChunkGenerator generator() { -@@ -822,43 +871,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -834,43 +883,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return this.anyPlayerCloseEnoughForSpawning(pos, false); } @@ -262,10 +262,10 @@ index d3c3db919e9b0507e8543313d9028394e5163673..52cba8f68d274cce106304aef1249a95 public String getDebugStatus() { diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index f0ab91b93dabd0c77a8537e40c8b504200b261fd..324a99ea21bccdf27c15248ae2811048efaa2595 100644 +index 665e088cb0b73f6a0c62f29c56da462bab7c927e..298e4468f7b5346733257f7117f76c66e9a1d8f0 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -657,6 +657,37 @@ public class ServerChunkCache extends ChunkSource { +@@ -658,6 +658,37 @@ public class ServerChunkCache extends ChunkSource { if (flag) { this.chunkMap.tick(); } else { @@ -303,7 +303,7 @@ index f0ab91b93dabd0c77a8537e40c8b504200b261fd..324a99ea21bccdf27c15248ae2811048 LevelData worlddata = this.level.getLevelData(); ProfilerFiller gameprofilerfiller = this.level.getProfiler(); -@@ -700,15 +731,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -701,15 +732,7 @@ public class ServerChunkCache extends ChunkSource { boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit Collections.shuffle(list); @@ -320,7 +320,7 @@ index f0ab91b93dabd0c77a8537e40c8b504200b261fd..324a99ea21bccdf27c15248ae2811048 Iterator iterator1 = list.iterator(); while (iterator1.hasNext()) { -@@ -716,9 +739,9 @@ public class ServerChunkCache extends ChunkSource { +@@ -717,9 +740,9 @@ public class ServerChunkCache extends ChunkSource { LevelChunk chunk1 = chunkproviderserver_a.chunk; ChunkPos chunkcoordintpair = chunk1.getPos(); @@ -333,14 +333,14 @@ index f0ab91b93dabd0c77a8537e40c8b504200b261fd..324a99ea21bccdf27c15248ae2811048 } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 7ad1d2cd3b2d4b1f9b21f0de5ddbf2626aea0310..61904f4d3160d83f87d66fd9f86acf54ab31adc6 100644 +index 55705fca6dba1bebe0cb444a68c130f8f2785ae3..924969d5cb52e5361b6bf383a8ba6f63508dad6d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -263,6 +263,7 @@ public class ServerPlayer extends Player { - public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - +@@ -266,6 +266,7 @@ public class ServerPlayer extends Player { + public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent + // CraftBukkit end public boolean isRealPlayer; // Paper + public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper + public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, @Nullable ProfilePublicKey publicKey) { diff --git a/patches/unapplied/server/0415-Use-distance-map-to-optimise-entity-tracker.patch b/patches/server/0414-Use-distance-map-to-optimise-entity-tracker.patch similarity index 95% rename from patches/unapplied/server/0415-Use-distance-map-to-optimise-entity-tracker.patch rename to patches/server/0414-Use-distance-map-to-optimise-entity-tracker.patch index 63fed4027e..df0de871e8 100644 --- a/patches/unapplied/server/0415-Use-distance-map-to-optimise-entity-tracker.patch +++ b/patches/server/0414-Use-distance-map-to-optimise-entity-tracker.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use distance map to optimise entity tracker Use the distance map to find candidate players for tracking. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751b7c7aa96 100644 +index d17a5b8d6f1b61ac1894e642d70704881c343f25..993d04766c81990e72166f1348a01d8ef7e05d0f 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -66,6 +66,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket; +@@ -68,6 +68,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket; import net.minecraft.network.protocol.game.ClientboundSetPassengersPacket; import net.minecraft.network.protocol.game.DebugPackets; import io.papermc.paper.util.MCUtil; @@ -17,7 +17,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751 import net.minecraft.server.level.progress.ChunkProgressListener; import net.minecraft.server.network.ServerPlayerConnection; import net.minecraft.util.CsvOutput; -@@ -163,6 +164,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -167,6 +168,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap; // this map is absent from updateMaps since it's controlled at the start of the chunkproviderserver tick public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerChunkTickRangeMap; // Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning @@ -41,7 +41,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751 void addPlayerToDistanceMaps(ServerPlayer player) { this.playerChunkManager.addPlayer(player); // Paper - replace chunk loader -@@ -175,6 +193,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -179,6 +197,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerMobDistanceMap.add(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player)); } // Paper end - per player mob spawning @@ -56,7 +56,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751 } void removePlayerFromDistanceMaps(ServerPlayer player) { -@@ -189,6 +215,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -193,6 +219,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerMobDistanceMap.remove(player); } // Paper end - per player mob spawning @@ -68,7 +68,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751 } void updateMaps(ServerPlayer player) { -@@ -202,6 +233,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -206,6 +237,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerMobDistanceMap.update(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player)); } // Paper end - per player mob spawning @@ -83,7 +83,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751 } // Paper end // Paper start -@@ -284,6 +323,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -292,6 +331,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.regionManagers.add(this.dataRegionManager); // Paper end this.playerMobDistanceMap = this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets) : null; // Paper @@ -129,7 +129,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751 // Paper start - optimise ChunkMap#anyPlayerCloseEnoughForSpawning this.playerChunkTickRangeMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, -@@ -986,17 +1064,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -998,17 +1076,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public void move(ServerPlayer player) { @@ -148,7 +148,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751 int i = SectionPos.blockToSectionCoord(player.getBlockX()); int j = SectionPos.blockToSectionCoord(player.getBlockZ()); -@@ -1095,7 +1163,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1107,7 +1175,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker this.entityMap.put(entity.getId(), playerchunkmap_entitytracker); @@ -157,7 +157,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751 if (entity instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entity; -@@ -1139,7 +1207,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1151,7 +1219,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.tracker = null; // Paper - We're no longer tracked } @@ -195,7 +195,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751 List list = Lists.newArrayList(); List list1 = this.level.players(); ObjectIterator objectiterator = this.entityMap.values().iterator(); -@@ -1213,46 +1311,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1250,46 +1348,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider })); // Paper end DebugPackets.sendPoiPacketsForChunk(this.level, chunk.getPos()); @@ -243,7 +243,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751 } -@@ -1307,6 +1366,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1344,6 +1403,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.lastSectionPos = SectionPos.of((EntityAccess) entity); } @@ -287,7 +287,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751 return object instanceof ChunkMap.TrackedEntity ? ((ChunkMap.TrackedEntity) object).entity.getId() == this.entity.getId() : false; } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 32623f90a5bc4fb6fe99897c682ef4f55f056dea..26c8b19d484032f5d0935ba8672a3121a3197d67 100644 +index 19218e993052d44a830f825f9a0eb695635861c1..2609bdb3f051e449f9a2e760e9c4d38f85855cf6 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -57,6 +57,7 @@ import net.minecraft.network.syncher.EntityDataSerializers; diff --git a/patches/unapplied/server/0416-Fix-villager-trading-demand-MC-163962.patch b/patches/server/0415-Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from patches/unapplied/server/0416-Fix-villager-trading-demand-MC-163962.patch rename to patches/server/0415-Fix-villager-trading-demand-MC-163962.patch diff --git a/patches/unapplied/server/0417-Maps-shouldn-t-load-chunks.patch b/patches/server/0416-Maps-shouldn-t-load-chunks.patch similarity index 65% rename from patches/unapplied/server/0417-Maps-shouldn-t-load-chunks.patch rename to patches/server/0416-Maps-shouldn-t-load-chunks.patch index 3ab19f357a..568d5b6e6c 100644 --- a/patches/unapplied/server/0417-Maps-shouldn-t-load-chunks.patch +++ b/patches/server/0416-Maps-shouldn-t-load-chunks.patch @@ -15,18 +15,18 @@ Previously maps would load all chunks in a certain radius depending on five ticks that movement occur in anyways. diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java -index 339dfd9fdffbc1c49b9112ba43ef6f05d85bdf86..44bfc5560a1b43925aabfd8137495e169da32fa2 100644 +index 0c4b4c8b770ea0adb1a8346ea2cda96570687bea..e58ba9c46e6de59b55c6471a44e1a5f158e70e07 100644 --- a/src/main/java/net/minecraft/world/item/MapItem.java +++ b/src/main/java/net/minecraft/world/item/MapItem.java -@@ -131,9 +131,9 @@ public class MapItem extends ComplexItem { - int k2 = (j / i + k1 - 64) * i; - int l2 = (k / i + l1 - 64) * i; +@@ -134,9 +134,9 @@ public class MapItem extends ComplexItem { + int j2 = (j / i + k1 - 64) * i; + int k2 = (k / i + l1 - 64) * i; Multiset multiset = LinkedHashMultiset.create(); -- LevelChunk chunk = world.getChunkAt(new BlockPos(k2, 0, l2)); -+ LevelChunk chunk = world.getChunkIfLoaded(new BlockPos(k2, 0, l2)); // Paper - Maps shouldn't load chunks +- LevelChunk chunk = world.getChunk(SectionPos.blockToSectionCoord(j2), SectionPos.blockToSectionCoord(k2)); ++ LevelChunk chunk = world.getChunkIfLoaded(SectionPos.blockToSectionCoord(j2), SectionPos.blockToSectionCoord(k2)); // Paper - Maps shouldn't load chunks - if (!chunk.isEmpty()) { + if (chunk != null && !chunk.isEmpty()) { // Paper - Maps shouldn't load chunks - ChunkPos chunkcoordintpair = chunk.getPos(); - int i3 = k2 & 15; - int j3 = l2 & 15; + int l2 = 0; + double d1 = 0.0D; + int i3; diff --git a/patches/unapplied/server/0418-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/0417-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 88% rename from patches/unapplied/server/0418-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to patches/server/0417-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch index 9ed5e37d35..5e2416fbfd 100644 --- a/patches/unapplied/server/0418-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch +++ b/patches/server/0417-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use seed based lookup for Treasure Maps - Fixes lag from diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java -index 44bfc5560a1b43925aabfd8137495e169da32fa2..d407cf849a31a7a77fda07aa687ebb254f43d6ab 100644 +index e58ba9c46e6de59b55c6471a44e1a5f158e70e07..f883e1bc4150bc074f1d8363a95b4eae16f3828e 100644 --- a/src/main/java/net/minecraft/world/item/MapItem.java +++ b/src/main/java/net/minecraft/world/item/MapItem.java -@@ -252,14 +252,13 @@ public class MapItem extends ComplexItem { +@@ -250,14 +250,13 @@ public class MapItem extends ComplexItem { boolean[] aboolean = new boolean[16384]; int l = j / i - 64; int i1 = k / i - 64; diff --git a/patches/unapplied/server/0419-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/patches/server/0418-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from patches/unapplied/server/0419-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to patches/server/0418-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/patches/unapplied/server/0420-Fix-piston-physics-inconsistency-MC-188840.patch b/patches/server/0419-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 96% rename from patches/unapplied/server/0420-Fix-piston-physics-inconsistency-MC-188840.patch rename to patches/server/0419-Fix-piston-physics-inconsistency-MC-188840.patch index 5c7d480a24..1b2148c127 100644 --- a/patches/unapplied/server/0420-Fix-piston-physics-inconsistency-MC-188840.patch +++ b/patches/server/0419-Fix-piston-physics-inconsistency-MC-188840.patch @@ -66,10 +66,10 @@ index 29755807fdb6c30e31c0ec2bbf33bed9afd5d478..8d73893100884c08aa552ff41c2a07a3 } diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java -index 1bcaed2abd1118804a362d6852e4a29d3064aa14..4b61602a1d2d6817272e02cfd282ac5dabbd976d 100644 +index 4f7b12d8f213d43f4ef5538b7e05809a1a106cbd..221c5d080d55326e458c1182823d6b49224ef498 100644 --- a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java -@@ -285,7 +285,7 @@ public class PistonMovingBlockEntity extends BlockEntity { +@@ -288,7 +288,7 @@ public class PistonMovingBlockEntity extends BlockEntity { if (world.getBlockState(pos).is(Blocks.MOVING_PISTON)) { BlockState blockState = Block.updateFromNeighbourShapes(blockEntity.movedState, world, pos); if (blockState.isAir()) { diff --git a/patches/unapplied/server/0421-Fix-sand-duping.patch b/patches/server/0420-Fix-sand-duping.patch similarity index 86% rename from patches/unapplied/server/0421-Fix-sand-duping.patch rename to patches/server/0420-Fix-sand-duping.patch index 4e10fc3dae..8f832a7d15 100644 --- a/patches/unapplied/server/0421-Fix-sand-duping.patch +++ b/patches/server/0420-Fix-sand-duping.patch @@ -7,10 +7,10 @@ If the falling block dies during teleportation (entity#move), then we need to detect that by placing a check after the move. 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 108c9ea0eb4a7f381042bfe0203ac40a9c4f27a7..da00fab453f3fb580acc9de65a0853656f9b6fc4 100644 +index e7404619877099aa2223da349e15090d2c9be1d0..23bd2a9af71b63bf463c7091ac261b033e9ce9af 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -126,6 +126,11 @@ public class FallingBlockEntity extends Entity { +@@ -128,6 +128,11 @@ public class FallingBlockEntity extends Entity { @Override public void tick() { @@ -22,7 +22,7 @@ index 108c9ea0eb4a7f381042bfe0203ac40a9c4f27a7..da00fab453f3fb580acc9de65a085365 if (this.blockState.isAir()) { this.discard(); } else { -@@ -138,6 +143,12 @@ public class FallingBlockEntity extends Entity { +@@ -140,6 +145,12 @@ public class FallingBlockEntity extends Entity { this.move(MoverType.SELF, this.getDeltaMovement()); diff --git a/patches/unapplied/server/0422-Fix-missing-chunks-due-to-integer-overflow.patch b/patches/server/0421-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 90% rename from patches/unapplied/server/0422-Fix-missing-chunks-due-to-integer-overflow.patch rename to patches/server/0421-Fix-missing-chunks-due-to-integer-overflow.patch index 94b8d07c3a..979e1e474e 100644 --- a/patches/unapplied/server/0422-Fix-missing-chunks-due-to-integer-overflow.patch +++ b/patches/server/0421-Fix-missing-chunks-due-to-integer-overflow.patch @@ -15,10 +15,10 @@ allows the distance calculation to avoid overflow and work as intended. This issue is being tracked in Mojira ticket MC-159283 diff --git a/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java b/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java -index 30b6c5839b0da1aea792b7e092f0fcf5e83835db..683474cd96d3a0cdfb3b22d0111c8d3231f01d92 100644 +index 299116c5c4d25c78a2af00bb44c4f51ac04286e8..fac92f37c32e0398ebc05d9a0378446fcabaef1a 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java +++ b/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java -@@ -501,7 +501,7 @@ public final class DensityFunctions { +@@ -502,7 +502,7 @@ public final class DensityFunctions { int j = z / 2; int k = x % 2; int l = z % 2; diff --git a/patches/unapplied/server/0423-Prevent-position-desync-in-playerconnection-causing-.patch b/patches/server/0422-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 91% rename from patches/unapplied/server/0423-Prevent-position-desync-in-playerconnection-causing-.patch rename to patches/server/0422-Prevent-position-desync-in-playerconnection-causing-.patch index 67c1208b0d..6d235ab41b 100644 --- a/patches/unapplied/server/0423-Prevent-position-desync-in-playerconnection-causing-.patch +++ b/patches/server/0422-Prevent-position-desync-in-playerconnection-causing-.patch @@ -14,10 +14,10 @@ behaviour, we need to move all of this dangerous logic outside of the move call and into an appropriate place in the tick method. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 8c8ccd61fb1592a9274e54ed6e06ec7737e942e0..10efc010cf5c43d3e009972c1f5ee7c4083d21f8 100644 +index 6936e9b671915fbc5d849adefa473906ed29ab95..dc10d5add00e77a2da761e806019785eb83d2bc6 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1446,6 +1446,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1438,6 +1438,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9)); this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move diff --git a/patches/unapplied/server/0424-Inventory-getHolder-method-without-block-snapshot.patch b/patches/server/0423-Inventory-getHolder-method-without-block-snapshot.patch similarity index 92% rename from patches/unapplied/server/0424-Inventory-getHolder-method-without-block-snapshot.patch rename to patches/server/0423-Inventory-getHolder-method-without-block-snapshot.patch index 9ed9fe0826..5fec002158 100644 --- a/patches/unapplied/server/0424-Inventory-getHolder-method-without-block-snapshot.patch +++ b/patches/server/0423-Inventory-getHolder-method-without-block-snapshot.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Inventory getHolder method without block snapshot diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index 3796f8b122ad981b6faacd2afcaf3696314aad6b..b17dab9e5c06d8789553b104602d7da35d926dd1 100644 +index 94a71073a0d69145cf3429a2b6f646a2dc2015fd..7271cf41d9ad153ce10b5b5e08ebcdbb3bc65be9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -@@ -532,6 +532,13 @@ public class CraftInventory implements Inventory { +@@ -535,6 +535,13 @@ public class CraftInventory implements Inventory { return this.inventory.getOwner(); } diff --git a/patches/unapplied/server/0425-Improve-Arrow-API.patch b/patches/server/0424-Improve-Arrow-API.patch similarity index 100% rename from patches/unapplied/server/0425-Improve-Arrow-API.patch rename to patches/server/0424-Improve-Arrow-API.patch diff --git a/patches/unapplied/server/0426-Add-and-implement-PlayerRecipeBookClickEvent.patch b/patches/server/0425-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 92% rename from patches/unapplied/server/0426-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to patches/server/0425-Add-and-implement-PlayerRecipeBookClickEvent.patch index 7c4e7cafb8..5dd9eca9a1 100644 --- a/patches/unapplied/server/0426-Add-and-implement-PlayerRecipeBookClickEvent.patch +++ b/patches/server/0425-Add-and-implement-PlayerRecipeBookClickEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 10efc010cf5c43d3e009972c1f5ee7c4083d21f8..496fdfcf3e6a80f9f2f073105bc2819ce127c8ef 100644 +index dc10d5add00e77a2da761e806019785eb83d2bc6..8f6ab03ade0e54f91d55dc54103f89425802aa42 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3229,9 +3229,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3096,9 +3096,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (!this.player.containerMenu.stillValid(this.player)) { ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu); } else { diff --git a/patches/unapplied/server/0427-Hide-sync-chunk-writes-behind-flag.patch b/patches/server/0426-Hide-sync-chunk-writes-behind-flag.patch similarity index 89% rename from patches/unapplied/server/0427-Hide-sync-chunk-writes-behind-flag.patch rename to patches/server/0426-Hide-sync-chunk-writes-behind-flag.patch index 1d9e0f2b56..f40c90779b 100644 --- a/patches/unapplied/server/0427-Hide-sync-chunk-writes-behind-flag.patch +++ b/patches/server/0426-Hide-sync-chunk-writes-behind-flag.patch @@ -9,10 +9,10 @@ on harddrives. -DPaper.enable-sync-chunk-writes=true to enable diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -index 1e01277448a3cf2b2045b54b182166a66c822e20..a32cfa75a9bea896f558bab646d0868391b069a9 100644 +index e72fb5c548a9baef09ae547863c4bdc439ce28b2..c7e4330c93baff1f3027d7c75cf857b673d38970 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -@@ -136,7 +136,7 @@ public class DedicatedServerProperties extends Settings { return Mth.clamp(integer, (int) 1, 29999984); }, 29999984); diff --git a/patches/unapplied/server/0428-Add-permission-for-command-blocks.patch b/patches/server/0427-Add-permission-for-command-blocks.patch similarity index 95% rename from patches/unapplied/server/0428-Add-permission-for-command-blocks.patch rename to patches/server/0427-Add-permission-for-command-blocks.patch index 52ec404d66..f7152f071e 100644 --- a/patches/unapplied/server/0428-Add-permission-for-command-blocks.patch +++ b/patches/server/0427-Add-permission-for-command-blocks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add permission for command blocks diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index af00442931f9f6cf878bd61137c2f29fc7c8d0b1..431ff490760f54be76847c7b370dbbb4b65de102 100644 +index aee5144bdc5bd9f7b07ce3b72331bcfd42663ec9..a98254e38076e82f94db7b2f2112500eaadd52d1 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -396,7 +396,7 @@ public class ServerPlayerGameMode { @@ -18,10 +18,10 @@ index af00442931f9f6cf878bd61137c2f29fc7c8d0b1..431ff490760f54be76847c7b370dbbb4 return false; } else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 496fdfcf3e6a80f9f2f073105bc2819ce127c8ef..033c1038ccc5f4c340f853a89a72aeadbf15922e 100644 +index 8f6ab03ade0e54f91d55dc54103f89425802aa42..9f095be14d7bb8495b09a10cad4d81dbcb7c3138 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -878,7 +878,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -870,7 +870,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (!this.server.isCommandBlockEnabled()) { this.player.sendSystemMessage(Component.translatable("advMode.notEnabled")); @@ -30,7 +30,7 @@ index 496fdfcf3e6a80f9f2f073105bc2819ce127c8ef..033c1038ccc5f4c340f853a89a72aead this.player.sendSystemMessage(Component.translatable("advMode.notAllowed")); } else { BaseCommandBlock commandblocklistenerabstract = null; -@@ -945,7 +945,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -937,7 +937,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (!this.server.isCommandBlockEnabled()) { this.player.sendSystemMessage(Component.translatable("advMode.notEnabled")); diff --git a/patches/unapplied/server/0429-Ensure-Entity-AABB-s-are-never-invalid.patch b/patches/server/0428-Ensure-Entity-AABB-s-are-never-invalid.patch similarity index 90% rename from patches/unapplied/server/0429-Ensure-Entity-AABB-s-are-never-invalid.patch rename to patches/server/0428-Ensure-Entity-AABB-s-are-never-invalid.patch index 6f30642b95..14950e6430 100644 --- a/patches/unapplied/server/0429-Ensure-Entity-AABB-s-are-never-invalid.patch +++ b/patches/server/0428-Ensure-Entity-AABB-s-are-never-invalid.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 26c8b19d484032f5d0935ba8672a3121a3197d67..1582da75f92aed598c1c076af7b94af7ab48d10a 100644 +index 2609bdb3f051e449f9a2e760e9c4d38f85855cf6..09b2b6633b108739e8fe6d4c400d42d88b27435e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -713,8 +713,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -19,7 +19,7 @@ index 26c8b19d484032f5d0935ba8672a3121a3197d67..1582da75f92aed598c1c076af7b94af7 } protected AABB makeBoundingBox() { -@@ -3945,6 +3945,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3995,6 +3995,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public final void setPosRaw(double x, double y, double z) { @@ -31,7 +31,7 @@ index 26c8b19d484032f5d0935ba8672a3121a3197d67..1582da75f92aed598c1c076af7b94af7 // Paper start - rewrite chunk system if (this.updatingSectionStatus) { LOGGER.error("Refusing to update position for entity " + this + " to position " + new Vec3(x, y, z) + " since it is processing a section status update", new Throwable()); -@@ -3968,6 +3973,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4018,6 +4023,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.levelCallback.onMove(); } diff --git a/patches/unapplied/server/0430-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0429-Fix-Per-World-Difficulty-Remembering-Difficulty.patch similarity index 87% rename from patches/unapplied/server/0430-Fix-Per-World-Difficulty-Remembering-Difficulty.patch rename to patches/server/0429-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index 629abccc39..21cba7bb0c 100644 --- a/patches/unapplied/server/0430-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0429-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -8,10 +8,10 @@ makes it so that the server keeps the last difficulty used instead of restoring the server.properties every single load. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index fb2d02ad6f6a4a1c69dde06e7e193aaef8655028..dda33bd52d9c527c37f67b829010c27dba4b667a 100644 +index 93c1a1bf602af1e73202590e78dac8336a5d3296..ce02077acd0958272e01e695c040a030eb8febdc 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -791,7 +791,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { net.minecraft.server.MinecraftServer.getServer().scheduleOnMain(() -> { net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk)c; diff --git a/patches/unapplied/server/0436-incremental-chunk-and-player-saving.patch b/patches/server/0434-incremental-chunk-and-player-saving.patch similarity index 89% rename from patches/unapplied/server/0436-incremental-chunk-and-player-saving.patch rename to patches/server/0434-incremental-chunk-and-player-saving.patch index 7eb63906a5..de935d9cab 100644 --- a/patches/unapplied/server/0436-incremental-chunk-and-player-saving.patch +++ b/patches/server/0434-incremental-chunk-and-player-saving.patch @@ -5,10 +5,10 @@ Subject: [PATCH] incremental chunk and player saving diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index dda33bd52d9c527c37f67b829010c27dba4b667a..e42b12839faab0c040495b00368b107b35b93283 100644 +index ce02077acd0958272e01e695c040a030eb8febdc..8e101269ca2edf5f3cc9c1ccedd03afaf1392d19 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -864,7 +864,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoopwill throw an NPE. */ public UUID getUUID(String key) { @@ -46,10 +46,10 @@ index 0778fdd4f47015787f7ffbfb39c31ec0e1c039bd..912fd5135e89348bdd3c0a8b6c07860e return tag != null && tag.getType() == IntArrayTag.TYPE && ((IntArrayTag)tag).getAsIntArray().length == 4; } diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java -index d6d8adf1e49cdb74dc5d8e2e60bcaca7c5e1c16d..b31741a9c3363e4288636ceff9b38c598a84aa43 100644 +index c0fe7c576f2361e599bc23003da7c49bb7cb62b2..846f8267f7d24f52b84314483c8230c620ef2dce 100644 --- a/src/main/java/net/minecraft/nbt/NbtUtils.java +++ b/src/main/java/net/minecraft/nbt/NbtUtils.java -@@ -75,6 +75,11 @@ public final class NbtUtils { +@@ -79,6 +79,11 @@ public final class NbtUtils { if (nbt.contains("Name", 8)) { string = nbt.getString("Name"); } diff --git a/patches/unapplied/server/0439-Clean-up-duplicated-GameProfile-Properties.patch b/patches/server/0437-Clean-up-duplicated-GameProfile-Properties.patch similarity index 89% rename from patches/unapplied/server/0439-Clean-up-duplicated-GameProfile-Properties.patch rename to patches/server/0437-Clean-up-duplicated-GameProfile-Properties.patch index 25554ddf57..b54d06ed5a 100644 --- a/patches/unapplied/server/0439-Clean-up-duplicated-GameProfile-Properties.patch +++ b/patches/server/0437-Clean-up-duplicated-GameProfile-Properties.patch @@ -9,10 +9,10 @@ growing to large sizes and preventing login. This now automatically cleans up the extra properties. diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java -index b31741a9c3363e4288636ceff9b38c598a84aa43..46681f3fa63516aa750de11cf1dee17cb3734fcd 100644 +index 846f8267f7d24f52b84314483c8230c620ef2dce..c33a6d3d5700a7ec1dae2434d00cf0f480a5f0e5 100644 --- a/src/main/java/net/minecraft/nbt/NbtUtils.java +++ b/src/main/java/net/minecraft/nbt/NbtUtils.java -@@ -93,7 +93,8 @@ public final class NbtUtils { +@@ -97,7 +97,8 @@ public final class NbtUtils { for(String string2 : compoundTag.getAllKeys()) { ListTag listTag = compoundTag.getList(string2, 10); @@ -23,10 +23,10 @@ index b31741a9c3363e4288636ceff9b38c598a84aa43..46681f3fa63516aa750de11cf1dee17c String string3 = compoundTag2.getString("Value"); if (compoundTag2.contains("Signature", 8)) { diff --git a/src/main/java/net/minecraft/world/item/PlayerHeadItem.java b/src/main/java/net/minecraft/world/item/PlayerHeadItem.java -index 2fb1500e9d3202b6377bf4d8e50102a98f409148..72a0c7ad03b18c3156b4f3c7240f7551583f981c 100644 +index 8fb0d34e3c9a15e763f3ad493a31ba8d59b240d7..045a988fc11587e2d7bd78b43f058092c880272c 100644 --- a/src/main/java/net/minecraft/world/item/PlayerHeadItem.java +++ b/src/main/java/net/minecraft/world/item/PlayerHeadItem.java -@@ -52,6 +52,18 @@ public class PlayerHeadItem extends StandingAndWallBlockItem { +@@ -53,6 +53,18 @@ public class PlayerHeadItem extends StandingAndWallBlockItem { }); // CraftBukkit start } else { diff --git a/patches/unapplied/server/0440-Convert-legacy-attributes-in-Item-Meta.patch b/patches/server/0438-Convert-legacy-attributes-in-Item-Meta.patch similarity index 95% rename from patches/unapplied/server/0440-Convert-legacy-attributes-in-Item-Meta.patch rename to patches/server/0438-Convert-legacy-attributes-in-Item-Meta.patch index b949a9e873..030693cdcd 100644 --- a/patches/unapplied/server/0440-Convert-legacy-attributes-in-Item-Meta.patch +++ b/patches/server/0438-Convert-legacy-attributes-in-Item-Meta.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Convert legacy attributes in Item Meta diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java -index 0520c45197629cbdc2777d9ae11eef572e793160..46c313d581b9af6aa0a48f97ae3cc800a88535f2 100644 +index fac4097be2ee3d0bffbc92fb217f98831e78d6b3..233e372ba5d785352c9ac12dac37395bac63315c 100644 --- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java +++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java -@@ -11,6 +11,20 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; +@@ -12,6 +12,20 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; public class CraftAttributeMap implements Attributable { private final AttributeMap handle; diff --git a/patches/unapplied/server/0441-Remove-some-streams-from-structures.patch b/patches/server/0439-Remove-some-streams-from-structures.patch similarity index 96% rename from patches/unapplied/server/0441-Remove-some-streams-from-structures.patch rename to patches/server/0439-Remove-some-streams-from-structures.patch index d535ed9e91..b289b10692 100644 --- a/patches/unapplied/server/0441-Remove-some-streams-from-structures.patch +++ b/patches/server/0439-Remove-some-streams-from-structures.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Remove some streams from structures This showed up a lot in the spark profiler, should have a low-medium performance improvement. diff --git a/src/main/java/net/minecraft/world/level/levelgen/Beardifier.java b/src/main/java/net/minecraft/world/level/levelgen/Beardifier.java -index 24f58441ae7b43a62d74aa55e9808c1c65f466e4..99e329d374b60ebf77f93551f6bf83b9bca1e4b8 100644 +index ad82bed470471dcb11035be2cb54972e4f2c1c9b..af63ad44103e0ca1dfe17d468e41531728c957aa 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/Beardifier.java +++ b/src/main/java/net/minecraft/world/level/levelgen/Beardifier.java @@ -36,9 +36,10 @@ public class Beardifier implements DensityFunctions.BeardifierOrMarker { diff --git a/patches/unapplied/server/0442-Remove-streams-from-classes-related-villager-gossip.patch b/patches/server/0440-Remove-streams-from-classes-related-villager-gossip.patch similarity index 67% rename from patches/unapplied/server/0442-Remove-streams-from-classes-related-villager-gossip.patch rename to patches/server/0440-Remove-streams-from-classes-related-villager-gossip.patch index 6ae0f1a026..4f36781948 100644 --- a/patches/unapplied/server/0442-Remove-streams-from-classes-related-villager-gossip.patch +++ b/patches/server/0440-Remove-streams-from-classes-related-villager-gossip.patch @@ -5,20 +5,30 @@ Subject: [PATCH] Remove streams from classes related villager gossip diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java -index 92beb137d86ae89d90b1963a024c0be308d81a42..e377dd95b7824804611d0e4ce825576ed533e73e 100644 +index 4e7b7a3910840908b73c80faf9a83b728186f775..f64da4c3bd4301453688974182e7793804655d2c 100644 --- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java +++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java -@@ -58,8 +58,21 @@ public class GossipContainer { +@@ -30,7 +30,7 @@ import org.slf4j.Logger; + public class GossipContainer { + private static final Logger LOGGER = LogUtils.getLogger(); + public static final int DISCARD_THRESHOLD = 2; +- private final Map gossips = Maps.newHashMap(); public Map getReputations() { return this.gossips; } // Paper - add getter for reputations ++ private final Map gossips = Maps.newHashMap(); + + @VisibleForDebug + public Map> getGossipEntries() { +@@ -61,8 +61,22 @@ public class GossipContainer { }); } + // Paper start - Remove streams from reputation + private List decompress() { + List list = new it.unimi.dsi.fastutil.objects.ObjectArrayList<>(); -+ for (Map.Entry entry : getReputations().entrySet()) { ++ for (Map.Entry entry : this.gossips.entrySet()) { + for (GossipContainer.GossipEntry cur : entry.getValue().decompress(entry.getKey())) { -+ if (cur.weightedValue() != 0) ++ if (cur.weightedValue() != 0) { + list.add(cur); ++ } + } + } + return list; @@ -26,21 +36,21 @@ index 92beb137d86ae89d90b1963a024c0be308d81a42..e377dd95b7824804611d0e4ce825576e + // Paper end + private Collection selectGossipsForTransfer(RandomSource random, int count) { -- List list = this.unpack().collect(Collectors.toList()); +- List list = this.unpack().toList(); + List list = this.decompress(); // Paper - Remove streams from reputation if (list.isEmpty()) { return Collections.emptyList(); } else { -@@ -153,7 +166,7 @@ public class GossipContainer { +@@ -156,7 +170,7 @@ public class GossipContainer { } - public Dynamic store(DynamicOps ops) { -- return new Dynamic<>(ops, ops.createList(this.unpack().map((entry) -> { -+ return new Dynamic<>(ops, ops.createList(this.decompress().stream().map((entry) -> { // Paper - remove streams from reputation - return entry.store(ops); - }).map(Dynamic::getValue))); + public T store(DynamicOps ops) { +- return GossipContainer.GossipEntry.LIST_CODEC.encodeStart(ops, this.unpack().toList()).resultOrPartial((error) -> { ++ return GossipContainer.GossipEntry.LIST_CODEC.encodeStart(ops, this.decompress()).resultOrPartial((error) -> { + LOGGER.warn("Failed to serialize gossips: {}", (Object)error); + }).orElseGet(ops::emptyList); } -@@ -179,11 +192,23 @@ public class GossipContainer { +@@ -184,11 +198,23 @@ public class GossipContainer { final Object2IntMap entries = new Object2IntOpenHashMap<>(); public int weightedValue(Predicate gossipTypeFilter) { diff --git a/patches/unapplied/server/0443-Support-components-in-ItemMeta.patch b/patches/server/0441-Support-components-in-ItemMeta.patch similarity index 100% rename from patches/unapplied/server/0443-Support-components-in-ItemMeta.patch rename to patches/server/0441-Support-components-in-ItemMeta.patch diff --git a/patches/unapplied/server/0445-Add-entity-liquid-API.patch b/patches/server/0442-Add-entity-liquid-API.patch similarity index 90% rename from patches/unapplied/server/0445-Add-entity-liquid-API.patch rename to patches/server/0442-Add-entity-liquid-API.patch index 0a8b551c42..70543abb2d 100644 --- a/patches/unapplied/server/0445-Add-entity-liquid-API.patch +++ b/patches/server/0442-Add-entity-liquid-API.patch @@ -8,10 +8,10 @@ public net.minecraft.world.entity.Entity isInRain()Z public net.minecraft.world.entity.Entity isInBubbleColumn()Z diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 3bda8128c2956d817677e28ff87c9c5ed61c8bd2..ceb7123362ba85df825a50c035a399174b6634dc 100644 +index e900c64b8b07dc9cf47cc565e60df6781ca95756..6cc448268f786b06529f5488fa3153f6c8cc8fdf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1271,5 +1271,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1273,5 +1273,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason() { return getHandle().spawnReason; } diff --git a/patches/unapplied/server/0446-Update-itemstack-legacy-name-and-lore.patch b/patches/server/0443-Update-itemstack-legacy-name-and-lore.patch similarity index 93% rename from patches/unapplied/server/0446-Update-itemstack-legacy-name-and-lore.patch rename to patches/server/0443-Update-itemstack-legacy-name-and-lore.patch index 49dc09d429..dc2f3d4011 100644 --- a/patches/unapplied/server/0446-Update-itemstack-legacy-name-and-lore.patch +++ b/patches/server/0443-Update-itemstack-legacy-name-and-lore.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Update itemstack legacy name and lore diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 2650deb381bae30593128fc003c042f42110802c..85dead69d41ca10ad76fdab13da8548d359142b0 100644 +index 29c605ff88956435752412847734992fe6bcd55d..36107f22914ec47212e41c17852fb486c67e5c52 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -166,6 +166,44 @@ public final class ItemStack { +@@ -170,6 +170,44 @@ public final class ItemStack { list.sort((java.util.Comparator) enchantSorter); // Paper } catch (Exception ignored) {} } @@ -53,7 +53,7 @@ index 2650deb381bae30593128fc003c042f42110802c..85dead69d41ca10ad76fdab13da8548d // Paper end public ItemStack(ItemLike item) { -@@ -220,6 +258,7 @@ public final class ItemStack { +@@ -224,6 +262,7 @@ public final class ItemStack { this.tag = nbttagcompound.getCompound("tag").copy(); // CraftBukkit end this.processEnchantOrder(this.tag); // Paper diff --git a/patches/unapplied/server/0447-Spawn-player-in-correct-world-on-login.patch b/patches/server/0444-Spawn-player-in-correct-world-on-login.patch similarity index 91% rename from patches/unapplied/server/0447-Spawn-player-in-correct-world-on-login.patch rename to patches/server/0444-Spawn-player-in-correct-world-on-login.patch index 4bab29fec6..0616e9ed5b 100644 --- a/patches/unapplied/server/0447-Spawn-player-in-correct-world-on-login.patch +++ b/patches/server/0444-Spawn-player-in-correct-world-on-login.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Spawn player in correct world on login diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 80c98d35293cd5a25982d04c980c9fd7e7b4670c..55c5576bd76718a0cc5d8fbcb80eeeac8b6c9277 100644 +index b4e9462cbeec9ec8bd25b79839fde7d92410057f..b4ee231092c0e7a9e4a6ee978d9d8de320ac1cad 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -203,7 +203,18 @@ public abstract class PlayerList { +@@ -209,7 +209,18 @@ public abstract class PlayerList { }String lastKnownName = s; // Paper // CraftBukkit end diff --git a/patches/unapplied/server/0448-Add-PrepareResultEvent.patch b/patches/server/0445-Add-PrepareResultEvent.patch similarity index 91% rename from patches/unapplied/server/0448-Add-PrepareResultEvent.patch rename to patches/server/0445-Add-PrepareResultEvent.patch index 89497733ce..24fbc4d4ae 100644 --- a/patches/unapplied/server/0448-Add-PrepareResultEvent.patch +++ b/patches/server/0445-Add-PrepareResultEvent.patch @@ -20,7 +20,7 @@ index eb22059fe008c3d3fc0364a7f85f91b4cca8b328..506d758efbf16da9467f120321d2359a public int getCost() { diff --git a/src/main/java/net/minecraft/world/inventory/CartographyTableMenu.java b/src/main/java/net/minecraft/world/inventory/CartographyTableMenu.java -index fc2b400c58ddbd7b012707c61d9a37363d351251..4f5593d387545545e30475d3edaa92a4306ba96b 100644 +index 74447bd2ff36c5360db52d2a56fe3fbe56aee7d2..7733b5271307849e3e56c6089649c4caa7c0ac1d 100644 --- a/src/main/java/net/minecraft/world/inventory/CartographyTableMenu.java +++ b/src/main/java/net/minecraft/world/inventory/CartographyTableMenu.java @@ -150,6 +150,7 @@ public class CartographyTableMenu extends AbstractContainerMenu { @@ -32,7 +32,7 @@ index fc2b400c58ddbd7b012707c61d9a37363d351251..4f5593d387545545e30475d3edaa92a4 private void setupResultSlot(ItemStack map, ItemStack item, ItemStack oldResult) { diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java -index aa0ba9c7dcb0ee81c9081031c447eeab61d92a10..7a0c38c743ef02f5b9c052f88c2d6429a53b8286 100644 +index 9010656b7f013d50872017a298368ec8a3016e9c..00e2148419517c94def76f0a75562cc0093ea3ed 100644 --- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java +++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java @@ -159,6 +159,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { @@ -44,7 +44,7 @@ index aa0ba9c7dcb0ee81c9081031c447eeab61d92a10..7a0c38c743ef02f5b9c052f88c2d6429 } diff --git a/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java b/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java -index f5e52220abc5c678c090b32d83eb9644fa91ce9d..35575434f3c90f1bd23df6584ee8a5a991f93f9f 100644 +index a0caf5d4085305121f77089dc50e4b32cd1a8d9b..c34a66310969c3c837d09693159b827c1edddd3b 100644 --- a/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java @@ -78,6 +78,7 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu { @@ -56,7 +56,7 @@ index f5e52220abc5c678c090b32d83eb9644fa91ce9d..35575434f3c90f1bd23df6584ee8a5a9 } diff --git a/src/main/java/net/minecraft/world/inventory/LoomMenu.java b/src/main/java/net/minecraft/world/inventory/LoomMenu.java -index d028ad0ab0e800b0fd93362d21942dff392f24af..942b4cc710bede4c942d269dcfc14ae105ab848d 100644 +index cb08da8b5f6abc644ff5834f2ca32acf4fd0a255..b7f3dc81ecac0d814203028a9213f304bcc19574 100644 --- a/src/main/java/net/minecraft/world/inventory/LoomMenu.java +++ b/src/main/java/net/minecraft/world/inventory/LoomMenu.java @@ -248,7 +248,8 @@ public class LoomMenu extends AbstractContainerMenu { @@ -70,11 +70,11 @@ index d028ad0ab0e800b0fd93362d21942dff392f24af..942b4cc710bede4c942d269dcfc14ae1 this.resultSlot.set(ItemStack.EMPTY); this.selectablePatterns = List.of(); diff --git a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java -index 92dd2ea23185bba311e184b2ac9744a423c102ea..71bb09e3d31f098503d0e1bdf073b60f07d76ed0 100644 +index 9c898862d665d073cccd0c33e5b0435c52fef5b6..c4cdf54dc5f7f84474a7af7ff43c5f986311b210 100644 --- a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java +++ b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java -@@ -76,6 +76,7 @@ public class SmithingMenu extends ItemCombinerMenu { - // CraftBukkit end +@@ -79,6 +79,7 @@ public class SmithingMenu extends ItemCombinerMenu { + } } + org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareResultEvent(this, RESULT_SLOT); // Paper @@ -82,7 +82,7 @@ index 92dd2ea23185bba311e184b2ac9744a423c102ea..71bb09e3d31f098503d0e1bdf073b60f @Override diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java -index cdebd0cdf6eb901464cf4c16089b10ea0147b54d..b47dc7671fab2117b989d647d7e8e36d12af5f76 100644 +index 78c1bd1c709ef29ccfa75fa87d8af1217cc57b59..4ee54e3a61588e5574e3f7ba06a73bbd73975957 100644 --- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java +++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java @@ -176,6 +176,7 @@ public class StonecutterMenu extends AbstractContainerMenu { @@ -94,7 +94,7 @@ index cdebd0cdf6eb901464cf4c16089b10ea0147b54d..b47dc7671fab2117b989d647d7e8e36d private void setupRecipeList(Container input, ItemStack stack) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 359964cd8820b8ef8b8dba5501119164cebcf743..2809ec8fcd43d096a187fc2fbda042a81d301c0c 100644 +index 571eb0eea3bf7b0cf567cdf571699e729402fda0..88fb677231e13d714e20ae55c08443212b0512a9 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1584,19 +1584,44 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0449-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch b/patches/server/0446-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch similarity index 84% rename from patches/unapplied/server/0449-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch rename to patches/server/0446-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch index bb00d0c79c..49d43cc8e8 100644 --- a/patches/unapplied/server/0449-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch +++ b/patches/server/0446-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a337ce97a31998a63e7c329ac94cad9a5f783a5c..9c5421b9aa35c5f90a51ed097e68c5143054e966 100644 +index b6741c72216378368392e65aad3ff75a3191d0ce..b96a783e4df3a5ce1115d05e00e1ae2e0cd6378d 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3446,7 +3446,7 @@ public abstract class LivingEntity extends Entity { +@@ -3471,7 +3471,7 @@ public abstract class LivingEntity extends Entity { Entity entity = this.getVehicle(); super.stopRiding(suppressCancellation); // Paper - suppress diff --git a/patches/unapplied/server/0450-Optimize-NetworkManager-Exception-Handling.patch b/patches/server/0447-Optimize-NetworkManager-Exception-Handling.patch similarity index 96% rename from patches/unapplied/server/0450-Optimize-NetworkManager-Exception-Handling.patch rename to patches/server/0447-Optimize-NetworkManager-Exception-Handling.patch index 3ae0daa7d1..fa890ce570 100644 --- a/patches/unapplied/server/0450-Optimize-NetworkManager-Exception-Handling.patch +++ b/patches/server/0447-Optimize-NetworkManager-Exception-Handling.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize NetworkManager Exception Handling diff --git a/src/main/java/net/minecraft/network/ConnectionProtocol.java b/src/main/java/net/minecraft/network/ConnectionProtocol.java -index 672e296cec289abd3bf797d84e16983ca50907be..aec921477e035095d569eab3335175b93a65e672 100644 +index 1c243b60bf955841d69d1a5ace9d243edf88a6fb..19f05a2d202e3b71391d20acbf54392f644978e4 100644 --- a/src/main/java/net/minecraft/network/ConnectionProtocol.java +++ b/src/main/java/net/minecraft/network/ConnectionProtocol.java -@@ -302,6 +302,7 @@ public enum ConnectionProtocol { +@@ -300,6 +300,7 @@ public enum ConnectionProtocol { @Nullable public Packet createPacket(int id, FriendlyByteBuf buf) { diff --git a/patches/unapplied/server/0451-Optimize-the-advancement-data-player-iteration-to-be.patch b/patches/server/0448-Optimize-the-advancement-data-player-iteration-to-be.patch similarity index 100% rename from patches/unapplied/server/0451-Optimize-the-advancement-data-player-iteration-to-be.patch rename to patches/server/0448-Optimize-the-advancement-data-player-iteration-to-be.patch diff --git a/patches/unapplied/server/0452-Fix-arrows-never-despawning-MC-125757.patch b/patches/server/0449-Fix-arrows-never-despawning-MC-125757.patch similarity index 86% rename from patches/unapplied/server/0452-Fix-arrows-never-despawning-MC-125757.patch rename to patches/server/0449-Fix-arrows-never-despawning-MC-125757.patch index 5597e70116..c04bb2c0b4 100644 --- a/patches/unapplied/server/0452-Fix-arrows-never-despawning-MC-125757.patch +++ b/patches/server/0449-Fix-arrows-never-despawning-MC-125757.patch @@ -9,10 +9,10 @@ instead of getting stuck in a never despawn state (bubble columns, etc). diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index da92f324322f4fb18f9aa72c4298ffc8ab040953..3b1e17a8733de823b36315c81e8ca5884e83368e 100644 +index f268fc2914996698490b84c4a30bac819c581d05..61d4a58ab25ce3bdf7ced426d2f92bc75ef02f7d 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -199,6 +199,7 @@ public abstract class AbstractArrow extends Projectile { +@@ -200,6 +200,7 @@ public abstract class AbstractArrow extends Projectile { ++this.inGroundTime; } else { diff --git a/patches/unapplied/server/0453-Thread-Safe-Vanilla-Command-permission-checking.patch b/patches/server/0450-Thread-Safe-Vanilla-Command-permission-checking.patch similarity index 92% rename from patches/unapplied/server/0453-Thread-Safe-Vanilla-Command-permission-checking.patch rename to patches/server/0450-Thread-Safe-Vanilla-Command-permission-checking.patch index 12e1413e81..aed58b8511 100644 --- a/patches/unapplied/server/0453-Thread-Safe-Vanilla-Command-permission-checking.patch +++ b/patches/server/0450-Thread-Safe-Vanilla-Command-permission-checking.patch @@ -26,10 +26,10 @@ index 20a7cdf87f307878d66922aaac0c60cff218e46c..39844531b03eb8a6c70700b4ecbf0ff1 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java -index 891d1fb88d8de9d1b34f300ba640cfc6fbd8a4de..2ff021966426dd6c7c1081fbcfacf4677b404264 100644 +index b8f5b5895bf75aa8e08b2b0431ef6fdacd235430..c2af60bdb755034e46b85143826a29c4482d58f5 100644 --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java -@@ -59,7 +59,7 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy +@@ -61,7 +61,7 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy private final Vec2 rotation; private final CommandSigningContext signingContext; private final TaskChainer chatMessageChainer; @@ -38,7 +38,7 @@ index 891d1fb88d8de9d1b34f300ba640cfc6fbd8a4de..2ff021966426dd6c7c1081fbcfacf467 public boolean bypassSelectorPermissions = false; // Paper public CommandSourceStack(CommandSource output, Vec3 pos, Vec2 rot, ServerLevel world, int level, String name, Component displayName, MinecraftServer server, @Nullable Entity entity) { -@@ -196,9 +196,11 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy +@@ -194,9 +194,11 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy @Override public boolean hasPermission(int level) { // CraftBukkit start diff --git a/patches/unapplied/server/0454-Fix-SPIGOT-5989.patch b/patches/server/0451-Fix-SPIGOT-5989.patch similarity index 90% rename from patches/unapplied/server/0454-Fix-SPIGOT-5989.patch rename to patches/server/0451-Fix-SPIGOT-5989.patch index 075f2a20e1..3b842f1c77 100644 --- a/patches/unapplied/server/0454-Fix-SPIGOT-5989.patch +++ b/patches/server/0451-Fix-SPIGOT-5989.patch @@ -10,10 +10,10 @@ This fixes that by checking if the modified spawn location is still at a respawn anchor. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 55c5576bd76718a0cc5d8fbcb80eeeac8b6c9277..7528491e129b250da5cb505d7befceee8cfe74e6 100644 +index b4ee231092c0e7a9e4a6ee978d9d8de320ac1cad..62fe8133e10ca4e04670b504bf18db9f5e7512e0 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -842,6 +842,7 @@ public abstract class PlayerList { +@@ -850,6 +850,7 @@ public abstract class PlayerList { // Paper start boolean isBedSpawn = false; boolean isRespawn = false; @@ -21,7 +21,7 @@ index 55c5576bd76718a0cc5d8fbcb80eeeac8b6c9277..7528491e129b250da5cb505d7befceee // Paper end // CraftBukkit start - fire PlayerRespawnEvent -@@ -852,7 +853,7 @@ public abstract class PlayerList { +@@ -860,7 +861,7 @@ public abstract class PlayerList { Optional optional; if (blockposition != null) { @@ -30,7 +30,7 @@ index 55c5576bd76718a0cc5d8fbcb80eeeac8b6c9277..7528491e129b250da5cb505d7befceee } else { optional = Optional.empty(); } -@@ -896,7 +897,12 @@ public abstract class PlayerList { +@@ -904,7 +905,12 @@ public abstract class PlayerList { } // Spigot End @@ -44,7 +44,7 @@ index 55c5576bd76718a0cc5d8fbcb80eeeac8b6c9277..7528491e129b250da5cb505d7befceee if (!flag) entityplayer.reset(); // SPIGOT-4785 isRespawn = true; // Paper } else { -@@ -934,8 +940,12 @@ public abstract class PlayerList { +@@ -944,8 +950,12 @@ public abstract class PlayerList { } // entityplayer1.initInventoryMenu(); entityplayer1.setHealth(entityplayer1.getHealth()); diff --git a/patches/unapplied/server/0455-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch b/patches/server/0452-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch similarity index 96% rename from patches/unapplied/server/0455-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch rename to patches/server/0452-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch index c7303d0b5c..b880f8bef6 100644 --- a/patches/unapplied/server/0455-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch +++ b/patches/server/0452-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix SPIGOT-5824 Bukkit world-container is not used diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 151b13e257c09fc5c4bbccfc388b15ad76133909..3f7dde4fe1fdce3638d1db5e96a546b9fae90269 100644 +index 7c1ad1e39c3b3dfd476133ef4d938187b7a11f09..9b1ec0186e7dfa1591532fa887f27fa378fb1d95 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -154,8 +154,17 @@ public class Main { +@@ -157,8 +157,17 @@ public class Main { return; } diff --git a/patches/unapplied/server/0456-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch b/patches/server/0453-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch similarity index 85% rename from patches/unapplied/server/0456-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch rename to patches/server/0453-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch index 5010bc5bf1..50c2c1fab5 100644 --- a/patches/unapplied/server/0456-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch +++ b/patches/server/0453-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix SPIGOT-5885 Unable to disable advancements diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 3f7dde4fe1fdce3638d1db5e96a546b9fae90269..13ef3bb2b84fac9a1be72b09e7e3c022fa08221a 100644 +index 9b1ec0186e7dfa1591532fa887f27fa378fb1d95..727efbe152dccabf130a6871e3d2582a5a733016 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -154,6 +154,7 @@ public class Main { +@@ -157,6 +157,7 @@ public class Main { return; } diff --git a/patches/unapplied/server/0457-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch b/patches/server/0454-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch similarity index 100% rename from patches/unapplied/server/0457-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch rename to patches/server/0454-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch diff --git a/patches/unapplied/server/0458-Add-missing-strikeLighting-call-to-World-spigot-stri.patch b/patches/server/0455-Add-missing-strikeLighting-call-to-World-spigot-stri.patch similarity index 83% rename from patches/unapplied/server/0458-Add-missing-strikeLighting-call-to-World-spigot-stri.patch rename to patches/server/0455-Add-missing-strikeLighting-call-to-World-spigot-stri.patch index 9ebf6d1aa9..ab5db0e0f8 100644 --- a/patches/unapplied/server/0458-Add-missing-strikeLighting-call-to-World-spigot-stri.patch +++ b/patches/server/0455-Add-missing-strikeLighting-call-to-World-spigot-stri.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing strikeLighting call to diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index f19bfe6d6d4d915876cea3e6ef792639300fced1..643b682db12560fc3409ede861a4e0aea8fc5360 100644 +index f3723a8219881d55959e7231e230d28bfb521dcd..d9ac6e687ad7f4c2cfe6698cdf6e7d1d4652eb2b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2134,6 +2134,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2133,6 +2133,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { lightning.moveTo( loc.getX(), loc.getY(), loc.getZ() ); lightning.visualOnly = true; lightning.isSilent = isSilent; diff --git a/patches/unapplied/server/0459-Fix-some-rails-connecting-improperly.patch b/patches/server/0456-Fix-some-rails-connecting-improperly.patch similarity index 100% rename from patches/unapplied/server/0459-Fix-some-rails-connecting-improperly.patch rename to patches/server/0456-Fix-some-rails-connecting-improperly.patch diff --git a/patches/unapplied/server/0460-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch b/patches/server/0457-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch similarity index 100% rename from patches/unapplied/server/0460-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch rename to patches/server/0457-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch diff --git a/patches/unapplied/server/0461-Do-not-let-the-server-load-chunks-from-newer-version.patch b/patches/server/0458-Do-not-let-the-server-load-chunks-from-newer-version.patch similarity index 93% rename from patches/unapplied/server/0461-Do-not-let-the-server-load-chunks-from-newer-version.patch rename to patches/server/0458-Do-not-let-the-server-load-chunks-from-newer-version.patch index 8e90d25da9..f95088b518 100644 --- a/patches/unapplied/server/0461-Do-not-let-the-server-load-chunks-from-newer-version.patch +++ b/patches/server/0458-Do-not-let-the-server-load-chunks-from-newer-version.patch @@ -9,10 +9,10 @@ the game, immediately stop the server to prevent data corruption. You can override this functionality at your own peril. diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index 89c367f542aee35ba9f596d678bfeb5412c1697d..4236cf65b893bc21d2597010a2f9745fc0e107a4 100644 +index f6d1eac46c619831e146c62a9c08d3305c63c7bc..f8edcc9697289c2cf43c9021d5518955d0d701e7 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -@@ -126,9 +126,22 @@ public class ChunkSerializer { +@@ -128,9 +128,22 @@ public class ChunkSerializer { return holder.protoChunk; } diff --git a/patches/unapplied/server/0462-Brand-support.patch b/patches/server/0459-Brand-support.patch similarity index 87% rename from patches/unapplied/server/0462-Brand-support.patch rename to patches/server/0459-Brand-support.patch index 8e0ba7f0be..cdcf1fabc1 100644 --- a/patches/unapplied/server/0462-Brand-support.patch +++ b/patches/server/0459-Brand-support.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Brand support diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f6012bf8134f0606710511150dd296a1d677334d..6e7d909bd87a1732e99c68d2baf57042d7e930fe 100644 +index f440d9446d738429e33ed1fa9fa495af67f6427a..8eeb521b11062ecc699813c2132f7edf655d8d09 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -298,6 +298,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -16,8 +16,8 @@ index f6012bf8134f0606710511150dd296a1d677334d..6e7d909bd87a1732e99c68d2baf57042 + public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); - this.lastSeenMessagesValidator = new LastSeenMessagesValidator(); -@@ -3454,6 +3456,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + this.lastSeenMessages = new LastSeenMessagesValidator(20); +@@ -3326,6 +3328,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private static final ResourceLocation CUSTOM_REGISTER = new ResourceLocation("register"); private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister"); @@ -26,7 +26,7 @@ index f6012bf8134f0606710511150dd296a1d677334d..6e7d909bd87a1732e99c68d2baf57042 @Override public void handleCustomPayload(ServerboundCustomPayloadPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); -@@ -3481,6 +3485,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3353,6 +3357,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic try { byte[] data = new byte[packet.data.readableBytes()]; packet.data.readBytes(data); @@ -42,7 +42,7 @@ index f6012bf8134f0606710511150dd296a1d677334d..6e7d909bd87a1732e99c68d2baf57042 this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data); } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); -@@ -3490,6 +3503,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3362,6 +3375,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } @@ -56,10 +56,10 @@ index f6012bf8134f0606710511150dd296a1d677334d..6e7d909bd87a1732e99c68d2baf57042 return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a9ec1f77b7b9e60d735c72a01f0bce32d3083cb9..d06d1bb3c426304aa222721285574368db24368e 100644 +index d9e278d2f7f4bc767c0211736817748d4ca6dae0..60e8e82a1fc255aa713808a78ae2dc73ef0b6be3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2764,6 +2764,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2766,6 +2766,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper end }; diff --git a/patches/unapplied/server/0463-Add-setMaxPlayers-API.patch b/patches/server/0460-Add-setMaxPlayers-API.patch similarity index 76% rename from patches/unapplied/server/0463-Add-setMaxPlayers-API.patch rename to patches/server/0460-Add-setMaxPlayers-API.patch index 8f770a4f2f..9b8ec67dff 100644 --- a/patches/unapplied/server/0463-Add-setMaxPlayers-API.patch +++ b/patches/server/0460-Add-setMaxPlayers-API.patch @@ -5,23 +5,23 @@ Subject: [PATCH] Add #setMaxPlayers API diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 7528491e129b250da5cb505d7befceee8cfe74e6..fcd2f8514e60e1faafec787f162baf98663fb734 100644 +index 62fe8133e10ca4e04670b504bf18db9f5e7512e0..4b2862c6c5397ebec7cc22938b76ed0d24d7125f 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -147,7 +147,7 @@ public abstract class PlayerList { - public final PlayerDataStorage playerIo; +@@ -152,7 +152,7 @@ public abstract class PlayerList { private boolean doWhiteList; - private final RegistryAccess.Frozen registryHolder; + private final LayeredRegistryAccess registries; + private final RegistryAccess.Frozen synchronizedRegistries; - protected final int maxPlayers; + protected int maxPlayers; public final void setMaxPlayers(int maxPlayers) { this.maxPlayers = maxPlayers; } // Paper - remove final and add setter private int viewDistance; private int simulationDistance; private boolean allowCheatsForAllPlayers; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2aab13270af76bcc1b62787e9910d23d5ab56add..50a540f796f4d418ae5f5377b39a08bc3e02543e 100644 +index 0b6f9567aaad080ff2a21be9e17a93d2d24fd010..6e5f72f5d226b94603710d84f9054ce3aa4bd034 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -674,6 +674,13 @@ public final class CraftServer implements Server { +@@ -687,6 +687,13 @@ public final class CraftServer implements Server { return this.playerList.getMaxPlayers(); } diff --git a/patches/unapplied/server/0464-Add-playPickupItemAnimation-to-LivingEntity.patch b/patches/server/0461-Add-playPickupItemAnimation-to-LivingEntity.patch similarity index 100% rename from patches/unapplied/server/0464-Add-playPickupItemAnimation-to-LivingEntity.patch rename to patches/server/0461-Add-playPickupItemAnimation-to-LivingEntity.patch diff --git a/patches/unapplied/server/0465-Don-t-require-FACING-data.patch b/patches/server/0462-Don-t-require-FACING-data.patch similarity index 100% rename from patches/unapplied/server/0465-Don-t-require-FACING-data.patch rename to patches/server/0462-Don-t-require-FACING-data.patch diff --git a/patches/unapplied/server/0466-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0463-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch similarity index 87% rename from patches/unapplied/server/0466-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch rename to patches/server/0463-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index a2d4345443..f46b65ddc4 100644 --- a/patches/unapplied/server/0466-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/patches/server/0463-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 5537903d6e1233489d31127f3af3d99c40258eb4..12534be05aa56930cde39e6fef90d402b5eb7c4e 100644 +index 772512a77f67ef83b99241de930c07a0b8c96c8a..5f5cd9ae01039432c138ff901d7f3462c5a2e491 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1893,6 +1893,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1869,6 +1869,7 @@ public class ServerLevel extends Level implements WorldGenLevel { //ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(new BlockPosition(this.worldData.a(), 0, this.worldData.c())); this.levelData.setSpawn(pos, angle); @@ -17,10 +17,10 @@ index 5537903d6e1233489d31127f3af3d99c40258eb4..12534be05aa56930cde39e6fef90d402 // if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add this.removeTicketsForSpawn(this.paperConfig().spawn.keepSpawnLoadedRange * 16, prevSpawn); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 643b682db12560fc3409ede861a4e0aea8fc5360..ca768eea4f4ad7196f6f595516683b28372de71a 100644 +index d9ac6e687ad7f4c2cfe6698cdf6e7d1d4652eb2b..66d87216a3964c5fd39af564c3b4c40eee278c9a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -263,11 +263,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -262,11 +262,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean setSpawnLocation(int x, int y, int z, float angle) { try { Location previousLocation = this.getSpawnLocation(); diff --git a/patches/unapplied/server/0467-Add-moon-phase-API.patch b/patches/server/0464-Add-moon-phase-API.patch similarity index 83% rename from patches/unapplied/server/0467-Add-moon-phase-API.patch rename to patches/server/0464-Add-moon-phase-API.patch index c400ce80c7..b627090581 100644 --- a/patches/unapplied/server/0467-Add-moon-phase-API.patch +++ b/patches/server/0464-Add-moon-phase-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add moon phase API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index e395628ccf59c1b7a4efcabb3c38e8a879b95e38..ee5e59c37301d9a806e2f696d52d9d217b232833 100644 +index 100d59c37cf699bd33bdf0c3fc085dfe0065b93a..3e4ac4020c9f51e634eadd43243d34267bea4b22 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -@@ -932,4 +932,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor { +@@ -938,4 +938,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor { throw new IllegalArgumentException("Cannot spawn an entity for " + clazz.getName()); } diff --git a/patches/unapplied/server/0468-Prevent-headless-pistons-from-being-created.patch b/patches/server/0465-Prevent-headless-pistons-from-being-created.patch similarity index 92% rename from patches/unapplied/server/0468-Prevent-headless-pistons-from-being-created.patch rename to patches/server/0465-Prevent-headless-pistons-from-being-created.patch index b31a2a9b3a..26079d6aeb 100644 --- a/patches/unapplied/server/0468-Prevent-headless-pistons-from-being-created.patch +++ b/patches/server/0465-Prevent-headless-pistons-from-being-created.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Prevent headless pistons from being created Prevent headless pistons from being created by explosions or tree/mushroom growth. diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index b18b0e1b5e059f08fd3117eaa0fb28a10fac6562..01477e7240f9e33d08d416a7d40ee10f3e5d4abf 100644 +index 7f769f72c847d4894c1cd7a3b09c58f51c392388..446b0e74c406d3d57268d8332ea4c29a4dd5f9eb 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java -@@ -187,6 +187,15 @@ public class Explosion { +@@ -183,6 +183,15 @@ public class Explosion { if (f > 0.0F && this.damageCalculator.shouldBlockExplode(this, this.level, blockposition, iblockdata, f)) { set.add(blockposition); diff --git a/patches/unapplied/server/0469-Add-BellRingEvent.patch b/patches/server/0466-Add-BellRingEvent.patch similarity index 100% rename from patches/unapplied/server/0469-Add-BellRingEvent.patch rename to patches/server/0466-Add-BellRingEvent.patch diff --git a/patches/unapplied/server/0470-Add-zombie-targets-turtle-egg-config.patch b/patches/server/0467-Add-zombie-targets-turtle-egg-config.patch similarity index 86% rename from patches/unapplied/server/0470-Add-zombie-targets-turtle-egg-config.patch rename to patches/server/0467-Add-zombie-targets-turtle-egg-config.patch index 47e5d7f8eb..d315d92cd5 100644 --- a/patches/unapplied/server/0470-Add-zombie-targets-turtle-egg-config.patch +++ b/patches/server/0467-Add-zombie-targets-turtle-egg-config.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add zombie targets turtle egg config diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 473782e8b6a760aec492fa28270a7eb05a484e78..d5633a869819b26376c01d38e08763457e3b7b68 100644 +index 23fe7c324b8faca954dbef1a5703db6a8763edf6..5d295e1d66b57bbecebc5415b3c64cb38c7249d2 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -@@ -107,7 +107,7 @@ public class Zombie extends Monster { +@@ -108,7 +108,7 @@ public class Zombie extends Monster { @Override protected void registerGoals() { diff --git a/patches/unapplied/server/0471-Buffer-joins-to-world.patch b/patches/server/0468-Buffer-joins-to-world.patch similarity index 100% rename from patches/unapplied/server/0471-Buffer-joins-to-world.patch rename to patches/server/0468-Buffer-joins-to-world.patch diff --git a/patches/unapplied/server/0472-Eigencraft-redstone-implementation.patch b/patches/server/0469-Eigencraft-redstone-implementation.patch similarity index 99% rename from patches/unapplied/server/0472-Eigencraft-redstone-implementation.patch rename to patches/server/0469-Eigencraft-redstone-implementation.patch index eb06202d36..5244808a5d 100644 --- a/patches/unapplied/server/0472-Eigencraft-redstone-implementation.patch +++ b/patches/server/0469-Eigencraft-redstone-implementation.patch @@ -986,10 +986,10 @@ index 0000000000000000000000000000000000000000..22a2547810d0c029f29685faddf7ac21 + } +} diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java -index 74241146a034c5817cddc608c095d829d765f06a..3cba4921daad4b346a3f964f0fa48e1bb4d634a3 100644 +index bef1da32111cd86358c434f095e91493fadbeed6..004894157f732046e89f124872da86c79af1676f 100644 --- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java -@@ -253,6 +253,116 @@ public class RedStoneWireBlock extends Block { +@@ -252,6 +252,116 @@ public class RedStoneWireBlock extends Block { return floor.isFaceSturdy(world, pos, Direction.UP) || floor.is(Blocks.HOPPER); } @@ -1106,7 +1106,7 @@ index 74241146a034c5817cddc608c095d829d765f06a..3cba4921daad4b346a3f964f0fa48e1b private void updatePowerStrength(Level world, BlockPos pos, BlockState state) { int i = this.calculateTargetStrength(world, pos); -@@ -322,6 +432,7 @@ public class RedStoneWireBlock extends Block { +@@ -321,6 +431,7 @@ public class RedStoneWireBlock extends Block { return Math.max(i, j - 1); } @@ -1114,7 +1114,7 @@ index 74241146a034c5817cddc608c095d829d765f06a..3cba4921daad4b346a3f964f0fa48e1b private int getWireSignal(BlockState state) { return state.is((Block) this) ? (Integer) state.getValue(RedStoneWireBlock.POWER) : 0; } -@@ -344,7 +455,7 @@ public class RedStoneWireBlock extends Block { +@@ -343,7 +454,7 @@ public class RedStoneWireBlock extends Block { @Override public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { if (!oldState.is(state.getBlock()) && !world.isClientSide) { @@ -1123,7 +1123,7 @@ index 74241146a034c5817cddc608c095d829d765f06a..3cba4921daad4b346a3f964f0fa48e1b Iterator iterator = Direction.Plane.VERTICAL.iterator(); while (iterator.hasNext()) { -@@ -371,7 +482,7 @@ public class RedStoneWireBlock extends Block { +@@ -370,7 +481,7 @@ public class RedStoneWireBlock extends Block { world.updateNeighborsAt(pos.relative(enumdirection), this); } @@ -1132,7 +1132,7 @@ index 74241146a034c5817cddc608c095d829d765f06a..3cba4921daad4b346a3f964f0fa48e1b this.updateNeighborsOfNeighboringWires(world, pos); } } -@@ -406,7 +517,7 @@ public class RedStoneWireBlock extends Block { +@@ -405,7 +516,7 @@ public class RedStoneWireBlock extends Block { public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { if (!world.isClientSide) { if (state.canSurvive(world, pos)) { diff --git a/patches/unapplied/server/0473-Fix-hex-colors-not-working-in-some-kick-messages.patch b/patches/server/0470-Fix-hex-colors-not-working-in-some-kick-messages.patch similarity index 94% rename from patches/unapplied/server/0473-Fix-hex-colors-not-working-in-some-kick-messages.patch rename to patches/server/0470-Fix-hex-colors-not-working-in-some-kick-messages.patch index f25496d6a9..e98bdf2747 100644 --- a/patches/unapplied/server/0473-Fix-hex-colors-not-working-in-some-kick-messages.patch +++ b/patches/server/0470-Fix-hex-colors-not-working-in-some-kick-messages.patch @@ -25,10 +25,10 @@ index 34e4d00ede62be50808a2782e54da987cc62c9af..e12c67bdfa326b3f52f6a4973063cef4 this.connection.send(new ClientboundLoginDisconnectPacket(ichatmutablecomponent)); diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index c3027735725c68eeb1b42a42ebb8646f3a35a518..8eec59b01b8366a0ee8c926d9bf77b22a8d75cb7 100644 +index d92aaec3a4535d3683e842f9a712ba06c03014ef..3042af47778f5d6c878a7a734a8eb92e952c01a8 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -107,7 +107,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -102,7 +102,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, // CraftBukkit start @Deprecated public void disconnect(String s) { diff --git a/patches/unapplied/server/0474-PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/0471-PortalCreateEvent-needs-to-know-its-entity.patch similarity index 90% rename from patches/unapplied/server/0474-PortalCreateEvent-needs-to-know-its-entity.patch rename to patches/server/0471-PortalCreateEvent-needs-to-know-its-entity.patch index 377bf7e435..0dd30afad9 100644 --- a/patches/unapplied/server/0474-PortalCreateEvent-needs-to-know-its-entity.patch +++ b/patches/server/0471-PortalCreateEvent-needs-to-know-its-entity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PortalCreateEvent needs to know its entity diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 85dead69d41ca10ad76fdab13da8548d359142b0..0bd7b64bd1c468221d3354494527b456bc02437a 100644 +index 36107f22914ec47212e41c17852fb486c67e5c52..40e2fc6746b3a243c82d6100578ad510b193faa0 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -431,7 +431,7 @@ public final class ItemStack { +@@ -439,7 +439,7 @@ public final class ItemStack { net.minecraft.world.level.block.state.BlockState block = world.getBlockState(newblockposition); if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically @@ -52,7 +52,7 @@ index 378d4316a51d48cb84e2d8a553f7b28bae55630e..922b5b22a4ccfeead9d6d2b9a2a2b3cc } diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index 8d79612cdba48756bb0352c41b98f8a9ea489ff6..f17233ea94d61af41b4db1696b114e9c721466f8 100644 +index 68be050e5187d372a65290c01c69f3582053f7a1..cfddfcad9b09970b28dccd2dcd80be2c2dbed0e7 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java @@ -12,6 +12,7 @@ import net.minecraft.core.Direction; @@ -79,10 +79,10 @@ index 8d79612cdba48756bb0352c41b98f8a9ea489ff6..f17233ea94d61af41b4db1696b114e9c private static int getFireTickDelay(RandomSource random) { diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index b2ab7749e3ddf124d5ef97271a76dc875a650771..97b0e820d353e8ab4ca9d9e2efd0a8819119b2ab 100644 +index 6a549229037c8b8c2093feb563780ef8565d709f..efbcd2b78d75481793e0f29a7431d3eb76489abc 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -35,6 +35,7 @@ import net.minecraft.world.item.DyeColor; +@@ -39,6 +39,7 @@ import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; @@ -90,7 +90,7 @@ index b2ab7749e3ddf124d5ef97271a76dc875a650771..97b0e820d353e8ab4ca9d9e2efd0a881 import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.EmptyBlockGetter; import net.minecraft.world.level.Level; -@@ -136,6 +137,12 @@ public abstract class BlockBehaviour { +@@ -142,6 +143,12 @@ public abstract class BlockBehaviour implements FeatureElement { DebugPackets.sendNeighborsUpdatePacket(world, pos); } @@ -104,18 +104,18 @@ index b2ab7749e3ddf124d5ef97271a76dc875a650771..97b0e820d353e8ab4ca9d9e2efd0a881 @Deprecated public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/src/main/java/net/minecraft/world/level/portal/PortalShape.java -index 4d9023d1baa06802ab97af4be2739c13dee4f9b9..0ef049f0fac81312bee4f0e0c14dc3e74b09d272 100644 +index bc0dfa8efe0b2a891c000e750f436db632607ada..c461e0d04047db9c0c5ecc04063cebd38bf96ec2 100644 --- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java -@@ -10,6 +10,7 @@ import net.minecraft.server.level.ServerLevel; - import net.minecraft.tags.BlockTags; +@@ -11,6 +11,7 @@ import net.minecraft.tags.BlockTags; import net.minecraft.util.Mth; + import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityDimensions; +import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.NetherPortalBlock; -@@ -184,7 +185,10 @@ public class PortalShape { +@@ -190,7 +191,10 @@ public class PortalShape { } // CraftBukkit start - return boolean @@ -127,7 +127,7 @@ index 4d9023d1baa06802ab97af4be2739c13dee4f9b9..0ef049f0fac81312bee4f0e0c14dc3e7 org.bukkit.World bworld = this.level.getMinecraftWorld().getWorld(); // Copy below for loop -@@ -194,7 +198,7 @@ public class PortalShape { +@@ -200,7 +204,7 @@ public class PortalShape { this.blocks.setBlock(blockposition, iblockdata, 18); }); diff --git a/patches/unapplied/server/0475-Fix-CraftTeam-null-check.patch b/patches/server/0472-Fix-CraftTeam-null-check.patch similarity index 100% rename from patches/unapplied/server/0475-Fix-CraftTeam-null-check.patch rename to patches/server/0472-Fix-CraftTeam-null-check.patch diff --git a/patches/unapplied/server/0476-Add-more-Evoker-API.patch b/patches/server/0473-Add-more-Evoker-API.patch similarity index 100% rename from patches/unapplied/server/0476-Add-more-Evoker-API.patch rename to patches/server/0473-Add-more-Evoker-API.patch diff --git a/patches/unapplied/server/0477-Add-methods-to-get-translation-keys.patch b/patches/server/0474-Add-methods-to-get-translation-keys.patch similarity index 95% rename from patches/unapplied/server/0477-Add-methods-to-get-translation-keys.patch rename to patches/server/0474-Add-methods-to-get-translation-keys.patch index 7b0740446b..6cf8e62f1c 100644 --- a/patches/unapplied/server/0477-Add-methods-to-get-translation-keys.patch +++ b/patches/server/0474-Add-methods-to-get-translation-keys.patch @@ -10,10 +10,10 @@ public org.bukkit.craftbukkit.inventory.CraftMetaFirework getNBT(Lorg/bukkit/Fir Co-authored-by: MeFisto94 diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index ea3358905dcd39a1a855d98570457c65dcd7513d..396fb96abed1e77893d8ee8a15cff18cad804475 100644 +index 7e97b09376b1e9000511f56f3406dba550ba2612..89b8abc3e7e946aae2ab3d2c870f2d2c95f9671d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -668,5 +668,15 @@ public class CraftBlock implements Block { +@@ -670,5 +670,15 @@ public class CraftBlock implements Block { public org.bukkit.SoundGroup getBlockSoundGroup() { return org.bukkit.craftbukkit.CraftSoundGroup.getSoundGroup(this.getNMS().getSoundType()); } @@ -30,7 +30,7 @@ index ea3358905dcd39a1a855d98570457c65dcd7513d..396fb96abed1e77893d8ee8a15cff18c // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index a859a675b4bc543e139358223cc92ad5eee3ddb5..31a22f26070059e5379730c1940ff1c5fb109be1 100644 +index e8334e2264510f5101e80b4f130e7ae1442560d7..57decf4156f176ebcc988478c17856cbc555c5e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java @@ -194,6 +194,11 @@ public class CraftEnchantment extends Enchantment { @@ -46,10 +46,10 @@ index a859a675b4bc543e139358223cc92ad5eee3ddb5..31a22f26070059e5379730c1940ff1c5 public net.minecraft.world.item.enchantment.Enchantment getHandle() { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index b38b2b3855583b26d7ed2ede041a73cf14cbe81c..8b0090ba3359c68aa98c0cf74e0dc0b3e9143577 100644 +index cb7fd05f498448c87525eeeb012d055f90bac05e..30fe764640c8dad4b0f28486d00aa58a17bc7452 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -483,6 +483,30 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -481,6 +481,30 @@ public final class CraftMagicNumbers implements UnsafeValues { Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!"); return compound; } diff --git a/patches/unapplied/server/0478-Create-HoverEvent-from-ItemStack-Entity.patch b/patches/server/0475-Create-HoverEvent-from-ItemStack-Entity.patch similarity index 94% rename from patches/unapplied/server/0478-Create-HoverEvent-from-ItemStack-Entity.patch rename to patches/server/0475-Create-HoverEvent-from-ItemStack-Entity.patch index 238466b430..39dfe775bc 100644 --- a/patches/unapplied/server/0478-Create-HoverEvent-from-ItemStack-Entity.patch +++ b/patches/server/0475-Create-HoverEvent-from-ItemStack-Entity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Create HoverEvent from ItemStack Entity diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index f05923a6292f02a01791627abce2770daff24b6a..f3a6a4d97b5be2e75c438a6f7010a8f588afe86c 100644 +index 6cdce121f1f04e2ca23cdbdf0844aa118be5dec8..b7a53edbf6c4730ae65a8e5fb414feaef9bdf1b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -405,5 +405,40 @@ public final class CraftItemFactory implements ItemFactory { +@@ -430,5 +430,40 @@ public final class CraftItemFactory implements ItemFactory { return nms != null ? net.minecraft.locale.Language.getInstance().getOrDefault(nms.getItem().getDescriptionId(nms)) : null; } diff --git a/patches/unapplied/server/0479-Cache-block-data-strings.patch b/patches/server/0476-Cache-block-data-strings.patch similarity index 90% rename from patches/unapplied/server/0479-Cache-block-data-strings.patch rename to patches/server/0476-Cache-block-data-strings.patch index 9602336b1d..cf4a528f8e 100644 --- a/patches/unapplied/server/0479-Cache-block-data-strings.patch +++ b/patches/server/0476-Cache-block-data-strings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e42b12839faab0c040495b00368b107b35b93283..83a9c7f8a92055da43854d16fffe6892beff8c6b 100644 +index 8e101269ca2edf5f3cc9c1ccedd03afaf1392d19..8ce413404930cca3a470bb58d73b9bd0c9a9c2d2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2026,6 +2026,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop%s", nms, bukkit); } diff --git a/patches/unapplied/server/0480-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/0477-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch similarity index 86% rename from patches/unapplied/server/0480-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch rename to patches/server/0477-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch index b6308e9346..34c83075e6 100644 --- a/patches/unapplied/server/0480-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch +++ b/patches/server/0477-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch @@ -9,10 +9,10 @@ as this is how Vanilla teleports entities. Cancel any pending motion when teleported. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6e7d909bd87a1732e99c68d2baf57042d7e930fe..434dc5ab5f02e66918f150c2db1d3cd35d58eece 100644 +index 8eeb521b11062ecc699813c2132f7edf655d8d09..1909cc53765a38bdb31237b18f27d7e457115726 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -760,7 +760,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -752,7 +752,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; } @@ -21,7 +21,7 @@ index 6e7d909bd87a1732e99c68d2baf57042d7e930fe..434dc5ab5f02e66918f150c2db1d3cd3 this.lastGoodX = this.awaitingPositionFromClient.x; this.lastGoodY = this.awaitingPositionFromClient.y; this.lastGoodZ = this.awaitingPositionFromClient.z; -@@ -1676,7 +1676,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1669,7 +1669,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // CraftBukkit end this.awaitingTeleportTime = this.tickCount; @@ -31,7 +31,7 @@ index 6e7d909bd87a1732e99c68d2baf57042d7e930fe..434dc5ab5f02e66918f150c2db1d3cd3 } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 1582da75f92aed598c1c076af7b94af7ab48d10a..5a43e57d2e2146d324685808cfe980178bde03a2 100644 +index 09b2b6633b108739e8fe6d4c400d42d88b27435e..ff65d3125da3d2716cccac24317e40d0e54f405c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -158,6 +158,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -42,7 +42,7 @@ index 1582da75f92aed598c1c076af7b94af7ab48d10a..5a43e57d2e2146d324685808cfe98017 static boolean isLevelAtLeast(CompoundTag tag, int level) { return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } -@@ -1716,6 +1717,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1731,6 +1732,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public void moveTo(double x, double y, double z, float yaw, float pitch) { @@ -57,10 +57,10 @@ index 1582da75f92aed598c1c076af7b94af7ab48d10a..5a43e57d2e2146d324685808cfe98017 this.setYRot(yaw); this.setXRot(pitch); diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 2e28bbd75c689ab5a004f0a2de4a89cde7a807ec..572982353530663825ab2d576c3277197a5715a3 100644 +index c58cd26ac15308d249f7d50fed530a6093091d36..b53fc8ca05fb44e6cb7ab6b27b8371b56795fe98 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -163,6 +163,7 @@ public abstract class BaseSpawner { +@@ -167,6 +167,7 @@ public abstract class BaseSpawner { return; } @@ -69,10 +69,10 @@ index 2e28bbd75c689ab5a004f0a2de4a89cde7a807ec..572982353530663825ab2d576c327719 if (entity instanceof Mob) { Mob entityinsentient = (Mob) entity; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index ceb7123362ba85df825a50c035a399174b6634dc..52ccc5cb9c5512b30ce863062de85219adb801ae 100644 +index 6cc448268f786b06529f5488fa3153f6c8cc8fdf..7dc79a3875388c48dda40b7e28331c6d0a7b3fc5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -561,7 +561,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -563,7 +563,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } // entity.setLocation() throws no event, and so cannot be cancelled diff --git a/patches/unapplied/server/0481-Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/0478-Add-additional-open-container-api-to-HumanEntity.patch similarity index 100% rename from patches/unapplied/server/0481-Add-additional-open-container-api-to-HumanEntity.patch rename to patches/server/0478-Add-additional-open-container-api-to-HumanEntity.patch diff --git a/patches/unapplied/server/0482-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch b/patches/server/0479-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch similarity index 100% rename from patches/unapplied/server/0482-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch rename to patches/server/0479-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch diff --git a/patches/unapplied/server/0483-Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/0480-Extend-block-drop-capture-to-capture-all-items-added.patch similarity index 91% rename from patches/unapplied/server/0483-Extend-block-drop-capture-to-capture-all-items-added.patch rename to patches/server/0480-Extend-block-drop-capture-to-capture-all-items-added.patch index 23e7d37604..cf298f6a01 100644 --- a/patches/unapplied/server/0483-Extend-block-drop-capture-to-capture-all-items-added.patch +++ b/patches/server/0480-Extend-block-drop-capture-to-capture-all-items-added.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 12534be05aa56930cde39e6fef90d402b5eb7c4e..894d49d505b43b48013b7b404056a4bfe65b09c8 100644 +index 5f5cd9ae01039432c138ff901d7f3462c5a2e491..145ccb0b4ae02fc4fd32552570315a8356bc3141 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1330,6 +1330,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1370,6 +1370,12 @@ public class ServerLevel extends Level implements WorldGenLevel { // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit return false; } else { @@ -23,7 +23,7 @@ index 12534be05aa56930cde39e6fef90d402b5eb7c4e..894d49d505b43b48013b7b404056a4bf if (spawnReason != null && !CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) { return false; diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 431ff490760f54be76847c7b370dbbb4b65de102..1b45c1483a7ebad47162483b51036f9dfcdf62f6 100644 +index a98254e38076e82f94db7b2f2112500eaadd52d1..b0096fe5399397d4c5e170daa892aef017108c2f 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -428,10 +428,12 @@ public class ServerPlayerGameMode { diff --git a/patches/unapplied/server/0484-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0481-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 81% rename from patches/unapplied/server/0484-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to patches/server/0481-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index 6e3cfc1242..e1c52f35e7 100644 --- a/patches/unapplied/server/0484-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/server/0481-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 5a43e57d2e2146d324685808cfe980178bde03a2..c99798ea88f7f6dd6db6c80666171e759bf47cc0 100644 +index ff65d3125da3d2716cccac24317e40d0e54f405c..d2f5a1591e360b4af4613f4e3d3635894bd50ee3 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4162,4 +4162,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4212,4 +4212,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { void accept(Entity entity, double x, double y, double z); } @@ -21,10 +21,10 @@ index 5a43e57d2e2146d324685808cfe980178bde03a2..c99798ea88f7f6dd6db6c80666171e75 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 8b0090ba3359c68aa98c0cf74e0dc0b3e9143577..78ea9d70d44cbf2a51172c5cd394c9ff17981961 100644 +index 30fe764640c8dad4b0f28486d00aa58a17bc7452..31960587fff298e1b50c8216e47db9a0aa053b29 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -507,6 +507,10 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -505,6 +505,10 @@ public final class CraftMagicNumbers implements UnsafeValues { net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack); return nmsItemStack.getItem().getDescriptionId(nmsItemStack); } diff --git a/patches/unapplied/server/0485-Lazily-track-plugin-scoreboards-by-default.patch b/patches/server/0482-Lazily-track-plugin-scoreboards-by-default.patch similarity index 100% rename from patches/unapplied/server/0485-Lazily-track-plugin-scoreboards-by-default.patch rename to patches/server/0482-Lazily-track-plugin-scoreboards-by-default.patch diff --git a/patches/unapplied/server/0486-Entity-isTicking.patch b/patches/server/0483-Entity-isTicking.patch similarity index 79% rename from patches/unapplied/server/0486-Entity-isTicking.patch rename to patches/server/0483-Entity-isTicking.patch index a6c62cfaaf..d3601e5bb8 100644 --- a/patches/unapplied/server/0486-Entity-isTicking.patch +++ b/patches/server/0483-Entity-isTicking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c99798ea88f7f6dd6db6c80666171e759bf47cc0..9b1ee67e9963f31c107f5bc310f6840d58906477 100644 +index d2f5a1591e360b4af4613f4e3d3635894bd50ee3..13ed0e5290e0685d7b310b0d591010aeac207427 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4167,5 +4167,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4217,5 +4217,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public static int nextEntityId() { return ENTITY_COUNTER.incrementAndGet(); } @@ -19,10 +19,10 @@ index c99798ea88f7f6dd6db6c80666171e759bf47cc0..9b1ee67e9963f31c107f5bc310f6840d // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 52ccc5cb9c5512b30ce863062de85219adb801ae..0988da3d82b9f13d36ccb73f282d36bf6d1f0284 100644 +index 7dc79a3875388c48dda40b7e28331c6d0a7b3fc5..e44792ecc68a948fae8394d97cd50e3da8d78c0d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1306,5 +1306,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1308,5 +1308,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public boolean isInLava() { return getHandle().isInLava(); } diff --git a/patches/unapplied/server/0487-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/patches/server/0484-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch similarity index 90% rename from patches/unapplied/server/0487-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch rename to patches/server/0484-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch index 194bd602ce..7a3bfe4d6a 100644 --- a/patches/unapplied/server/0487-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch +++ b/patches/server/0484-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 83a9c7f8a92055da43854d16fffe6892beff8c6b..8a984036862c259b9b5b03665df3d78f8c965c19 100644 +index 8ce413404930cca3a470bb58d73b9bd0c9a9c2d2..f445f6d382c8fe3def980ed3f8517bbf3b75dfed 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2092,13 +2092,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop extends Behavior { +@@ -17,7 +17,7 @@ public class GateBehavior implements BehaviorControl private final Set> exitErasedMemories; private final GateBehavior.OrderPolicy orderPolicy; private final GateBehavior.RunningPolicy runningPolicy; -- private final ShufflingList> behaviors = new ShufflingList<>(); -+ private final ShufflingList> behaviors = new ShufflingList<>(false); // Paper - don't use a clone +- private final ShufflingList> behaviors = new ShufflingList<>(); ++ private final ShufflingList> behaviors = new ShufflingList<>(false); // Paper - don't use a clone + private Behavior.Status status = Behavior.Status.STOPPED; - public GateBehavior(Map, MemoryStatus> requiredMemoryState, Set> memoriesToForgetWhenStopped, GateBehavior.OrderPolicy order, GateBehavior.RunningPolicy runMode, List, Integer>> tasks) { - super(requiredMemoryState); + public GateBehavior(Map, MemoryStatus> requiredMemoryState, Set> memoriesToForgetWhenStopped, GateBehavior.OrderPolicy order, GateBehavior.RunningPolicy runMode, List, Integer>> tasks) { diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java -index 2af08836c60ddf0e1df7c53316eae6e329b5747f..090bba46b6ecd7d0e1415feb678b9b23264fe5e9 100644 +index 9fb20cd00568aeea25284ea0e80fe52cb1c3eede..731ef21dbbd25d6924717de42f4569a9b5935643 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java -@@ -14,12 +14,25 @@ import net.minecraft.util.RandomSource; - public class ShufflingList { +@@ -16,12 +16,25 @@ import net.minecraft.util.RandomSource; + public class ShufflingList implements Iterable { protected final List> entries; private final RandomSource random = RandomSource.create(); + private final boolean isUnsafe; // Paper @@ -49,7 +49,7 @@ index 2af08836c60ddf0e1df7c53316eae6e329b5747f..090bba46b6ecd7d0e1415feb678b9b23 this.entries = Lists.newArrayList(list); } -@@ -35,11 +48,12 @@ public class ShufflingList { +@@ -37,11 +50,12 @@ public class ShufflingList implements Iterable { } public ShufflingList shuffle() { diff --git a/patches/unapplied/server/0489-Reset-Ender-Crystals-on-Dragon-Spawn.patch b/patches/server/0486-Reset-Ender-Crystals-on-Dragon-Spawn.patch similarity index 65% rename from patches/unapplied/server/0489-Reset-Ender-Crystals-on-Dragon-Spawn.patch rename to patches/server/0486-Reset-Ender-Crystals-on-Dragon-Spawn.patch index 31cde5ee93..8040656b2c 100644 --- a/patches/unapplied/server/0489-Reset-Ender-Crystals-on-Dragon-Spawn.patch +++ b/patches/server/0486-Reset-Ender-Crystals-on-Dragon-Spawn.patch @@ -11,14 +11,14 @@ This ensures the crystals/pillars are in expected state when the dragon spawns. See #3522 diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index 908cc3e2fc2cf4894a10081192a8b0d3c7e99932..f32906729baf83d8b53d64ab750cddcc413a2927 100644 +index fd57b5a4cf8906b7bfb7c8c4f57c7b057296c8a3..9ed33e7ebb64ec74be2d2e38a35612786408adff 100644 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -@@ -409,6 +409,7 @@ public class EndDragonFight { - enderDragon.moveTo(0.0D, 128.0D, 0.0D, this.level.random.nextFloat() * 360.0F, 0.0F); - this.level.addFreshEntity(enderDragon); - this.dragonUUID = enderDragon.getUUID(); -+ this.resetSpikeCrystals(); // Paper - return enderDragon; - } +@@ -417,6 +417,7 @@ public class EndDragonFight { + enderDragon.moveTo(0.0D, 128.0D, 0.0D, this.level.random.nextFloat() * 360.0F, 0.0F); + this.level.addFreshEntity(enderDragon); + this.dragonUUID = enderDragon.getUUID(); ++ this.resetSpikeCrystals(); // Paper + } + return enderDragon; diff --git a/patches/unapplied/server/0490-Fix-for-large-move-vectors-crashing-server.patch b/patches/server/0487-Fix-for-large-move-vectors-crashing-server.patch similarity index 93% rename from patches/unapplied/server/0490-Fix-for-large-move-vectors-crashing-server.patch rename to patches/server/0487-Fix-for-large-move-vectors-crashing-server.patch index 48aaeeea92..c59b5528ae 100644 --- a/patches/unapplied/server/0490-Fix-for-large-move-vectors-crashing-server.patch +++ b/patches/server/0487-Fix-for-large-move-vectors-crashing-server.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix for large move vectors crashing server Check movement distance also based on current position. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 434dc5ab5f02e66918f150c2db1d3cd35d58eece..3387fdf7e7345827dae63815de19b38a79f8ed4f 100644 +index 1909cc53765a38bdb31237b18f27d7e457115726..191aa9cd6e27cbc322b8ce2aa6ad07c20660e709 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -575,9 +575,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -567,9 +567,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) { ServerLevel worldserver = this.player.getLevel(); @@ -22,7 +22,7 @@ index 434dc5ab5f02e66918f150c2db1d3cd35d58eece..3387fdf7e7345827dae63815de19b38a double d3 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX()); final double toX = d3; // Paper - OBFHELPER double d4 = ServerGamePacketListenerImpl.clampVertical(packet.getY()); final double toY = d4; // Paper - OBFHELPER double d5 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ()); final double toZ = d5; // Paper - OBFHELPER -@@ -587,8 +587,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -579,8 +579,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic double d7 = d4 - this.vehicleFirstGoodY; double d8 = d5 - this.vehicleFirstGoodZ; double d9 = entity.getDeltaMovement().lengthSqr(); @@ -44,7 +44,7 @@ index 434dc5ab5f02e66918f150c2db1d3cd35d58eece..3387fdf7e7345827dae63815de19b38a // CraftBukkit start - handle custom speeds and skipped ticks this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick; -@@ -634,9 +645,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -626,9 +637,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag = worldserver.noCollision(entity, entity.getBoundingBox().deflate(0.0625D)); @@ -57,7 +57,7 @@ index 434dc5ab5f02e66918f150c2db1d3cd35d58eece..3387fdf7e7345827dae63815de19b38a boolean flag1 = entity.verticalCollisionBelow; entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8)); -@@ -1356,7 +1367,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1348,7 +1359,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic double d8 = d1 - this.firstGoodY; double d9 = d2 - this.firstGoodZ; double d10 = this.player.getDeltaMovement().lengthSqr(); @@ -77,7 +77,7 @@ index 434dc5ab5f02e66918f150c2db1d3cd35d58eece..3387fdf7e7345827dae63815de19b38a if (this.player.isSleeping()) { if (d11 > 1.0D) { -@@ -1408,9 +1430,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1400,9 +1422,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic AABB axisalignedbb = this.player.getBoundingBox(); diff --git a/patches/unapplied/server/0491-Optimise-getType-calls.patch b/patches/server/0488-Optimise-getType-calls.patch similarity index 90% rename from patches/unapplied/server/0491-Optimise-getType-calls.patch rename to patches/server/0488-Optimise-getType-calls.patch index 9d9946c038..295d1d6ac1 100644 --- a/patches/unapplied/server/0491-Optimise-getType-calls.patch +++ b/patches/server/0488-Optimise-getType-calls.patch @@ -6,12 +6,12 @@ Subject: [PATCH] Optimise getType calls Remove the map lookup for converting from Block->Bukkit Material diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockState.java b/src/main/java/net/minecraft/world/level/block/state/BlockState.java -index 76133c77e8ebce7c9e5402e3e7cd50b30aa1c2e0..348a91a760bd728f8e732e1a35c86ab75d8fc0f1 100644 +index da878e180c6b94f98dc82c6e8395f63ecc9b2c1e..a9b0f5950b6f97ea4c2a1075946b92008b62c9d9 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockState.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockState.java @@ -10,6 +10,17 @@ import net.minecraft.world.level.block.state.properties.Property; public class BlockState extends BlockBehaviour.BlockStateBase { - public static final Codec CODEC = codec(Registry.BLOCK.byNameCodec(), Block::defaultBlockState).stable(); + public static final Codec CODEC = codec(BuiltInRegistries.BLOCK.byNameCodec(), Block::defaultBlockState).stable(); + // Paper start - optimise getType calls + org.bukkit.Material cachedMaterial; @@ -41,10 +41,10 @@ index 0511ac55c4e6d9736ec12e94c9899eb04d5cd2e3..75193684a71d694736087d1a368b8fb6 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 396fb96abed1e77893d8ee8a15cff18cad804475..2c1efaecf220588d8b74946194bf340871e57004 100644 +index 89b8abc3e7e946aae2ab3d2c870f2d2c95f9671d..6d9cddb20a069cada6d20e5f61a2ca2ab2c308a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -224,7 +224,7 @@ public class CraftBlock implements Block { +@@ -226,7 +226,7 @@ public class CraftBlock implements Block { @Override public Material getType() { @@ -67,7 +67,7 @@ index 0a755f38fae9dc84440f43113920c5b4c6d8218b..7b9e943b391c061782fccd2b8d705cee public void setFlag(int flag) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index d02a5e383190fc4713141d953efc111bb2f7f89c..aae7f7ab4931db8f955c3055157fe01f99931ec7 100644 +index 76efbcb951b133246bd9cbd8808f900f958d9298..14fd37f4bdb9b0b7f28abfccffe682f6fdc6339e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -50,7 +50,7 @@ public class CraftBlockData implements BlockData { diff --git a/patches/unapplied/server/0492-Villager-resetOffers.patch b/patches/server/0489-Villager-resetOffers.patch similarity index 94% rename from patches/unapplied/server/0492-Villager-resetOffers.patch rename to patches/server/0489-Villager-resetOffers.patch index 7448270230..1baf0aa539 100644 --- a/patches/unapplied/server/0492-Villager-resetOffers.patch +++ b/patches/server/0489-Villager-resetOffers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Villager#resetOffers diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java -index 9960862cb5302aa44776ac294e3b9e30105adb07..6717e3d116b7bff8ab4d7b45f8c4ec00939c9c73 100644 +index 8fbed2f8f867c67a6922b31f7394258253de86e7..49bc867f189b0d4c236a47670676cc67920c2cd7 100644 --- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java @@ -115,6 +115,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa diff --git a/patches/unapplied/server/0494-Retain-block-place-order-when-capturing-blockstates.patch b/patches/server/0490-Retain-block-place-order-when-capturing-blockstates.patch similarity index 89% rename from patches/unapplied/server/0494-Retain-block-place-order-when-capturing-blockstates.patch rename to patches/server/0490-Retain-block-place-order-when-capturing-blockstates.patch index 1f80e72f9b..6feaf781ba 100644 --- a/patches/unapplied/server/0494-Retain-block-place-order-when-capturing-blockstates.patch +++ b/patches/server/0490-Retain-block-place-order-when-capturing-blockstates.patch @@ -10,10 +10,10 @@ In general, look at making this logic more robust (i.e properly handling cases where a captured entry is overriden) - but for now this will do. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index e58f576c1bd7a3b1f3d57ed384bbdbc13248147b..c00a7913274ff246c33a9894b680955427948f45 100644 +index 44f0325e8762e1bc528ab22d56a71322dbc84bd6..7ed5f86f66b49d33952b2cb3dd5ea438284fcbd4 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -155,7 +155,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -154,7 +154,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; public Map capturedBlockStates = new java.util.LinkedHashMap<>(); // Paper diff --git a/patches/unapplied/server/0495-Reduce-blockpos-allocation-from-pathfinding.patch b/patches/server/0491-Reduce-blockpos-allocation-from-pathfinding.patch similarity index 86% rename from patches/unapplied/server/0495-Reduce-blockpos-allocation-from-pathfinding.patch rename to patches/server/0491-Reduce-blockpos-allocation-from-pathfinding.patch index a6a02f3817..6bcb9d1f7f 100644 --- a/patches/unapplied/server/0495-Reduce-blockpos-allocation-from-pathfinding.patch +++ b/patches/server/0491-Reduce-blockpos-allocation-from-pathfinding.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reduce blockpos allocation from pathfinding diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -index c48e097464977dbec22d1370c3393ba1fe105137..ede91a2fbe67480d2b6bcdeb776f87da0b69bdae 100644 +index 04406fdb2961a85d8e6bffbb8e233e8c4dcf4390..894881018c659d874f28f5744f0b8247cfecb1c1 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -@@ -495,7 +495,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { +@@ -483,7 +483,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { return BlockPathTypes.DANGER_FIRE; } @@ -17,7 +17,7 @@ index c48e097464977dbec22d1370c3393ba1fe105137..ede91a2fbe67480d2b6bcdeb776f87da return BlockPathTypes.WATER_BORDER; } } // Paper -@@ -526,7 +526,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { +@@ -514,7 +514,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { } else if (blockState.is(Blocks.COCOA)) { return BlockPathTypes.COCOA; } else { diff --git a/patches/unapplied/server/0496-Fix-item-locations-dropped-from-campfires.patch b/patches/server/0492-Fix-item-locations-dropped-from-campfires.patch similarity index 62% rename from patches/unapplied/server/0496-Fix-item-locations-dropped-from-campfires.patch rename to patches/server/0492-Fix-item-locations-dropped-from-campfires.patch index df944d4a66..ec0156c522 100644 --- a/patches/unapplied/server/0496-Fix-item-locations-dropped-from-campfires.patch +++ b/patches/server/0492-Fix-item-locations-dropped-from-campfires.patch @@ -6,19 +6,19 @@ Subject: [PATCH] Fix item locations dropped from campfires Fixes #4259 by not flooring the blockposition among other weirdness diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java -index 0cebba557f0ba312e7911e61cb21485c81436720..003a66064c666db974c2b36f6579a87e1ad28685 100644 +index 9ef6b391268a99303aa853623d43c96073a13c9e..c6ae14009463b2d64acd4d3beb86d3233bcbae66 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java -@@ -78,7 +78,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { - result = blockCookEvent.getResult(); - itemstack1 = CraftItemStack.asNMSCopy(result); - // CraftBukkit end -- Containers.dropItemStack(world, (double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), itemstack1); +@@ -79,7 +79,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { + result = blockCookEvent.getResult(); + itemstack1 = CraftItemStack.asNMSCopy(result); + // CraftBukkit end +- Containers.dropItemStack(world, (double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), itemstack1); + // Paper start + net.minecraft.world.entity.item.ItemEntity droppedItem = new net.minecraft.world.entity.item.ItemEntity(world, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, itemstack1.split(world.random.nextInt(21) + 10)); + droppedItem.setDeltaMovement(world.random.nextGaussian() * 0.05D, world.random.nextGaussian() * 0.05D + 0.2D, world.random.nextGaussian() * 0.05D); + world.addFreshEntity(droppedItem); + // Paper end - campfire.items.set(i, ItemStack.EMPTY); - world.sendBlockUpdated(pos, state, state, 3); - world.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(state)); + campfire.items.set(i, ItemStack.EMPTY); + world.sendBlockUpdated(pos, state, state, 3); + world.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(state)); diff --git a/patches/unapplied/server/0497-Player-elytra-boost-API.patch b/patches/server/0493-Player-elytra-boost-API.patch similarity index 90% rename from patches/unapplied/server/0497-Player-elytra-boost-API.patch rename to patches/server/0493-Player-elytra-boost-API.patch index 03f8a6d9ca..20d00ae184 100644 --- a/patches/unapplied/server/0497-Player-elytra-boost-API.patch +++ b/patches/server/0493-Player-elytra-boost-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d06d1bb3c426304aa222721285574368db24368e..34868d08ea4d17c63e9fdac2701d08269f39c115 100644 +index 60e8e82a1fc255aa713808a78ae2dc73ef0b6be3..a84efd5f91141ab9b3879dbb325bc918d88a93e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -637,6 +637,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -639,6 +639,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } throw new RuntimeException("Unknown settings type"); } diff --git a/patches/unapplied/server/0498-Fixed-TileEntityBell-memory-leak.patch b/patches/server/0494-Fixed-TileEntityBell-memory-leak.patch similarity index 100% rename from patches/unapplied/server/0498-Fixed-TileEntityBell-memory-leak.patch rename to patches/server/0494-Fixed-TileEntityBell-memory-leak.patch diff --git a/patches/unapplied/server/0499-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch b/patches/server/0495-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch similarity index 93% rename from patches/unapplied/server/0499-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch rename to patches/server/0495-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch index f48528d0b5..fa266bb273 100644 --- a/patches/unapplied/server/0499-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch +++ b/patches/server/0495-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch @@ -8,10 +8,10 @@ This can realistically only happen if there's custom loot active on fishing which can return 0 items. This would disconnect the player who's fishing. 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 11ac510ad4095438d4904d521bfb18aa5f743faf..f5886a88fd98ede5e85a91eccccb05ac33eb40e2 100644 +index ff7b5fea13be9a64e5886f8fe337802cbc5d19b2..7f3a7a769afec8449547c26453112064b9bcb04a 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -@@ -494,9 +494,15 @@ public class FishingHook extends Projectile { +@@ -495,9 +495,15 @@ public class FishingHook extends Projectile { while (iterator.hasNext()) { ItemStack itemstack1 = (ItemStack) iterator.next(); @@ -29,7 +29,7 @@ index 11ac510ad4095438d4904d521bfb18aa5f743faf..f5886a88fd98ede5e85a91eccccb05ac playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1); this.level.getCraftServer().getPluginManager().callEvent(playerFishEvent); -@@ -509,8 +515,12 @@ public class FishingHook extends Projectile { +@@ -510,8 +516,12 @@ public class FishingHook extends Projectile { double d2 = entityhuman.getZ() - this.getZ(); double d3 = 0.1D; diff --git a/patches/unapplied/server/0500-Add-getOfflinePlayerIfCached-String.patch b/patches/server/0496-Add-getOfflinePlayerIfCached-String.patch similarity index 88% rename from patches/unapplied/server/0500-Add-getOfflinePlayerIfCached-String.patch rename to patches/server/0496-Add-getOfflinePlayerIfCached-String.patch index 9095c21d9b..81f0e94d9a 100644 --- a/patches/unapplied/server/0500-Add-getOfflinePlayerIfCached-String.patch +++ b/patches/server/0496-Add-getOfflinePlayerIfCached-String.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 50a540f796f4d418ae5f5377b39a08bc3e02543e..462ffe647b11185001a08b09e74773b8831a3b46 100644 +index 6e5f72f5d226b94603710d84f9054ce3aa4bd034..81120251dc65290a731e25662bf484637f546ac1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1803,6 +1803,28 @@ public final class CraftServer implements Server { +@@ -1827,6 +1827,28 @@ public final class CraftServer implements Server { return result; } diff --git a/patches/unapplied/server/0501-Add-ignore-discounts-API.patch b/patches/server/0497-Add-ignore-discounts-API.patch similarity index 99% rename from patches/unapplied/server/0501-Add-ignore-discounts-API.patch rename to patches/server/0497-Add-ignore-discounts-API.patch index b1916987d7..e4351b81e5 100644 --- a/patches/unapplied/server/0501-Add-ignore-discounts-API.patch +++ b/patches/server/0497-Add-ignore-discounts-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add ignore discounts API diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index 39fc94b1e1555fd6706391223dd2783139b16016..1d2b7950e3c498945a2ff85fda0e3bb30acd22cb 100644 +index 214c7947705eda61454b70cbc4bf37bc54dd26e8..e3db573f10b7a3f8f605a11dc886859c68168467 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java @@ -489,6 +489,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler diff --git a/patches/unapplied/server/0502-Toggle-for-removing-existing-dragon.patch b/patches/server/0498-Toggle-for-removing-existing-dragon.patch similarity index 87% rename from patches/unapplied/server/0502-Toggle-for-removing-existing-dragon.patch rename to patches/server/0498-Toggle-for-removing-existing-dragon.patch index 157073f779..8d613c75de 100644 --- a/patches/unapplied/server/0502-Toggle-for-removing-existing-dragon.patch +++ b/patches/server/0498-Toggle-for-removing-existing-dragon.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Toggle for removing existing dragon diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index f32906729baf83d8b53d64ab750cddcc413a2927..3e1e8b42f963fab17e416760b93e7c1c0a9a7f45 100644 +index 9ed33e7ebb64ec74be2d2e38a35612786408adff..ed0d1d6285556f0949a7ea81ad692b663ec191a7 100644 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -@@ -217,7 +217,7 @@ public class EndDragonFight { +@@ -218,7 +218,7 @@ public class EndDragonFight { this.dragonUUID = enderDragon.getUUID(); LOGGER.info("Found that there's a dragon still alive ({})", (Object)enderDragon); this.dragonKilled = false; diff --git a/patches/unapplied/server/0503-Fix-client-lag-on-advancement-loading.patch b/patches/server/0499-Fix-client-lag-on-advancement-loading.patch similarity index 91% rename from patches/unapplied/server/0503-Fix-client-lag-on-advancement-loading.patch rename to patches/server/0499-Fix-client-lag-on-advancement-loading.patch index f81a2f02d3..f0dde86efd 100644 --- a/patches/unapplied/server/0503-Fix-client-lag-on-advancement-loading.patch +++ b/patches/server/0499-Fix-client-lag-on-advancement-loading.patch @@ -15,10 +15,10 @@ manually reload the advancement data for all players, which normally takes place as a part of the datapack reloading. diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 78ea9d70d44cbf2a51172c5cd394c9ff17981961..2fdaf6661644c8601f310ae79d9f59920a2f3996 100644 +index 31960587fff298e1b50c8216e47db9a0aa053b29..7502624de2710e28ae427a7e6f38ba932f21ac1d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -345,7 +345,13 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -344,7 +344,13 @@ public final class CraftMagicNumbers implements UnsafeValues { Bukkit.getLogger().log(Level.SEVERE, "Error saving advancement " + key, ex); } diff --git a/patches/unapplied/server/0504-Item-no-age-no-player-pickup.patch b/patches/server/0500-Item-no-age-no-player-pickup.patch similarity index 100% rename from patches/unapplied/server/0504-Item-no-age-no-player-pickup.patch rename to patches/server/0500-Item-no-age-no-player-pickup.patch diff --git a/patches/unapplied/server/0505-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch b/patches/server/0501-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch similarity index 100% rename from patches/unapplied/server/0505-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch rename to patches/server/0501-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch diff --git a/patches/unapplied/server/0506-Beacon-API-custom-effect-ranges.patch b/patches/server/0502-Beacon-API-custom-effect-ranges.patch similarity index 89% rename from patches/unapplied/server/0506-Beacon-API-custom-effect-ranges.patch rename to patches/server/0502-Beacon-API-custom-effect-ranges.patch index f462f881de..e1551974b7 100644 --- a/patches/unapplied/server/0506-Beacon-API-custom-effect-ranges.patch +++ b/patches/server/0502-Beacon-API-custom-effect-ranges.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Beacon API - custom effect ranges diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 12bb07ba7bcb37a26c0492e045b42289bfec70db..d60cd642f905776cab9412b72f0fde0ed6a071fe 100644 +index 04c2872e2a492adef5aec98289a8cf2af6611757..ab4e5c08e51f5ed1cddf8295944cd54b19f401c0 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -76,6 +76,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -78,6 +78,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name return (BeaconBlockEntity.hasSecondaryEffect(this.levels, this.primaryPower, this.secondaryPower)) ? CraftPotionUtil.toBukkit(new MobEffectInstance(this.secondaryPower, BeaconBlockEntity.getLevel(this.levels), BeaconBlockEntity.getAmplification(this.levels, this.primaryPower, this.secondaryPower), true, true)) : null; } // CraftBukkit end @@ -35,7 +35,7 @@ index 12bb07ba7bcb37a26c0492e045b42289bfec70db..d60cd642f905776cab9412b72f0fde0e public BeaconBlockEntity(BlockPos pos, BlockState state) { super(BlockEntityType.BEACON, pos, state); -@@ -186,7 +206,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -188,7 +208,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } if (blockEntity.levels > 0 && !blockEntity.beamSections.isEmpty()) { @@ -44,7 +44,7 @@ index 12bb07ba7bcb37a26c0492e045b42289bfec70db..d60cd642f905776cab9412b72f0fde0e BeaconBlockEntity.playSound(world, pos, SoundEvents.BEACON_AMBIENT); } } -@@ -272,8 +292,13 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -274,8 +294,13 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } public static List getHumansInRange(Level world, BlockPos blockposition, int i) { @@ -59,7 +59,7 @@ index 12bb07ba7bcb37a26c0492e045b42289bfec70db..d60cd642f905776cab9412b72f0fde0e AABB axisalignedbb = (new AABB(blockposition)).inflate(d0).expandTowards(0.0D, (double) world.getHeight(), 0.0D); List list = world.getEntitiesOfClass(Player.class, axisalignedbb); -@@ -314,12 +339,17 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -316,12 +341,17 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable MobEffect primaryEffect, @Nullable MobEffect secondaryEffect) { @@ -78,7 +78,7 @@ index 12bb07ba7bcb37a26c0492e045b42289bfec70db..d60cd642f905776cab9412b72f0fde0e BeaconBlockEntity.applyEffect(list, primaryEffect, j, b0, true, pos); // Paper - BeaconEffectEvent -@@ -369,6 +399,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -371,6 +401,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } this.lockKey = LockCode.fromTag(nbt); @@ -86,7 +86,7 @@ index 12bb07ba7bcb37a26c0492e045b42289bfec70db..d60cd642f905776cab9412b72f0fde0e } @Override -@@ -382,6 +413,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -384,6 +415,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } this.lockKey.addToTag(nbt); diff --git a/patches/unapplied/server/0507-Add-API-for-quit-reason.patch b/patches/server/0503-Add-API-for-quit-reason.patch similarity index 88% rename from patches/unapplied/server/0507-Add-API-for-quit-reason.patch rename to patches/server/0503-Add-API-for-quit-reason.patch index 6033f3d712..2a5696029b 100644 --- a/patches/unapplied/server/0507-Add-API-for-quit-reason.patch +++ b/patches/server/0503-Add-API-for-quit-reason.patch @@ -25,22 +25,22 @@ index 3ae55dd6441b2dfdb67eb2f24ecf885bab89e7a6..f76ee2131c35a9dbf7ad9d086b51c964 Connection.LOGGER.debug("Failed to sent packet", throwable); ConnectionProtocol enumprotocol = this.getCurrentProtocol(); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index b41fddf5225b9d7cccf73b91dd0c14897c990346..67cf1cd5f3a83a52dca54781670dcfe0cf2a89c2 100644 +index eafc2651a15e1e905a6f2343760969cb5bd414c3..290e250505b229242e7b4f70469c8688cac4b548 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -266,6 +266,7 @@ public class ServerPlayer extends Player { - public boolean isRealPlayer; // Paper +@@ -270,6 +270,7 @@ public class ServerPlayer extends Player { public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks 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 - public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, @Nullable ProfilePublicKey publicKey) { - super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile, publicKey); + public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) { + super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3387fdf7e7345827dae63815de19b38a79f8ed4f..d0f80dadb4e2dade8122c945bafe05ff7adf42a0 100644 +index 191aa9cd6e27cbc322b8ce2aa6ad07c20660e709..d71ed61acf9949974d746bd1511c30dc2a5235ec 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -515,6 +515,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -507,6 +507,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure // CraftBukkit end @@ -49,10 +49,10 @@ index 3387fdf7e7345827dae63815de19b38a79f8ed4f..d0f80dadb4e2dade8122c945bafe05ff this.connection.disconnect(ichatbasecomponent); })); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index fcd2f8514e60e1faafec787f162baf98663fb734..90559afc3533778d5cf43b04a83a0b6cd20796ac 100644 +index 4b2862c6c5397ebec7cc22938b76ed0d24d7125f..c12f8b3744273865eb9b1a3618e0fc0daa6bdeaf 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -607,7 +607,7 @@ public abstract class PlayerList { +@@ -615,7 +615,7 @@ public abstract class PlayerList { entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper } diff --git a/patches/unapplied/server/0508-Add-Wandering-Trader-spawn-rate-config-options.patch b/patches/server/0504-Add-Wandering-Trader-spawn-rate-config-options.patch similarity index 97% rename from patches/unapplied/server/0508-Add-Wandering-Trader-spawn-rate-config-options.patch rename to patches/server/0504-Add-Wandering-Trader-spawn-rate-config-options.patch index a5adffed4f..a3b82ec02b 100644 --- a/patches/unapplied/server/0508-Add-Wandering-Trader-spawn-rate-config-options.patch +++ b/patches/server/0504-Add-Wandering-Trader-spawn-rate-config-options.patch @@ -11,10 +11,10 @@ in IWorldServerData are removed as they were only used in certain places, with h values used in other places. diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -index 0130c5e7e1b42024f88c6d7dadd246b7744d7f91..fcde09e155727fe0b8b6acc79700fe4122fd22f0 100644 +index 0885565e4de0c2924f9e89abfd20dfa0ccf031f2..0ae8e9134a3671cdf2a480cd4dd6598653e261ab 100644 --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -@@ -43,43 +43,53 @@ public class WanderingTraderSpawner implements CustomSpawner { +@@ -40,43 +40,53 @@ public class WanderingTraderSpawner implements CustomSpawner { public WanderingTraderSpawner(ServerLevelData properties) { this.serverLevelData = properties; diff --git a/patches/unapplied/server/0509-Expose-world-spawn-angle.patch b/patches/server/0505-Expose-world-spawn-angle.patch similarity index 89% rename from patches/unapplied/server/0509-Expose-world-spawn-angle.patch rename to patches/server/0505-Expose-world-spawn-angle.patch index ba5db7a0c6..ec97301839 100644 --- a/patches/unapplied/server/0509-Expose-world-spawn-angle.patch +++ b/patches/server/0505-Expose-world-spawn-angle.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose world spawn angle diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 90559afc3533778d5cf43b04a83a0b6cd20796ac..a26388bd15f26ea7712b9a84855b9aaf4d7aac06 100644 +index c12f8b3744273865eb9b1a3618e0fc0daa6bdeaf..a4338683d7d2a0d98121ee9e5b57a08883cc69a0 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -885,7 +885,7 @@ public abstract class PlayerList { +@@ -893,7 +893,7 @@ public abstract class PlayerList { if (location == null) { worldserver1 = this.server.getLevel(Level.OVERWORLD); blockposition = entityplayer1.getSpawnPoint(worldserver1); diff --git a/patches/unapplied/server/0510-Add-Destroy-Speed-API.patch b/patches/server/0506-Add-Destroy-Speed-API.patch similarity index 91% rename from patches/unapplied/server/0510-Add-Destroy-Speed-API.patch rename to patches/server/0506-Add-Destroy-Speed-API.patch index a2b7640fee..fc98d03d3d 100644 --- a/patches/unapplied/server/0510-Add-Destroy-Speed-API.patch +++ b/patches/server/0506-Add-Destroy-Speed-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Destroy Speed API Co-authored-by: Jake Potrebic diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 2c1efaecf220588d8b74946194bf340871e57004..653dcec33f83ab490af424faa6ede7df07d41742 100644 +index 6d9cddb20a069cada6d20e5f61a2ca2ab2c308a0..9a191f16a4d80cde2b2801526fe386abba6e5302 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -678,5 +678,26 @@ public class CraftBlock implements Block { +@@ -680,5 +680,26 @@ public class CraftBlock implements Block { public String translationKey() { return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this); } diff --git a/patches/unapplied/server/0511-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/0507-Fix-Player-spawnParticle-x-y-z-precision-loss.patch similarity index 89% rename from patches/unapplied/server/0511-Fix-Player-spawnParticle-x-y-z-precision-loss.patch rename to patches/server/0507-Fix-Player-spawnParticle-x-y-z-precision-loss.patch index 5f7722ab04..713822953e 100644 --- a/patches/unapplied/server/0511-Fix-Player-spawnParticle-x-y-z-precision-loss.patch +++ b/patches/server/0507-Fix-Player-spawnParticle-x-y-z-precision-loss.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 34868d08ea4d17c63e9fdac2701d08269f39c115..d425dd49cc023a703b283d31f541dfea0256822e 100644 +index a84efd5f91141ab9b3879dbb325bc918d88a93e8..56f3ce73eb018cb93e3ec2057794d31345872d8b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2346,7 +2346,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2348,7 +2348,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (data != null && !particle.getDataType().isInstance(data)) { throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass()); } diff --git a/patches/unapplied/server/0512-Add-LivingEntity-clearActiveItem.patch b/patches/server/0508-Add-LivingEntity-clearActiveItem.patch similarity index 100% rename from patches/unapplied/server/0512-Add-LivingEntity-clearActiveItem.patch rename to patches/server/0508-Add-LivingEntity-clearActiveItem.patch diff --git a/patches/unapplied/server/0513-Add-PlayerItemCooldownEvent.patch b/patches/server/0509-Add-PlayerItemCooldownEvent.patch similarity index 100% rename from patches/unapplied/server/0513-Add-PlayerItemCooldownEvent.patch rename to patches/server/0509-Add-PlayerItemCooldownEvent.patch diff --git a/patches/unapplied/server/0514-Significantly-improve-performance-of-the-end-generat.patch b/patches/server/0510-Significantly-improve-performance-of-the-end-generat.patch similarity index 94% rename from patches/unapplied/server/0514-Significantly-improve-performance-of-the-end-generat.patch rename to patches/server/0510-Significantly-improve-performance-of-the-end-generat.patch index c223e5c115..95f0914262 100644 --- a/patches/unapplied/server/0514-Significantly-improve-performance-of-the-end-generat.patch +++ b/patches/server/0510-Significantly-improve-performance-of-the-end-generat.patch @@ -12,10 +12,10 @@ Co-authored-by: Dylan Xaldin Co-authored-by: pop4959 diff --git a/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java b/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java -index 683474cd96d3a0cdfb3b22d0111c8d3231f01d92..f09fd5027535d2fc4d4afae010f08e7accff45b3 100644 +index fac92f37c32e0398ebc05d9a0378446fcabaef1a..1beacd84bb0eee1f3e8f451fc1c514e23cc62826 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java +++ b/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java -@@ -489,6 +489,16 @@ public final class DensityFunctions { +@@ -490,6 +490,16 @@ public final class DensityFunctions { public static final KeyDispatchDataCodec CODEC = KeyDispatchDataCodec.of(MapCodec.unit(new DensityFunctions.EndIslandDensityFunction(0L))); private static final float ISLAND_THRESHOLD = -0.9F; private final SimplexNoise islandNoise; @@ -32,7 +32,7 @@ index 683474cd96d3a0cdfb3b22d0111c8d3231f01d92..f09fd5027535d2fc4d4afae010f08e7a public EndIslandDensityFunction(long seed) { RandomSource randomSource = new LegacyRandomSource(seed); -@@ -504,12 +514,26 @@ public final class DensityFunctions { +@@ -505,12 +515,26 @@ public final class DensityFunctions { float f = 100.0F - Mth.sqrt((long) x * (long) x + (long) z * (long) z) * 8.0F; // Paper - cast ints to long to avoid integer overflow f = Mth.clamp(f, -100.0F, 80.0F); diff --git a/patches/unapplied/server/0515-More-lightning-API.patch b/patches/server/0511-More-lightning-API.patch similarity index 100% rename from patches/unapplied/server/0515-More-lightning-API.patch rename to patches/server/0511-More-lightning-API.patch diff --git a/patches/unapplied/server/0516-Climbing-should-not-bypass-cramming-gamerule.patch b/patches/server/0512-Climbing-should-not-bypass-cramming-gamerule.patch similarity index 77% rename from patches/unapplied/server/0516-Climbing-should-not-bypass-cramming-gamerule.patch rename to patches/server/0512-Climbing-should-not-bypass-cramming-gamerule.patch index 0c836e07f2..f0be0411d9 100644 --- a/patches/unapplied/server/0516-Climbing-should-not-bypass-cramming-gamerule.patch +++ b/patches/server/0512-Climbing-should-not-bypass-cramming-gamerule.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 9b1ee67e9963f31c107f5bc310f6840d58906477..648d08635e2ec9c4847ada7709b7452f651b528d 100644 +index 13ed0e5290e0685d7b310b0d591010aeac207427..7bb5bb36d14de2a884301e99b571878200f834d0 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1896,6 +1896,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1911,6 +1911,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public boolean isPushable() { @@ -45,19 +45,19 @@ index 302676ef78ed5b3b7fc1b04851447ca72eed10c0..a00c3d96f2fc7131d1f4afa7af4e41ac } else if (entity.level.isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) { return false; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 9c5421b9aa35c5f90a51ed097e68c5143054e966..a01a6a2c869a973eb044fdb2084f151954599075 100644 +index b96a783e4df3a5ce1115d05e00e1ae2e0cd6378d..abf18757ed70bcbe9eecb88b18670089153b2a0a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3368,7 +3368,7 @@ public abstract class LivingEntity extends Entity { - return; - } - // Paper end - don't run getEntities if we're not going to use its result -- List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushableBy(this)); -+ List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushable(this, level.paperConfig().collisions.fixClimbingBypassingCrammingRule)); // Paper - fix climbing bypassing cramming rule +@@ -3392,7 +3392,7 @@ public abstract class LivingEntity extends Entity { + return; + } + // Paper end - don't run getEntities if we're not going to use its result +- List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushableBy(this)); ++ List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushable(this, level.paperConfig().collisions.fixClimbingBypassingCrammingRule)); // Paper - fix climbing bypassing cramming rule - if (!list.isEmpty()) { - // Paper - move up -@@ -3531,9 +3531,16 @@ public abstract class LivingEntity extends Entity { + if (!list.isEmpty()) { + // Paper - moved up +@@ -3556,9 +3556,16 @@ public abstract class LivingEntity extends Entity { return !this.isRemoved() && this.collides; // CraftBukkit } @@ -76,10 +76,10 @@ index 9c5421b9aa35c5f90a51ed097e68c5143054e966..a01a6a2c869a973eb044fdb2084f1519 // CraftBukkit start - collidable API diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java -index fd2a73c5bd940df2af3f7b5777e2a0b3ac6376c3..def01d221f36d71640bf4ef982a984909aacc6da 100644 +index 4d3a88277e8a68c2d92df6ca46214898eee2a878..320c558bbe80d4bbc641e895ec43cfa2b45e8d70 100644 --- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java +++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java -@@ -82,7 +82,7 @@ public class Bat extends AmbientCreature { +@@ -85,7 +85,7 @@ public class Bat extends AmbientCreature { } @Override @@ -89,10 +89,10 @@ index fd2a73c5bd940df2af3f7b5777e2a0b3ac6376c3..def01d221f36d71640bf4ef982a98490 } diff --git a/src/main/java/net/minecraft/world/entity/animal/Parrot.java b/src/main/java/net/minecraft/world/entity/animal/Parrot.java -index 90b98b823855037ce6efab1f478d875f225f65ed..a2977596c672a5a435f56bb20fbfb7b59882dda6 100644 +index a985241b9d80e1f99227adbaf4a2b221ff840a38..2d9aa961df034eab21ecfdb6e6d0ce7cf013505d 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java +++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java -@@ -382,8 +382,8 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -386,8 +386,8 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder { } @Override diff --git a/patches/unapplied/server/0517-Added-missing-default-perms-for-commands.patch b/patches/server/0513-Added-missing-default-perms-for-commands.patch similarity index 100% rename from patches/unapplied/server/0517-Added-missing-default-perms-for-commands.patch rename to patches/server/0513-Added-missing-default-perms-for-commands.patch diff --git a/patches/unapplied/server/0518-Add-PlayerShearBlockEvent.patch b/patches/server/0514-Add-PlayerShearBlockEvent.patch similarity index 96% rename from patches/unapplied/server/0518-Add-PlayerShearBlockEvent.patch rename to patches/server/0514-Add-PlayerShearBlockEvent.patch index ad60c8efb4..a038575f4e 100644 --- a/patches/unapplied/server/0518-Add-PlayerShearBlockEvent.patch +++ b/patches/server/0514-Add-PlayerShearBlockEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerShearBlockEvent diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java -index 8dff119fa83e44d71b10bb3ea6e5f4e886a48c9c..dd51ea83935028a083c9cf368e6826fa32c00462 100644 +index 8104085ca0265706911f60c9c15f9f31b3fdfd68..81048c54c45b77894ee1e2045870446dff7c71d4 100644 --- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java @@ -113,7 +113,7 @@ public class BeehiveBlock extends BaseEntityBlock { @@ -28,7 +28,7 @@ index 8dff119fa83e44d71b10bb3ea6e5f4e886a48c9c..dd51ea83935028a083c9cf368e6826fa + return InteractionResult.PASS; + } + // Paper end - world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BEEHIVE_SHEAR, SoundSource.NEUTRAL, 1.0F, 1.0F); + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BEEHIVE_SHEAR, SoundSource.BLOCKS, 1.0F, 1.0F); - BeehiveBlock.dropHoneycomb(world, pos); + // Paper start - Add PlayerShearBlockEvent + for (org.bukkit.inventory.ItemStack itemDrop : event.getDrops()) { diff --git a/patches/unapplied/server/0519-Fix-curing-zombie-villager-discount-exploit.patch b/patches/server/0515-Fix-curing-zombie-villager-discount-exploit.patch similarity index 91% rename from patches/unapplied/server/0519-Fix-curing-zombie-villager-discount-exploit.patch rename to patches/server/0515-Fix-curing-zombie-villager-discount-exploit.patch index c6cb27bebe..89edea576c 100644 --- a/patches/unapplied/server/0519-Fix-curing-zombie-villager-discount-exploit.patch +++ b/patches/server/0515-Fix-curing-zombie-villager-discount-exploit.patch @@ -8,10 +8,10 @@ and curing a villager on repeat by simply resetting the relevant part of the reputation when it is cured. diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index 1d2b7950e3c498945a2ff85fda0e3bb30acd22cb..10b45ec24a5a0867106d1694312385ad1e267f43 100644 +index e3db573f10b7a3f8f605a11dc886859c68168467..ec46a095a26af507fdee0485f7c519c14decc95f 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -976,6 +976,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -980,6 +980,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @Override public void onReputationEventFrom(ReputationEventType interaction, Entity entity) { if (interaction == ReputationEventType.ZOMBIE_VILLAGER_CURED) { diff --git a/patches/unapplied/server/0520-Limit-recipe-packets.patch b/patches/server/0516-Limit-recipe-packets.patch similarity index 90% rename from patches/unapplied/server/0520-Limit-recipe-packets.patch rename to patches/server/0516-Limit-recipe-packets.patch index 17632f4fd2..d720b48c3f 100644 --- a/patches/unapplied/server/0520-Limit-recipe-packets.patch +++ b/patches/server/0516-Limit-recipe-packets.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Limit recipe packets diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d0f80dadb4e2dade8122c945bafe05ff7adf42a0..e36b50f7467d14eaf0fb29e6c5ece87de9db085a 100644 +index d71ed61acf9949974d746bd1511c30dc2a5235ec..dd468a6f8185545930eae95d8f22beb25ae493b0 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -263,6 +263,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -262,6 +262,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // CraftBukkit start - multithreaded fields private final AtomicInteger chatSpamTickCount = new AtomicInteger(); private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits @@ -16,7 +16,7 @@ index d0f80dadb4e2dade8122c945bafe05ff7adf42a0..e36b50f7467d14eaf0fb29e6c5ece87d // CraftBukkit end private int dropSpamTickCount; private double firstGoodX; -@@ -425,6 +426,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -418,6 +419,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // CraftBukkit start for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ; if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable @@ -24,7 +24,7 @@ index d0f80dadb4e2dade8122c945bafe05ff7adf42a0..e36b50f7467d14eaf0fb29e6c5ece87d /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -3248,6 +3250,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3115,6 +3117,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) { diff --git a/patches/unapplied/server/0521-Fix-CraftSound-backwards-compatibility.patch b/patches/server/0517-Fix-CraftSound-backwards-compatibility.patch similarity index 77% rename from patches/unapplied/server/0521-Fix-CraftSound-backwards-compatibility.patch rename to patches/server/0517-Fix-CraftSound-backwards-compatibility.patch index 60e8ef1e6b..9795fec129 100644 --- a/patches/unapplied/server/0521-Fix-CraftSound-backwards-compatibility.patch +++ b/patches/server/0517-Fix-CraftSound-backwards-compatibility.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Fix CraftSound backwards compatibility diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java -index 266563e72b563fd9db85f17bca710bbe45e8a22d..b2667c5f0794d521766203fea3299f12e21f5c76 100644 +index 180275a8b9d48d0c5a7bbaa950de619aed2dad53..5b68188d1a7b5a75e2f4b61e8d415b5784e0d8c0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java -@@ -26,4 +26,10 @@ public class CraftSound { +@@ -27,4 +27,10 @@ public class CraftSound { public static Sound getBukkit(SoundEvent soundEffect) { - return Registry.SOUNDS.get(CraftNamespacedKey.fromMinecraft(net.minecraft.core.Registry.SOUND_EVENT.getKey(soundEffect))); + return Registry.SOUNDS.get(CraftNamespacedKey.fromMinecraft(BuiltInRegistries.SOUND_EVENT.getKey(soundEffect))); } + + // Paper start diff --git a/patches/unapplied/server/0522-Player-Chunk-Load-Unload-Events.patch b/patches/server/0518-Player-Chunk-Load-Unload-Events.patch similarity index 90% rename from patches/unapplied/server/0522-Player-Chunk-Load-Unload-Events.patch rename to patches/server/0518-Player-Chunk-Load-Unload-Events.patch index 5d27e96dbb..2a680a14e3 100644 --- a/patches/unapplied/server/0522-Player-Chunk-Load-Unload-Events.patch +++ b/patches/server/0518-Player-Chunk-Load-Unload-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player Chunk Load/Unload Events diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 67cf1cd5f3a83a52dca54781670dcfe0cf2a89c2..e74d4523caa4d2d4b33e22145f7b2dcb63dba9fc 100644 +index 290e250505b229242e7b4f70469c8688cac4b548..c3ad00123198dc00bcf5a3d89f8d527b1c9c083c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2141,11 +2141,21 @@ public class ServerPlayer extends Player { +@@ -2166,11 +2166,21 @@ public class ServerPlayer extends Player { public void trackChunk(ChunkPos chunkPos, Packet chunkDataPacket) { this.connection.send(chunkDataPacket); diff --git a/patches/unapplied/server/0523-Optimize-Dynamic-get-Missing-Keys.patch b/patches/server/0519-Optimize-Dynamic-get-Missing-Keys.patch similarity index 100% rename from patches/unapplied/server/0523-Optimize-Dynamic-get-Missing-Keys.patch rename to patches/server/0519-Optimize-Dynamic-get-Missing-Keys.patch diff --git a/patches/unapplied/server/0524-Expose-LivingEntity-hurt-direction.patch b/patches/server/0520-Expose-LivingEntity-hurt-direction.patch similarity index 100% rename from patches/unapplied/server/0524-Expose-LivingEntity-hurt-direction.patch rename to patches/server/0520-Expose-LivingEntity-hurt-direction.patch diff --git a/patches/unapplied/server/0525-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/patches/server/0521-Add-OBSTRUCTED-reason-to-BedEnterResult.patch similarity index 91% rename from patches/unapplied/server/0525-Add-OBSTRUCTED-reason-to-BedEnterResult.patch rename to patches/server/0521-Add-OBSTRUCTED-reason-to-BedEnterResult.patch index 50d1f220a7..98020c31a5 100644 --- a/patches/unapplied/server/0525-Add-OBSTRUCTED-reason-to-BedEnterResult.patch +++ b/patches/server/0521-Add-OBSTRUCTED-reason-to-BedEnterResult.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 2809ec8fcd43d096a187fc2fbda042a81d301c0c..311f38cc6f64339089ffeb899c4f421e74b44602 100644 +index 88fb677231e13d714e20ae55c08443212b0512a9..672b1000daf839d69a06cb3daf9f6dbb86b2cbdc 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -264,6 +264,10 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0526-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch b/patches/server/0522-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch similarity index 93% rename from patches/unapplied/server/0526-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch rename to patches/server/0522-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch index a66e8fc14d..87fc5a3895 100644 --- a/patches/unapplied/server/0526-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch +++ b/patches/server/0522-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Do not crash from invalid ingredient lists in diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java -index 6717e3d116b7bff8ab4d7b45f8c4ec00939c9c73..0c585354ba459ceb6badbf60dcf7b068bfa108b6 100644 +index 49bc867f189b0d4c236a47670676cc67920c2cd7..e7dda8959eb92c069af001126aafc759e7e7d2de 100644 --- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java @@ -275,7 +275,11 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa diff --git a/patches/unapplied/server/0527-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch b/patches/server/0523-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch similarity index 90% rename from patches/unapplied/server/0527-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch rename to patches/server/0523-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch index 339a34391b..f8d0afea2f 100644 --- a/patches/unapplied/server/0527-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch +++ b/patches/server/0523-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add PlayerTradeEvent and PlayerPurchaseEvent Co-authored-by: Alexander diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java -index 0c585354ba459ceb6badbf60dcf7b068bfa108b6..5eab7d50734551d96128dfebee126a1da4c51375 100644 +index e7dda8959eb92c069af001126aafc759e7e7d2de..ca96b893e22de3ae7c11d5cded51edf70bdcb6f2 100644 --- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java @@ -138,11 +138,24 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa @@ -37,10 +37,10 @@ index 0c585354ba459ceb6badbf60dcf7b068bfa108b6..5eab7d50734551d96128dfebee126a1d CriteriaTriggers.TRADE.trigger((ServerPlayer) this.tradingPlayer, this, offer.getResult()); } diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -index 66261330157cef50dfabb7f92e9ece6dcd280951..823ead0fd1942db0219968cd383439b324b16f6e 100644 +index f7976bd9561601a6ce1d5b4874b08bba9754d753..6f9d59256d34446c48e4df9dbc9351856101caa2 100644 --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -@@ -751,6 +751,14 @@ public abstract class AbstractContainerMenu { +@@ -758,6 +758,14 @@ public abstract class AbstractContainerMenu { public abstract boolean stillValid(Player player); protected boolean moveItemStackTo(ItemStack stack, int startIndex, int endIndex, boolean fromLast) { @@ -55,7 +55,7 @@ index 66261330157cef50dfabb7f92e9ece6dcd280951..823ead0fd1942db0219968cd383439b3 boolean flag1 = false; int k = startIndex; -@@ -773,18 +781,27 @@ public abstract class AbstractContainerMenu { +@@ -780,18 +788,27 @@ public abstract class AbstractContainerMenu { slot = (Slot) this.slots.get(k); itemstack1 = slot.getItem(); @@ -83,7 +83,7 @@ index 66261330157cef50dfabb7f92e9ece6dcd280951..823ead0fd1942db0219968cd383439b3 flag1 = true; } } -@@ -815,14 +832,33 @@ public abstract class AbstractContainerMenu { +@@ -822,14 +839,33 @@ public abstract class AbstractContainerMenu { slot = (Slot) this.slots.get(k); itemstack1 = slot.getItem(); @@ -118,50 +118,50 @@ index 66261330157cef50dfabb7f92e9ece6dcd280951..823ead0fd1942db0219968cd383439b3 break; } diff --git a/src/main/java/net/minecraft/world/inventory/MerchantMenu.java b/src/main/java/net/minecraft/world/inventory/MerchantMenu.java -index 0d3002c5b13cbac0e021e8cdcf7d0685b256268a..3e3dfbe30fc5357e144aa176bc5df1b8a7ae6d64 100644 +index 97e8fd420046871266966de31449da9424148572..3879373eeef324a6c782d3426faf22ac70353931 100644 --- a/src/main/java/net/minecraft/world/inventory/MerchantMenu.java +++ b/src/main/java/net/minecraft/world/inventory/MerchantMenu.java @@ -134,12 +134,12 @@ public class MerchantMenu extends AbstractContainerMenu { itemstack = itemstack1.copy(); - if (index == 2) { + if (slot == 2) { - if (!this.moveItemStackTo(itemstack1, 3, 39, true)) { + if (!this.moveItemStackTo(itemstack1, 3, 39, true, true)) { // Paper return ItemStack.EMPTY; } -- slot.onQuickCraft(itemstack1, itemstack); +- slot1.onQuickCraft(itemstack1, itemstack); - this.playTradeSound(); -+ // slot.onQuickCraft(itemstack1, itemstack); // Paper - moved to after the non-check moveItemStackTo call ++ // slot1.onQuickCraft(itemstack1, itemstack); // Paper - moved to after the non-check moveItemStackTo call + // this.playTradeSound(); - } else if (index != 0 && index != 1) { - if (index >= 3 && index < 30) { + } else if (slot != 0 && slot != 1) { + if (slot >= 3 && slot < 30) { if (!this.moveItemStackTo(itemstack1, 30, 39, false)) { @@ -152,6 +152,7 @@ public class MerchantMenu extends AbstractContainerMenu { return ItemStack.EMPTY; } -+ if (index != 2) { // Paper - moved down for slot 2 ++ if (slot != 2) { // Paper - moved down for slot 2 if (itemstack1.isEmpty()) { - slot.set(ItemStack.EMPTY); + slot1.set(ItemStack.EMPTY); } else { @@ -163,6 +164,21 @@ public class MerchantMenu extends AbstractContainerMenu { } - slot.onTake(player, itemstack1); + slot1.onTake(player, itemstack1); + } // Paper start - handle slot 2 -+ if (index == 2) { // is merchant result slot -+ slot.onTake(player, itemstack1); ++ if (slot == 2) { // is merchant result slot ++ slot1.onTake(player, itemstack1); + if (itemstack1.isEmpty()) { -+ slot.set(ItemStack.EMPTY); ++ slot1.set(ItemStack.EMPTY); + return ItemStack.EMPTY; + } + + this.moveItemStackTo(itemstack1, 3, 39, true, false); // This should always succeed because it's checked above + -+ slot.onQuickCraft(itemstack1, itemstack); ++ slot1.onQuickCraft(itemstack1, itemstack); + this.playTradeSound(); -+ slot.set(ItemStack.EMPTY); // itemstack1 should ALWAYS be empty ++ slot1.set(ItemStack.EMPTY); // itemstack1 should ALWAYS be empty + } + // Paper end } diff --git a/patches/unapplied/server/0528-Implement-TargetHitEvent.patch b/patches/server/0524-Implement-TargetHitEvent.patch similarity index 100% rename from patches/unapplied/server/0528-Implement-TargetHitEvent.patch rename to patches/server/0524-Implement-TargetHitEvent.patch diff --git a/patches/unapplied/server/0529-MC-4-Fix-item-position-desync.patch b/patches/server/0525-MC-4-Fix-item-position-desync.patch similarity index 73% rename from patches/unapplied/server/0529-MC-4-Fix-item-position-desync.patch rename to patches/server/0525-MC-4-Fix-item-position-desync.patch index 0e16eea060..a8244eb2f9 100644 --- a/patches/unapplied/server/0529-MC-4-Fix-item-position-desync.patch +++ b/patches/server/0525-MC-4-Fix-item-position-desync.patch @@ -9,28 +9,29 @@ loss, which forces the server to lose the same precision as the client keeping them in sync. diff --git a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java -index 3768a71491ef7836b9739bdaec7a077c523dbacd..a57957ace1a72b3308487f180a366c3879eceb21 100644 +index 5ca3ad7b3d7606accd0a58b3c708fadb349608f7..4b6e0fe2fabcc55007fd8979e81f66df9c0278b7 100644 --- a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java +++ b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java -@@ -8,11 +8,11 @@ public class VecDeltaCodec { - public Vec3 base = Vec3.ZERO; // Paper +@@ -9,12 +9,12 @@ public class VecDeltaCodec { - private static long encode(double value) { -- return Mth.lfloor(value * 4096.0D); -+ return Mth.lfloor(value * 4096.0D); // Paper - check ItemEntity#setPosRaw on update + @VisibleForTesting + static long encode(double value) { +- return Math.round(value * 4096.0D); ++ return Math.round(value * 4096.0D); // Paper - diff on change } - private static double decode(long value) { + @VisibleForTesting + static double decode(long value) { - return (double)value / 4096.0D; -+ return (double)value / 4096.0D; // Paper - check ItemEntity#setPosRaw on update ++ return (double)value / 4096.0D; // Paper - diff on change } public Vec3 decode(long x, long y, long z) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 648d08635e2ec9c4847ada7709b7452f651b528d..c22778e5155abf5dcfbf574ef633f253208f7e6c 100644 +index 7bb5bb36d14de2a884301e99b571878200f834d0..7451ee1537c67a96dc33af13cf6ad43338434d43 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3970,6 +3970,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4020,6 +4020,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return; } // Paper end - rewrite chunk system diff --git a/patches/unapplied/server/0530-Additional-Block-Material-API-s.patch b/patches/server/0526-Additional-Block-Material-API-s.patch similarity index 89% rename from patches/unapplied/server/0530-Additional-Block-Material-API-s.patch rename to patches/server/0526-Additional-Block-Material-API-s.patch index e93239aae5..1061932b3c 100644 --- a/patches/unapplied/server/0530-Additional-Block-Material-API-s.patch +++ b/patches/server/0526-Additional-Block-Material-API-s.patch @@ -9,10 +9,10 @@ process to do this in the Bukkit API Adds API for buildable, replaceable, burnable too. diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 653dcec33f83ab490af424faa6ede7df07d41742..817d7143fb60916a6747ee4b9f7c77becd9071c1 100644 +index 9a191f16a4d80cde2b2801526fe386abba6e5302..1def5d8c61d78c1d9ccacafdbf8a16072cf75c6a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -463,6 +463,25 @@ public class CraftBlock implements Block { +@@ -465,6 +465,25 @@ public class CraftBlock implements Block { return this.getNMS().getMaterial().isLiquid(); } diff --git a/patches/unapplied/server/0531-Fix-harming-potion-dupe.patch b/patches/server/0527-Fix-harming-potion-dupe.patch similarity index 91% rename from patches/unapplied/server/0531-Fix-harming-potion-dupe.patch rename to patches/server/0527-Fix-harming-potion-dupe.patch index d131d6c979..b7aa7bc555 100644 --- a/patches/unapplied/server/0531-Fix-harming-potion-dupe.patch +++ b/patches/server/0527-Fix-harming-potion-dupe.patch @@ -8,10 +8,10 @@ Before this patch, instant effects would be applied before the potion ItemStack This patch makes it so that instant effects are applied after the potion ItemStack is removed, and the glass bottle is only put into the player's inventory if the player is not dead. Otherwise, the glass bottle is dropped on the ground. diff --git a/src/main/java/net/minecraft/world/item/PotionItem.java b/src/main/java/net/minecraft/world/item/PotionItem.java -index 446ba28a38a597bc8c99e31087e5c90eb37f8335..44aecc47d94481cb6286a60fc2bb720e3486bcc2 100644 +index cdd25fd41bd9c211eeff8581c920d3a5da4f2c8c..0b344e20ad4093b135c58905fb82ffff05898bb2 100644 --- a/src/main/java/net/minecraft/world/item/PotionItem.java +++ b/src/main/java/net/minecraft/world/item/PotionItem.java -@@ -53,6 +53,7 @@ public class PotionItem extends Item { +@@ -50,6 +50,7 @@ public class PotionItem extends Item { CriteriaTriggers.CONSUME_ITEM.trigger((ServerPlayer) entityhuman, stack); } @@ -19,7 +19,7 @@ index 446ba28a38a597bc8c99e31087e5c90eb37f8335..44aecc47d94481cb6286a60fc2bb720e if (!world.isClientSide) { List list = PotionUtils.getMobEffects(stack); Iterator iterator = list.iterator(); -@@ -61,7 +62,7 @@ public class PotionItem extends Item { +@@ -58,7 +59,7 @@ public class PotionItem extends Item { MobEffectInstance mobeffect = (MobEffectInstance) iterator.next(); if (mobeffect.getEffect().isInstantenous()) { @@ -28,7 +28,7 @@ index 446ba28a38a597bc8c99e31087e5c90eb37f8335..44aecc47d94481cb6286a60fc2bb720e } else { user.addEffect(new MobEffectInstance(mobeffect), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.POTION_DRINK); // CraftBukkit } -@@ -75,7 +76,18 @@ public class PotionItem extends Item { +@@ -72,7 +73,18 @@ public class PotionItem extends Item { } } diff --git a/patches/unapplied/server/0532-Implement-API-to-get-Material-from-Boats-and-Minecar.patch b/patches/server/0528-Implement-API-to-get-Material-from-Boats-and-Minecar.patch similarity index 96% rename from patches/unapplied/server/0532-Implement-API-to-get-Material-from-Boats-and-Minecar.patch rename to patches/server/0528-Implement-API-to-get-Material-from-Boats-and-Minecar.patch index b68431ed82..8a19675f10 100644 --- a/patches/unapplied/server/0532-Implement-API-to-get-Material-from-Boats-and-Minecar.patch +++ b/patches/server/0528-Implement-API-to-get-Material-from-Boats-and-Minecar.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement API to get Material from Boats and Minecarts diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java -index 5871cd149fe07e97c5d68ffd83dae4d3fc6bcf03..f2896aa6fa5a5282b4be106320c0dad9dd6036c5 100644 +index 7de68f61166885d13141ff32fe199b60f9f70916..e5b16e930e12557a9a9052866cf0f431e3a5310d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java @@ -80,6 +80,13 @@ public class CraftBoat extends CraftVehicle implements Boat { diff --git a/patches/unapplied/server/0533-Cache-burn-durations.patch b/patches/server/0529-Cache-burn-durations.patch similarity index 91% rename from patches/unapplied/server/0533-Cache-burn-durations.patch rename to patches/server/0529-Cache-burn-durations.patch index 35387cbe57..ae2f002bd9 100644 --- a/patches/unapplied/server/0533-Cache-burn-durations.patch +++ b/patches/server/0529-Cache-burn-durations.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cache burn durations diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index d3a9b42fd4fa487e0acb1c95d57f78ccfbefbdff..1cc2c13ab07b9dc4492cec55314e12d7536d5453 100644 +index 196c99a2802c0bcaf93be287c404fc4f0f23eadd..34e375ab81b539ece769c943768342dbb542d0bb 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java @@ -132,7 +132,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit @@ -22,7 +22,7 @@ index d3a9b42fd4fa487e0acb1c95d57f78ccfbefbdff..1cc2c13ab07b9dc4492cec55314e12d7 Map map = Maps.newLinkedHashMap(); AbstractFurnaceBlockEntity.add(map, (ItemLike) Items.LAVA_BUCKET, 20000); -@@ -200,7 +206,10 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -194,7 +200,10 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit AbstractFurnaceBlockEntity.add(map, (ItemLike) Blocks.AZALEA, 100); AbstractFurnaceBlockEntity.add(map, (ItemLike) Blocks.FLOWERING_AZALEA, 100); AbstractFurnaceBlockEntity.add(map, (ItemLike) Blocks.MANGROVE_ROOTS, 300); diff --git a/patches/unapplied/server/0534-Allow-disabling-mob-spawner-spawn-egg-transformation.patch b/patches/server/0530-Allow-disabling-mob-spawner-spawn-egg-transformation.patch similarity index 91% rename from patches/unapplied/server/0534-Allow-disabling-mob-spawner-spawn-egg-transformation.patch rename to patches/server/0530-Allow-disabling-mob-spawner-spawn-egg-transformation.patch index 6d66e59fe4..c4eb2f5073 100644 --- a/patches/unapplied/server/0534-Allow-disabling-mob-spawner-spawn-egg-transformation.patch +++ b/patches/server/0530-Allow-disabling-mob-spawner-spawn-egg-transformation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow disabling mob spawner spawn egg transformation diff --git a/src/main/java/net/minecraft/world/item/SpawnEggItem.java b/src/main/java/net/minecraft/world/item/SpawnEggItem.java -index d222d9932af4b23af5d182259143d2d7f27675c5..a6c8833102a89ffacc817343285343ec4f8fa9bf 100644 +index 5d50e9c837628638019166e224905a9de69b1ae4..31268e25056f980798ef7db72c4f955a074cc639 100644 --- a/src/main/java/net/minecraft/world/item/SpawnEggItem.java +++ b/src/main/java/net/minecraft/world/item/SpawnEggItem.java @@ -61,7 +61,7 @@ public class SpawnEggItem extends Item { diff --git a/patches/unapplied/server/0535-Fix-Not-a-string-Map-Conversion-spam.patch b/patches/server/0531-Fix-Not-a-string-Map-Conversion-spam.patch similarity index 96% rename from patches/unapplied/server/0535-Fix-Not-a-string-Map-Conversion-spam.patch rename to patches/server/0531-Fix-Not-a-string-Map-Conversion-spam.patch index 7f8fe4769a..ee270318ca 100644 --- a/patches/unapplied/server/0535-Fix-Not-a-string-Map-Conversion-spam.patch +++ b/patches/server/0531-Fix-Not-a-string-Map-Conversion-spam.patch @@ -12,7 +12,7 @@ requesting the world. Track spigot issue to see when fixed: https://hub.spigotmc.org/jira/browse/SPIGOT-6181 diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -index 7254e7a42c58737cfc04f09aaca2fe1ebeec6d08..2a7c4b70f3d4442b33fa3d005da0da5da9756e83 100644 +index 984da6264cdaf57a49a15861b9ce834a9efac1a7..df616dbe37b8a2068338f071300d6315a361a075 100644 --- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java @@ -15,6 +15,8 @@ import net.minecraft.core.BlockPos; diff --git a/patches/unapplied/server/0536-Implement-PlayerFlowerPotManipulateEvent.patch b/patches/server/0532-Implement-PlayerFlowerPotManipulateEvent.patch similarity index 100% rename from patches/unapplied/server/0536-Implement-PlayerFlowerPotManipulateEvent.patch rename to patches/server/0532-Implement-PlayerFlowerPotManipulateEvent.patch diff --git a/patches/unapplied/server/0537-Fix-interact-event-not-being-called-in-adventure.patch b/patches/server/0533-Fix-interact-event-not-being-called-in-adventure.patch similarity index 71% rename from patches/unapplied/server/0537-Fix-interact-event-not-being-called-in-adventure.patch rename to patches/server/0533-Fix-interact-event-not-being-called-in-adventure.patch index 138b9c9df1..500d43eba6 100644 --- a/patches/unapplied/server/0537-Fix-interact-event-not-being-called-in-adventure.patch +++ b/patches/server/0533-Fix-interact-event-not-being-called-in-adventure.patch @@ -6,19 +6,19 @@ Subject: [PATCH] Fix interact event not being called in adventure Call PlayerInteractEvent when left-clicking on a block in adventure mode diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e36b50f7467d14eaf0fb29e6c5ece87de9db085a..4083f437704e586bfc1cf1e321f0b44febf7c44b 100644 +index dd468a6f8185545930eae95d8f22beb25ae493b0..b5b451ce6f29c69123b975a7b1943ca17388e6db 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1852,7 +1852,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - MutableComponent ichatmutablecomponent = Component.translatable("build.tooHigh", i - 1).withStyle(ChatFormatting.RED); +@@ -1847,7 +1847,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + MutableComponent ichatmutablecomponent = Component.translatable("build.tooHigh", i - 1).withStyle(ChatFormatting.RED); - this.player.sendSystemMessage(ichatmutablecomponent, true); -- } else if (enuminteractionresult.shouldSwing()) { + this.player.sendSystemMessage(ichatmutablecomponent, true); +- } else if (enuminteractionresult.shouldSwing()) { + } else if (enuminteractionresult.shouldSwing() && !this.player.gameMode.interactResult) { // Paper - this.player.swing(enumhand, true); + this.player.swing(enumhand, true); + } } - } -@@ -2610,7 +2610,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2473,7 +2473,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // SPIGOT-5607: Only call interact event if no block or entity is being clicked. Use bukkit ray trace method, because it handles blocks and entities at the same time org.bukkit.util.RayTraceResult result = this.player.level.getWorld().rayTrace(origin, origin.getDirection(), d3, org.bukkit.FluidCollisionMode.NEVER, false, 0.1, entity -> entity != this.player.getBukkitEntity()); diff --git a/patches/unapplied/server/0538-Zombie-API-breaking-doors.patch b/patches/server/0534-Zombie-API-breaking-doors.patch similarity index 100% rename from patches/unapplied/server/0538-Zombie-API-breaking-doors.patch rename to patches/server/0534-Zombie-API-breaking-doors.patch diff --git a/patches/unapplied/server/0539-Fix-nerfed-slime-when-splitting.patch b/patches/server/0535-Fix-nerfed-slime-when-splitting.patch similarity index 55% rename from patches/unapplied/server/0539-Fix-nerfed-slime-when-splitting.patch rename to patches/server/0535-Fix-nerfed-slime-when-splitting.patch index 726d362dff..42665024dc 100644 --- a/patches/unapplied/server/0539-Fix-nerfed-slime-when-splitting.patch +++ b/patches/server/0535-Fix-nerfed-slime-when-splitting.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Fix nerfed slime when splitting diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java -index 48feda682284321d18c846e4812909f0e7e649e3..15d5a8290be35c2caebf8e296300e8f32cb597c7 100644 +index 058ba40491f3e566c4c159978c677ceb87fa8383..7b05640465a47ea8680b4a0b6648a77ea7a1b404 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java -@@ -239,6 +239,7 @@ public class Slime extends Mob implements Enemy { - entityslime.setPersistenceRequired(); - } +@@ -241,6 +241,7 @@ public class Slime extends Mob implements Enemy { + entityslime.setPersistenceRequired(); + } + entityslime.aware = this.aware; // Paper - entityslime.setCustomName(ichatbasecomponent); - entityslime.setNoAi(flag); - entityslime.setInvulnerable(this.isInvulnerable()); + entityslime.setCustomName(ichatbasecomponent); + entityslime.setNoAi(flag); + entityslime.setInvulnerable(this.isInvulnerable()); diff --git a/patches/unapplied/server/0540-Add-EntityLoadCrossbowEvent.patch b/patches/server/0536-Add-EntityLoadCrossbowEvent.patch similarity index 96% rename from patches/unapplied/server/0540-Add-EntityLoadCrossbowEvent.patch rename to patches/server/0536-Add-EntityLoadCrossbowEvent.patch index 6ffab47e6e..f3ba09d03a 100644 --- a/patches/unapplied/server/0540-Add-EntityLoadCrossbowEvent.patch +++ b/patches/server/0536-Add-EntityLoadCrossbowEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityLoadCrossbowEvent diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java -index d86ec8c4c1c3e7974463a545d80ed9744de0fbbb..3b8629d31dc7bc66debe9c56593fbd071a6ddd11 100644 +index 48626d564c9fb4630b51858edd124b56af2d7ca0..caa5f5f5d58b8ddbca0910412b695cb810570623 100644 --- a/src/main/java/net/minecraft/world/item/CrossbowItem.java +++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java @@ -88,7 +88,14 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable { diff --git a/patches/unapplied/server/0541-Guardian-beam-workaround.patch b/patches/server/0537-Guardian-beam-workaround.patch similarity index 100% rename from patches/unapplied/server/0541-Guardian-beam-workaround.patch rename to patches/server/0537-Guardian-beam-workaround.patch diff --git a/patches/unapplied/server/0542-Added-WorldGameRuleChangeEvent.patch b/patches/server/0538-Added-WorldGameRuleChangeEvent.patch similarity index 92% rename from patches/unapplied/server/0542-Added-WorldGameRuleChangeEvent.patch rename to patches/server/0538-Added-WorldGameRuleChangeEvent.patch index d30f6720de..47bef1ca37 100644 --- a/patches/unapplied/server/0542-Added-WorldGameRuleChangeEvent.patch +++ b/patches/server/0538-Added-WorldGameRuleChangeEvent.patch @@ -18,10 +18,10 @@ index 1b66c33a55a9516269c80f5052fb103418b11367..745b8724b7536a5b2c2c94ae8fd703ea return t0.getCommandResult(); } diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java -index 17f8a46622b97b94e4b5da4c2c303e09a1162c21..392ab42d3c4fa6ef1815279a02b1fce236f725fa 100644 +index 694a2f685cb46a5391da012f4d7e3bd3e6e88f4c..fa8cd4438c19a262272da47985a57f7e84654f1b 100644 --- a/src/main/java/net/minecraft/world/level/GameRules.java +++ b/src/main/java/net/minecraft/world/level/GameRules.java -@@ -262,10 +262,10 @@ public class GameRules { +@@ -269,10 +269,10 @@ public class GameRules { this.type = type; } @@ -35,7 +35,7 @@ index 17f8a46622b97b94e4b5da4c2c303e09a1162c21..392ab42d3c4fa6ef1815279a02b1fce2 this.onChanged(((CommandSourceStack) context.getSource()).getServer()); } -@@ -323,8 +323,11 @@ public class GameRules { +@@ -330,8 +330,11 @@ public class GameRules { } @Override @@ -49,7 +49,7 @@ index 17f8a46622b97b94e4b5da4c2c303e09a1162c21..392ab42d3c4fa6ef1815279a02b1fce2 } public boolean get() { -@@ -388,8 +391,11 @@ public class GameRules { +@@ -395,8 +398,11 @@ public class GameRules { } @Override @@ -64,10 +64,10 @@ index 17f8a46622b97b94e4b5da4c2c303e09a1162c21..392ab42d3c4fa6ef1815279a02b1fce2 public int get() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ca768eea4f4ad7196f6f595516683b28372de71a..9bc547020f56ddbb766d31f27081a59f75ea2c1a 100644 +index 66d87216a3964c5fd39af564c3b4c40eee278c9a..2770412715a9fbd60317d356491f9f0b0bacf57d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1793,8 +1793,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1792,8 +1792,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!this.isGameRule(rule)) return false; @@ -82,7 +82,7 @@ index ca768eea4f4ad7196f6f595516683b28372de71a..9bc547020f56ddbb766d31f27081a59f handle.onChanged(this.getHandle().getServer()); return true; } -@@ -1829,8 +1834,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1828,8 +1833,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!this.isGameRule(rule.getName())) return false; diff --git a/patches/unapplied/server/0543-Added-ServerResourcesReloadedEvent.patch b/patches/server/0539-Added-ServerResourcesReloadedEvent.patch similarity index 85% rename from patches/unapplied/server/0543-Added-ServerResourcesReloadedEvent.patch rename to patches/server/0539-Added-ServerResourcesReloadedEvent.patch index da8dfb50f4..c1cde4e6a4 100644 --- a/patches/unapplied/server/0543-Added-ServerResourcesReloadedEvent.patch +++ b/patches/server/0539-Added-ServerResourcesReloadedEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added ServerResourcesReloadedEvent diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8a984036862c259b9b5b03665df3d78f8c965c19..17e0425a520bd95074bf34c262c36c5603266ea7 100644 +index f445f6d382c8fe3def980ed3f8517bbf3b75dfed..04137173ca7034b9dff37a68518e8b6fb0330188 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1988,7 +1988,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop reloadResources(Collection dataPacks, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause cause) { + // Paper end - RegistryAccess.Frozen iregistrycustom_dimension = this.registryAccess(); + RegistryAccess.Frozen iregistrycustom_dimension = this.registries.getAccessForLoading(RegistryLayer.RELOADABLE); CompletableFuture completablefuture = CompletableFuture.supplyAsync(() -> { Stream stream = dataPacks.stream(); // CraftBukkit - decompile error -@@ -2014,6 +2020,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop type, Level world) { super(type, world); diff --git a/patches/unapplied/server/0549-Empty-commands-shall-not-be-dispatched.patch b/patches/server/0545-Empty-commands-shall-not-be-dispatched.patch similarity index 84% rename from patches/unapplied/server/0549-Empty-commands-shall-not-be-dispatched.patch rename to patches/server/0545-Empty-commands-shall-not-be-dispatched.patch index 1c382dc0f6..a03ff3d97a 100644 --- a/patches/unapplied/server/0549-Empty-commands-shall-not-be-dispatched.patch +++ b/patches/server/0545-Empty-commands-shall-not-be-dispatched.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Empty commands shall not be dispatched diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index b141d251eedd31bd115342b878afd68dc51a8518..6ad3fe4718a0db17ad6115753e533bf069ce57c6 100644 +index feb9e827357b3ffb76dfff90350e513592441d8e..03a926990ecfa97d8fbc20a15ffb7fcb48fed06a 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -245,6 +245,7 @@ public class Commands { +@@ -253,6 +253,7 @@ public class Commands { command = event.getCommand(); String[] args = command.split(" "); diff --git a/patches/unapplied/server/0550-Implement-API-to-expose-exact-interaction-point.patch b/patches/server/0546-Implement-API-to-expose-exact-interaction-point.patch similarity index 93% rename from patches/unapplied/server/0550-Implement-API-to-expose-exact-interaction-point.patch rename to patches/server/0546-Implement-API-to-expose-exact-interaction-point.patch index a7f9d15f9f..d285450eae 100644 --- a/patches/unapplied/server/0550-Implement-API-to-expose-exact-interaction-point.patch +++ b/patches/server/0546-Implement-API-to-expose-exact-interaction-point.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement API to expose exact interaction point diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 1b45c1483a7ebad47162483b51036f9dfcdf62f6..32746dfbc2fdfc150583676b1bf0762398b76d75 100644 +index b0096fe5399397d4c5e170daa892aef017108c2f..645a226c2e3f6dcf1c25187d006d425038b4545d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -507,7 +507,7 @@ public class ServerPlayerGameMode { +@@ -509,7 +509,7 @@ public class ServerPlayerGameMode { cancelledBlock = true; } @@ -18,7 +18,7 @@ index 1b45c1483a7ebad47162483b51036f9dfcdf62f6..32746dfbc2fdfc150583676b1bf07623 this.interactResult = event.useItemInHand() == Event.Result.DENY; this.interactPosition = blockposition.immutable(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 2b480c1de5487febc9033fd96ed3eaffc0179fed..37e89f7103c1e28028ee3892e1b0123bf3dedd3f 100644 +index 13f97a07ccc1686b6660f60db4af5428f3247e3e..3a2dfd81f25c50ea7388bc68d37d59999187c645 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -56,7 +56,9 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams; diff --git a/patches/unapplied/server/0551-Remove-stale-POIs.patch b/patches/server/0547-Remove-stale-POIs.patch similarity index 86% rename from patches/unapplied/server/0551-Remove-stale-POIs.patch rename to patches/server/0547-Remove-stale-POIs.patch index 84d3bba9ae..0ceb90cdab 100644 --- a/patches/unapplied/server/0551-Remove-stale-POIs.patch +++ b/patches/server/0547-Remove-stale-POIs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove stale POIs diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 894d49d505b43b48013b7b404056a4bfe65b09c8..1bb87c81c57a8d28712ff82b8211b7cc2e32c2a6 100644 +index 145ccb0b4ae02fc4fd32552570315a8356bc3141..c7a79e8208f678c5ce94f3d5bf769565d6b3ff63 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1958,6 +1958,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1934,6 +1934,11 @@ public class ServerLevel extends Level implements WorldGenLevel { }); optional1.ifPresent((holder) -> { this.getServer().execute(() -> { diff --git a/patches/unapplied/server/0552-Fix-villager-boat-exploit.patch b/patches/server/0548-Fix-villager-boat-exploit.patch similarity index 88% rename from patches/unapplied/server/0552-Fix-villager-boat-exploit.patch rename to patches/server/0548-Fix-villager-boat-exploit.patch index c63ef19c4b..1ec2e0e395 100644 --- a/patches/unapplied/server/0552-Fix-villager-boat-exploit.patch +++ b/patches/server/0548-Fix-villager-boat-exploit.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix villager boat exploit diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index a26388bd15f26ea7712b9a84855b9aaf4d7aac06..631df93868512d2fba997f8e23b99762b56384ef 100644 +index a4338683d7d2a0d98121ee9e5b57a08883cc69a0..cd456e403fbeb9337c5c151b5c0333d14102cd2d 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -632,6 +632,14 @@ public abstract class PlayerList { +@@ -640,6 +640,14 @@ public abstract class PlayerList { PlayerList.LOGGER.debug("Removing player mount"); entityplayer.stopRiding(); entity.getPassengersAndSelf().forEach((entity1) -> { diff --git a/patches/unapplied/server/0553-Add-sendOpLevel-API.patch b/patches/server/0549-Add-sendOpLevel-API.patch similarity index 84% rename from patches/unapplied/server/0553-Add-sendOpLevel-API.patch rename to patches/server/0549-Add-sendOpLevel-API.patch index 3229761ac8..04ad234bd9 100644 --- a/patches/unapplied/server/0553-Add-sendOpLevel-API.patch +++ b/patches/server/0549-Add-sendOpLevel-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 631df93868512d2fba997f8e23b99762b56384ef..6868fc701d032295858bdd15d55f290e0bc9d537 100644 +index cd456e403fbeb9337c5c151b5c0333d14102cd2d..7f2e71d10006642297086806067b6e9c7cf21783 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1130,6 +1130,11 @@ public abstract class PlayerList { +@@ -1140,6 +1140,11 @@ public abstract class PlayerList { } private void sendPlayerPermissionLevel(ServerPlayer player, int permissionLevel) { @@ -20,7 +20,7 @@ index 631df93868512d2fba997f8e23b99762b56384ef..6868fc701d032295858bdd15d55f290e if (player.connection != null) { byte b0; -@@ -1144,8 +1149,10 @@ public abstract class PlayerList { +@@ -1154,8 +1159,10 @@ public abstract class PlayerList { player.connection.send(new ClientboundEntityEventPacket(player, b0)); } @@ -32,10 +32,10 @@ index 631df93868512d2fba997f8e23b99762b56384ef..6868fc701d032295858bdd15d55f290e public boolean isWhiteListed(GameProfile profile) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d425dd49cc023a703b283d31f541dfea0256822e..93b65c81dd57a09d3566f3be26926481ed37d959 100644 +index 56f3ce73eb018cb93e3ec2057794d31345872d8b..fa3cb1f97c23059ac5b848008af663fca9c3be53 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -651,6 +651,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -653,6 +653,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { ? (org.bukkit.entity.Firework) entity.getBukkitEntity() : null; } diff --git a/patches/unapplied/server/0554-Add-PaperRegistry.patch b/patches/server/0550-Add-PaperRegistry.patch similarity index 90% rename from patches/unapplied/server/0554-Add-PaperRegistry.patch rename to patches/server/0550-Add-PaperRegistry.patch index e3ec55a71b..8166ca2f79 100644 --- a/patches/unapplied/server/0554-Add-PaperRegistry.patch +++ b/patches/server/0550-Add-PaperRegistry.patch @@ -193,22 +193,22 @@ index 0000000000000000000000000000000000000000..6f39e343147803e15e7681c993b8797a +public record RegistryKey(Class apiClass, ResourceKey> resourceKey) { +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 17e0425a520bd95074bf34c262c36c5603266ea7..f05f5d13f23599dbb95a7062ebbb41334ec21f14 100644 +index 04137173ca7034b9dff37a68518e8b6fb0330188..9b1bde95e8303e5d4adfe92f09240df8e6323dac 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2020,6 +2020,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop layers = RegistryLayer.createRegistryAccess(); + layers = WorldLoader.loadAndReplaceLayer(resourceManager, layers, RegistryLayer.WORLDGEN, RegistryDataLoader.WORLDGEN_REGISTRIES); + REGISTRY_CUSTOM = layers.compositeAccess().freeze(); + // Paper start + try { + java.lang.reflect.Field field = io.papermc.paper.registry.PaperRegistry.class.getDeclaredField("REGISTRY_ACCESS"); @@ -238,5 +238,5 @@ index e73a9a957cd55bf838e301ed531295162f2cfb89..23435a5914a29ac4f87ad0f34ce83842 + } + // Paper end // Register vanilla pack - DATA_PACK = ReloadableServerResources.loadResources(resourceManager, REGISTRY_CUSTOM, Commands.CommandSelection.DEDICATED, 0, MoreExecutors.directExecutor(), MoreExecutors.directExecutor()).join(); + DATA_PACK = ReloadableServerResources.loadResources(resourceManager, REGISTRY_CUSTOM, FeatureFlags.REGISTRY.allFlags(), Commands.CommandSelection.DEDICATED, 0, MoreExecutors.directExecutor(), MoreExecutors.directExecutor()).join(); // Bind tags diff --git a/patches/unapplied/server/0555-Add-StructuresLocateEvent.patch b/patches/server/0551-Add-StructuresLocateEvent.patch similarity index 86% rename from patches/unapplied/server/0555-Add-StructuresLocateEvent.patch rename to patches/server/0551-Add-StructuresLocateEvent.patch index f7bf54d7de..71d684543e 100644 --- a/patches/unapplied/server/0555-Add-StructuresLocateEvent.patch +++ b/patches/server/0551-Add-StructuresLocateEvent.patch @@ -72,10 +72,10 @@ index 0000000000000000000000000000000000000000..423bf87ebda7ea266dc7b48cbfadbc85 + } +} diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -index 6e2185bbaac889d51a54ec97907da3b1faa465c4..c35bf0709e83e05c2135d7a5c98bf44c48d0c31f 100644 +index f6241ee705a3827df9d716f199fd070ab8605ea6..d916159abb9c817b57897e6ec8b65a2079bf8e18 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -@@ -295,6 +295,26 @@ public abstract class ChunkGenerator { +@@ -122,6 +122,26 @@ public abstract class ChunkGenerator { @Nullable public Pair> findNearestMapStructure(ServerLevel world, HolderSet structures, BlockPos center, int radius, boolean skipReferencedStructures) { @@ -99,16 +99,16 @@ index 6e2185bbaac889d51a54ec97907da3b1faa465c4..c35bf0709e83e05c2135d7a5c98bf44c + structures = HolderSet.direct(paperRegistry::getMinecraftHolder, event.getConfiguredStructures()); + } + // Paper end + ChunkGeneratorStructureState chunkgeneratorstructurestate = world.getChunkSource().getGeneratorState(); Map>> map = new Object2ObjectArrayMap(); Iterator iterator = structures.iterator(); - diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/Structure.java b/src/main/java/net/minecraft/world/level/levelgen/structure/Structure.java -index 737956b316c02e4ccdc6eef8de4a0a299d36b9ca..b8649eab719a1b71dc686386a8db756eefb9802e 100644 +index 8eaa1a57e904fe7e540b311c6c5c36b755f021fc..92730afcda6f779d0c440c7a8d50bb792b57d2d3 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/Structure.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/Structure.java -@@ -41,6 +41,7 @@ public abstract class Structure { - public static final Codec DIRECT_CODEC = Registry.STRUCTURE_TYPES.byNameCodec().dispatch(Structure::type, StructureType::codec); - public static final Codec> CODEC = RegistryFileCodec.create(Registry.STRUCTURE_REGISTRY, DIRECT_CODEC); +@@ -42,6 +42,7 @@ public abstract class Structure { + public static final Codec DIRECT_CODEC = BuiltInRegistries.STRUCTURE_TYPE.byNameCodec().dispatch(Structure::type, StructureType::codec); + public static final Codec> CODEC = RegistryFileCodec.create(Registries.STRUCTURE, DIRECT_CODEC); protected final Structure.StructureSettings settings; + static { io.papermc.paper.world.structure.PaperConfiguredStructure.init(); } // Paper @@ -212,3 +212,16 @@ index 0000000000000000000000000000000000000000..61efebe1d363b34e2043ccc4c6e28bb7 + System.setOut(out); + } +} +diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java +index 084c48ffabac2cd753609add745203e8a55bc09e..6c4689545b30d172850436a73eee58f9b8b49240 100644 +--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java ++++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java +@@ -51,7 +51,7 @@ public abstract class AbstractTestingBase { + REGISTRY_CUSTOM = layers.compositeAccess().freeze(); + // Paper start + try { +- java.lang.reflect.Field field = io.papermc.paper.registry.PaperRegistry.class.getDeclaredField("REGISTRY_ACCESS"); ++ java.lang.reflect.Field field = io.papermc.paper.registry.PaperRegistry.class.getDeclaredField("REGISTRgY_ACCESS"); + field.trySetAccessible(); + field.set(null, com.google.common.base.Suppliers.ofInstance(REGISTRY_CUSTOM)); + } catch (ReflectiveOperationException ex) { diff --git a/patches/unapplied/server/0556-Collision-option-for-requiring-a-player-participant.patch b/patches/server/0552-Collision-option-for-requiring-a-player-participant.patch similarity index 83% rename from patches/unapplied/server/0556-Collision-option-for-requiring-a-player-participant.patch rename to patches/server/0552-Collision-option-for-requiring-a-player-participant.patch index def70b66b5..e64717cad1 100644 --- a/patches/unapplied/server/0556-Collision-option-for-requiring-a-player-participant.patch +++ b/patches/server/0552-Collision-option-for-requiring-a-player-participant.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Collision option for requiring a player participant diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c22778e5155abf5dcfbf574ef633f253208f7e6c..0624f832f301ec2a36085e66f67b6a529583a496 100644 +index 7451ee1537c67a96dc33af13cf6ad43338434d43..b2c85ef84d5455cbdcb211af94a5046593d663c3 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1779,6 +1779,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1794,6 +1794,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public void push(Entity entity) { if (!this.isPassengerOfSameVehicle(entity)) { if (!entity.noPhysics && !this.noPhysics) { @@ -17,10 +17,10 @@ index c22778e5155abf5dcfbf574ef633f253208f7e6c..0624f832f301ec2a36085e66f67b6a52 double d1 = entity.getZ() - this.getZ(); double d2 = Mth.absMax(d0, d1); diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -index 4984b2b3294e425247b595bcf36812728fb4cd16..3f31a3c17ecca6e93b794478129b95ecff4e1a9c 100644 +index 8485a1a7d43a20d1326ff3a167fbb398f34efd87..fc95865a52e0bffaf55ca9f19e7e6005dcd2ae2e 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -@@ -833,6 +833,7 @@ public abstract class AbstractMinecart extends Entity { +@@ -832,6 +832,7 @@ public abstract class AbstractMinecart extends Entity { public void push(Entity entity) { if (!this.level.isClientSide) { if (!entity.noPhysics && !this.noPhysics) { @@ -29,10 +29,10 @@ index 4984b2b3294e425247b595bcf36812728fb4cd16..3f31a3c17ecca6e93b794478129b95ec // CraftBukkit start VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent((Vehicle) this.getBukkitEntity(), entity.getBukkitEntity()); diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java -index 8471c34d02ba5819580754f98ce8cc0b50a0b328..5641a7b5c5e3d93cddabd91703c6f001700c5869 100644 +index e9d968013c1d8bd00a8014384ef7164b57548fbd..e102410bd4c657a8bf0f55a3cbd5e8ec7e6306b0 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java -@@ -243,6 +243,7 @@ public class Boat extends Entity { +@@ -245,6 +245,7 @@ public class Boat extends Entity implements VariantHolder { @Override public void push(Entity entity) { diff --git a/patches/unapplied/server/0557-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch b/patches/server/0553-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch similarity index 87% rename from patches/unapplied/server/0557-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch rename to patches/server/0553-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch index 1af8b9fb5e..6da03846c0 100644 --- a/patches/unapplied/server/0557-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch +++ b/patches/server/0553-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch @@ -7,10 +7,10 @@ The duplicate ProjectileHitEvent in EntityFireball was removed. The event was always called before the duplicate call. diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java -index d71dc286673fa7ed708be5bec4c5a6868874c090..a603d99430aedb3c242c2833e0cc8a31aba49205 100644 +index 6dbbd129d05ad52008fb7b70cb1dc3b8818701ad..d73c10167c9100615cd5180f5e5d09b00f7bdc2a 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java -@@ -97,7 +97,7 @@ public abstract class AbstractHurtingProjectile extends Projectile { +@@ -98,7 +98,7 @@ public abstract class AbstractHurtingProjectile extends Projectile { // CraftBukkit start - Fire ProjectileHitEvent if (this.isRemoved()) { diff --git a/patches/unapplied/server/0558-Return-chat-component-with-empty-text-instead-of-thr.patch b/patches/server/0554-Return-chat-component-with-empty-text-instead-of-thr.patch similarity index 86% rename from patches/unapplied/server/0558-Return-chat-component-with-empty-text-instead-of-thr.patch rename to patches/server/0554-Return-chat-component-with-empty-text-instead-of-thr.patch index b83b5915fd..53bdf6212b 100644 --- a/patches/unapplied/server/0558-Return-chat-component-with-empty-text-instead-of-thr.patch +++ b/patches/server/0554-Return-chat-component-with-empty-text-instead-of-thr.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Return chat component with empty text instead of throwing diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -index 823ead0fd1942db0219968cd383439b324b16f6e..49b063655dfc09e30d446dbf07503fdda04a7e30 100644 +index 6f9d59256d34446c48e4df9dbc9351856101caa2..495c605b36e2e1430988030d6c44675e0aaffd2f 100644 --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -@@ -88,7 +88,12 @@ public abstract class AbstractContainerMenu { +@@ -89,7 +89,12 @@ public abstract class AbstractContainerMenu { } private Component title; public final Component getTitle() { diff --git a/patches/unapplied/server/0559-Make-schedule-command-per-world.patch b/patches/server/0555-Make-schedule-command-per-world.patch similarity index 100% rename from patches/unapplied/server/0559-Make-schedule-command-per-world.patch rename to patches/server/0555-Make-schedule-command-per-world.patch diff --git a/patches/unapplied/server/0560-Configurable-max-leash-distance.patch b/patches/server/0556-Configurable-max-leash-distance.patch similarity index 94% rename from patches/unapplied/server/0560-Configurable-max-leash-distance.patch rename to patches/server/0556-Configurable-max-leash-distance.patch index ba76f79b7f..aad84993f9 100644 --- a/patches/unapplied/server/0560-Configurable-max-leash-distance.patch +++ b/patches/server/0556-Configurable-max-leash-distance.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable max leash distance diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java -index 3db309e709cd72e3aae184ff2f8b1a7b98f2c7a8..15f56707a1f06f5c33f231a15a6c5f4b4a85cb4e 100644 +index bffec7fdf49994f702ea4c378237dac0983d0a19..56d64f3836391fabfa9d3362d9bd62182ea6e290 100644 --- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java +++ b/src/main/java/net/minecraft/world/entity/PathfinderMob.java @@ -48,7 +48,7 @@ public abstract class PathfinderMob extends Mob { diff --git a/patches/unapplied/server/0561-Implement-BlockPreDispenseEvent.patch b/patches/server/0557-Implement-BlockPreDispenseEvent.patch similarity index 95% rename from patches/unapplied/server/0561-Implement-BlockPreDispenseEvent.patch rename to patches/server/0557-Implement-BlockPreDispenseEvent.patch index 14852682e6..54b07d1507 100644 --- a/patches/unapplied/server/0561-Implement-BlockPreDispenseEvent.patch +++ b/patches/server/0557-Implement-BlockPreDispenseEvent.patch @@ -17,7 +17,7 @@ index 85c5319837295bd2f85baebfe8d6660b267f1d5f..8f55d0753fa26924235c943595f0d1a0 tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack)); } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 37e89f7103c1e28028ee3892e1b0123bf3dedd3f..81490d62c49c0fc4aba6ec50aa4eafaf103c8ee6 100644 +index 3a2dfd81f25c50ea7388bc68d37d59999187c645..8c4211306b16031c58e407381965d0fe5223e1a8 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1876,5 +1876,11 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0562-Added-firing-of-PlayerChangeBeaconEffectEvent.patch b/patches/server/0558-Added-firing-of-PlayerChangeBeaconEffectEvent.patch similarity index 95% rename from patches/unapplied/server/0562-Added-firing-of-PlayerChangeBeaconEffectEvent.patch rename to patches/server/0558-Added-firing-of-PlayerChangeBeaconEffectEvent.patch index 2f90dea41c..97e3a198b8 100644 --- a/patches/unapplied/server/0562-Added-firing-of-PlayerChangeBeaconEffectEvent.patch +++ b/patches/server/0558-Added-firing-of-PlayerChangeBeaconEffectEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Added firing of PlayerChangeBeaconEffectEvent diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index 995a43ddcce8afb64404ef85641badd8035c6e3c..64e1571fab5f07cfe1b5203b36754f536b303f27 100644 +index 5e6582110c97287f0a2ed6e8d1a8f5e1ee2c81e5..eaf8ad2f704467bcba596d1c848dfdb75849e934 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -158,13 +158,27 @@ public class BeaconMenu extends AbstractContainerMenu { diff --git a/patches/unapplied/server/0563-Add-toggle-for-always-placing-the-dragon-egg.patch b/patches/server/0559-Add-toggle-for-always-placing-the-dragon-egg.patch similarity index 88% rename from patches/unapplied/server/0563-Add-toggle-for-always-placing-the-dragon-egg.patch rename to patches/server/0559-Add-toggle-for-always-placing-the-dragon-egg.patch index caffaecf90..c3ddac9816 100644 --- a/patches/unapplied/server/0563-Add-toggle-for-always-placing-the-dragon-egg.patch +++ b/patches/server/0559-Add-toggle-for-always-placing-the-dragon-egg.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add toggle for always placing the dragon egg diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index 3e1e8b42f963fab17e416760b93e7c1c0a9a7f45..42dc41311e9bc716dcd88f90cbbf533884bf92a3 100644 +index ed0d1d6285556f0949a7ea81ad692b663ec191a7..1ee1b757b90ae0d080aa57f4186228a6f4279c1f 100644 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -@@ -368,7 +368,7 @@ public class EndDragonFight { +@@ -370,7 +370,7 @@ public class EndDragonFight { this.dragonEvent.setVisible(false); this.spawnExitPortal(true); this.spawnNewGateway(); diff --git a/patches/unapplied/server/0564-Added-PlayerStonecutterRecipeSelectEvent.patch b/patches/server/0560-Added-PlayerStonecutterRecipeSelectEvent.patch similarity index 97% rename from patches/unapplied/server/0564-Added-PlayerStonecutterRecipeSelectEvent.patch rename to patches/server/0560-Added-PlayerStonecutterRecipeSelectEvent.patch index 1c6497d193..d1e5fa1165 100644 --- a/patches/unapplied/server/0564-Added-PlayerStonecutterRecipeSelectEvent.patch +++ b/patches/server/0560-Added-PlayerStonecutterRecipeSelectEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Added PlayerStonecutterRecipeSelectEvent Co-Authored-By: MiniDigger diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java -index b47dc7671fab2117b989d647d7e8e36d12af5f76..d4f71422b25f70abfe50481d6071abea6ad147c0 100644 +index 4ee54e3a61588e5574e3f7ba06a73bbd73975957..b9f54fe9473b563e16bb5998f6082061b7dac567 100644 --- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java +++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java @@ -62,7 +62,7 @@ public class StonecutterMenu extends AbstractContainerMenu { diff --git a/patches/unapplied/server/0565-Add-dropLeash-variable-to-EntityUnleashEvent.patch b/patches/server/0561-Add-dropLeash-variable-to-EntityUnleashEvent.patch similarity index 92% rename from patches/unapplied/server/0565-Add-dropLeash-variable-to-EntityUnleashEvent.patch rename to patches/server/0561-Add-dropLeash-variable-to-EntityUnleashEvent.patch index fc222ef2b8..6805915037 100644 --- a/patches/unapplied/server/0565-Add-dropLeash-variable-to-EntityUnleashEvent.patch +++ b/patches/server/0561-Add-dropLeash-variable-to-EntityUnleashEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add dropLeash variable to EntityUnleashEvent diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index b9db51b07ba3b867d80a48e5106c2b38ea0b72ee..965dd5564d64c094ffc1347621a45d50c6c5f1e3 100644 +index 7caae84b23ba0803458b4497a116e0b8cee26a89..c092164eb9e634d4844cb079d291bb0d7af9f76c 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1248,12 +1248,15 @@ public abstract class Mob extends LivingEntity { +@@ -1266,12 +1266,15 @@ public abstract class Mob extends LivingEntity { return InteractionResult.PASS; } else if (this.getLeashHolder() == player) { // CraftBukkit start - fire PlayerUnleashEntityEvent @@ -26,7 +26,7 @@ index b9db51b07ba3b867d80a48e5106c2b38ea0b72ee..965dd5564d64c094ffc1347621a45d50 return InteractionResult.sidedSuccess(this.level.isClientSide); } else { InteractionResult enuminteractionresult = this.checkAndHandleImportantInteractions(player, hand); -@@ -1416,8 +1419,11 @@ public abstract class Mob extends LivingEntity { +@@ -1438,8 +1441,11 @@ public abstract class Mob extends LivingEntity { if (this.leashHolder != null) { if (!this.isAlive() || !this.leashHolder.isAlive()) { @@ -40,7 +40,7 @@ index b9db51b07ba3b867d80a48e5106c2b38ea0b72ee..965dd5564d64c094ffc1347621a45d50 } } -@@ -1480,8 +1486,11 @@ public abstract class Mob extends LivingEntity { +@@ -1502,8 +1508,11 @@ public abstract class Mob extends LivingEntity { boolean flag1 = super.startRiding(entity, force); if (flag1 && this.isLeashed()) { @@ -54,7 +54,7 @@ index b9db51b07ba3b867d80a48e5106c2b38ea0b72ee..965dd5564d64c094ffc1347621a45d50 } return flag1; -@@ -1659,8 +1668,11 @@ public abstract class Mob extends LivingEntity { +@@ -1691,8 +1700,11 @@ public abstract class Mob extends LivingEntity { @Override protected void removeAfterChangingDimensions() { super.removeAfterChangingDimensions(); @@ -69,7 +69,7 @@ index b9db51b07ba3b867d80a48e5106c2b38ea0b72ee..965dd5564d64c094ffc1347621a45d50 if (!itemstack.isEmpty()) itemstack.setCount(0); // CraftBukkit }); diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java -index 15f56707a1f06f5c33f231a15a6c5f4b4a85cb4e..f5cb3576aa2560c86f4a1df9d51d8ecde4e98905 100644 +index 56d64f3836391fabfa9d3362d9bd62182ea6e290..e49fb8be7d3975506a6c39c87cace664e45b3c86 100644 --- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java +++ b/src/main/java/net/minecraft/world/entity/PathfinderMob.java @@ -49,8 +49,11 @@ public abstract class PathfinderMob extends Mob { @@ -101,10 +101,10 @@ index 15f56707a1f06f5c33f231a15a6c5f4b4a85cb4e..f5cb3576aa2560c86f4a1df9d51d8ecd } else if (f > 6.0F) { double d0 = (entity.getX() - this.getX()) / (double) f; diff --git a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java -index bbfd099634c6cceb0afcc7bbe2f26b872a1506c3..c076a2e42579b94c1667654913f722f5cc57a27f 100644 +index 88c7e494051bc3d2c134167318f3eb84abaa2125..6672ca0e82048c23405845a8f5df49acec1b49e5 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java +++ b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java -@@ -122,11 +122,14 @@ public class LeashFenceKnotEntity extends HangingEntity { +@@ -123,11 +123,14 @@ public class LeashFenceKnotEntity extends HangingEntity { entityinsentient = (Mob) iterator.next(); if (entityinsentient.isLeashed() && entityinsentient.getLeashHolder() == this) { // CraftBukkit start @@ -122,7 +122,7 @@ index bbfd099634c6cceb0afcc7bbe2f26b872a1506c3..c076a2e42579b94c1667654913f722f5 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 81490d62c49c0fc4aba6ec50aa4eafaf103c8ee6..bf0e01bdcce6e5b682518f35f0239b97e57713ae 100644 +index 8c4211306b16031c58e407381965d0fe5223e1a8..e29fef212f7db7e1d4ec3e3f43758c9866389765 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1517,8 +1517,10 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0566-Reset-shield-blocking-on-dimension-change.patch b/patches/server/0562-Reset-shield-blocking-on-dimension-change.patch similarity index 83% rename from patches/unapplied/server/0566-Reset-shield-blocking-on-dimension-change.patch rename to patches/server/0562-Reset-shield-blocking-on-dimension-change.patch index 6fdfb3f1c2..6d927a4872 100644 --- a/patches/unapplied/server/0566-Reset-shield-blocking-on-dimension-change.patch +++ b/patches/server/0562-Reset-shield-blocking-on-dimension-change.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset shield blocking on dimension change diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e74d4523caa4d2d4b33e22145f7b2dcb63dba9fc..781bad6dd4279eddeaa2d55eaf513ef725729d26 100644 +index c3ad00123198dc00bcf5a3d89f8d527b1c9c083c..c288075547cea04e0a1aba66b496c8bd5c2acd42 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1166,6 +1166,11 @@ public class ServerPlayer extends Player { +@@ -1188,6 +1188,11 @@ public class ServerPlayer extends Player { this.level.getCraftServer().getPluginManager().callEvent(changeEvent); // CraftBukkit end } diff --git a/patches/unapplied/server/0567-add-DragonEggFormEvent.patch b/patches/server/0563-add-DragonEggFormEvent.patch similarity index 93% rename from patches/unapplied/server/0567-add-DragonEggFormEvent.patch rename to patches/server/0563-add-DragonEggFormEvent.patch index 40273bbb47..7e39c25a22 100644 --- a/patches/unapplied/server/0567-add-DragonEggFormEvent.patch +++ b/patches/server/0563-add-DragonEggFormEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add DragonEggFormEvent diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index 42dc41311e9bc716dcd88f90cbbf533884bf92a3..99b175625c79fe5c4d944810e3fe11be5eed997f 100644 +index 1ee1b757b90ae0d080aa57f4186228a6f4279c1f..abd13cefd3d8409e1ef8ea70d92877f76f89da6c 100644 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -@@ -368,9 +368,23 @@ public class EndDragonFight { +@@ -370,9 +370,23 @@ public class EndDragonFight { this.dragonEvent.setVisible(false); this.spawnExitPortal(true); this.spawnNewGateway(); diff --git a/patches/unapplied/server/0568-EntityMoveEvent.patch b/patches/server/0564-EntityMoveEvent.patch similarity index 88% rename from patches/unapplied/server/0568-EntityMoveEvent.patch rename to patches/server/0564-EntityMoveEvent.patch index ebc7d0fc79..1e52d63b52 100644 --- a/patches/unapplied/server/0568-EntityMoveEvent.patch +++ b/patches/server/0564-EntityMoveEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] EntityMoveEvent diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f05f5d13f23599dbb95a7062ebbb41334ec21f14..2f8026fffde9976e28d3263cbc4296a51fce8221 100644 +index 9b1bde95e8303e5d4adfe92f09240df8e6323dac..c22db75f87424e9b1dd2ae017619c0e2faee6901 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1489,6 +1489,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper @@ -17,10 +17,10 @@ index f05f5d13f23599dbb95a7062ebbb41334ec21f14..2f8026fffde9976e28d3263cbc4296a5 this.profiler.push(() -> { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 1bb87c81c57a8d28712ff82b8211b7cc2e32c2a6..38b2b6b1a3068abd6432d866fe582935d144fb89 100644 +index c7a79e8208f678c5ce94f3d5bf769565d6b3ff63..c576f94ee4f562b2f871af6c241031fd765353ff 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -217,6 +217,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -220,6 +220,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper @@ -29,10 +29,10 @@ index 1bb87c81c57a8d28712ff82b8211b7cc2e32c2a6..38b2b6b1a3068abd6432d866fe582935 final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date()); io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a01a6a2c869a973eb044fdb2084f151954599075..39d3fecfa120aaae98237417b7ea0e9123085183 100644 +index abf18757ed70bcbe9eecb88b18670089153b2a0a..53c2643136ef8902205c2fb2463f8bde6aeb8159 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3306,6 +3306,20 @@ public abstract class LivingEntity extends Entity { +@@ -3327,6 +3327,20 @@ public abstract class LivingEntity extends Entity { this.pushEntities(); this.level.getProfiler().pop(); diff --git a/patches/unapplied/server/0569-added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/0565-added-option-to-disable-pathfinding-updates-on-block.patch similarity index 80% rename from patches/unapplied/server/0569-added-option-to-disable-pathfinding-updates-on-block.patch rename to patches/server/0565-added-option-to-disable-pathfinding-updates-on-block.patch index 35840c7090..04fedaaefb 100644 --- a/patches/unapplied/server/0569-added-option-to-disable-pathfinding-updates-on-block.patch +++ b/patches/server/0565-added-option-to-disable-pathfinding-updates-on-block.patch @@ -5,10 +5,10 @@ Subject: [PATCH] added option to disable pathfinding updates on block changes diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 38b2b6b1a3068abd6432d866fe582935d144fb89..dc3c519542e40a9645fd21cc91bbebc5e1285e3a 100644 +index c576f94ee4f562b2f871af6c241031fd765353ff..835fda071197f9d7b929e015fbd9b143d13856d5 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1532,6 +1532,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1515,6 +1515,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } this.getChunkSource().blockChanged(pos); @@ -16,7 +16,7 @@ index 38b2b6b1a3068abd6432d866fe582935d144fb89..dc3c519542e40a9645fd21cc91bbebc5 VoxelShape voxelshape = oldState.getCollisionShape(this, pos); VoxelShape voxelshape1 = newState.getCollisionShape(this, pos); -@@ -1573,6 +1574,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1556,6 +1557,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } diff --git a/patches/unapplied/server/0570-Inline-shift-direction-fields.patch b/patches/server/0566-Inline-shift-direction-fields.patch similarity index 92% rename from patches/unapplied/server/0570-Inline-shift-direction-fields.patch rename to patches/server/0566-Inline-shift-direction-fields.patch index d4353368a2..1282c9fa03 100644 --- a/patches/unapplied/server/0570-Inline-shift-direction-fields.patch +++ b/patches/server/0566-Inline-shift-direction-fields.patch @@ -7,7 +7,7 @@ Removes a layer of indirection for EnumDirection.getAdjacent(X|Y|Z)(), which is critical section for much of the server, including the lighting engine. diff --git a/src/main/java/net/minecraft/core/Direction.java b/src/main/java/net/minecraft/core/Direction.java -index d23c679485641ee1b21b7c457dccdec8f4baa792..a3bbebcdaea9e0dfddd9825272f84fc76cd13e89 100644 +index f068fa6843ce5cff7625fb99e84b7102b785bd51..c1172ba542bc07e0c780a50d5b4ce26ac04c1720 100644 --- a/src/main/java/net/minecraft/core/Direction.java +++ b/src/main/java/net/minecraft/core/Direction.java @@ -61,6 +61,11 @@ public enum Direction implements StringRepresentable { @@ -34,7 +34,7 @@ index d23c679485641ee1b21b7c457dccdec8f4baa792..a3bbebcdaea9e0dfddd9825272f84fc7 } public static Direction[] orderedByNearest(Entity entity) { -@@ -362,15 +372,15 @@ public enum Direction implements StringRepresentable { +@@ -357,15 +367,15 @@ public enum Direction implements StringRepresentable { } public int getStepX() { diff --git a/patches/unapplied/server/0571-Allow-adding-items-to-BlockDropItemEvent.patch b/patches/server/0567-Allow-adding-items-to-BlockDropItemEvent.patch similarity index 95% rename from patches/unapplied/server/0571-Allow-adding-items-to-BlockDropItemEvent.patch rename to patches/server/0567-Allow-adding-items-to-BlockDropItemEvent.patch index 9dc2ff3234..6035412e8c 100644 --- a/patches/unapplied/server/0571-Allow-adding-items-to-BlockDropItemEvent.patch +++ b/patches/server/0567-Allow-adding-items-to-BlockDropItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow adding items to BlockDropItemEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index bf0e01bdcce6e5b682518f35f0239b97e57713ae..2faefc58ac600fb6b374ef87c6f8f378d3883594 100644 +index e29fef212f7db7e1d4ec3e3f43758c9866389765..8f248352fa17d96a5d64d0ad52e4de61beee0a62 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -399,13 +399,30 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0572-Add-getMainThreadExecutor-to-BukkitScheduler.patch b/patches/server/0568-Add-getMainThreadExecutor-to-BukkitScheduler.patch similarity index 100% rename from patches/unapplied/server/0572-Add-getMainThreadExecutor-to-BukkitScheduler.patch rename to patches/server/0568-Add-getMainThreadExecutor-to-BukkitScheduler.patch diff --git a/patches/unapplied/server/0573-living-entity-allow-attribute-registration.patch b/patches/server/0569-living-entity-allow-attribute-registration.patch similarity index 85% rename from patches/unapplied/server/0573-living-entity-allow-attribute-registration.patch rename to patches/server/0569-living-entity-allow-attribute-registration.patch index 65829db430..1484dcb12b 100644 --- a/patches/unapplied/server/0573-living-entity-allow-attribute-registration.patch +++ b/patches/server/0569-living-entity-allow-attribute-registration.patch @@ -5,10 +5,10 @@ Subject: [PATCH] living entity allow attribute registration diff --git a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java -index bd078de8ed93d7325ad204789c765c689f8df939..692524a69d43dcf52ae1b0f7f593fc53f3878137 100644 +index 03561cb69c58e4ed8115a9e67df28d5df1f79bc4..dd1102d5291ef6f18e82400a6d8a0a376cc071e9 100644 --- a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java +++ b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java -@@ -132,4 +132,12 @@ public class AttributeMap { +@@ -150,4 +150,12 @@ public class AttributeMap { } } @@ -22,10 +22,10 @@ index bd078de8ed93d7325ad204789c765c689f8df939..692524a69d43dcf52ae1b0f7f593fc53 + } diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java -index 46c313d581b9af6aa0a48f97ae3cc800a88535f2..07d700382fc356837045c46d320b7b69ad13af68 100644 +index 233e372ba5d785352c9ac12dac37395bac63315c..0e61caa5c9f21788fbeaa90ed75d23e10b816aac 100644 --- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java +++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java -@@ -38,6 +38,14 @@ public class CraftAttributeMap implements Attributable { +@@ -39,6 +39,14 @@ public class CraftAttributeMap implements Attributable { return (nms == null) ? null : new CraftAttributeInstance(nms, attribute); } @@ -38,7 +38,7 @@ index 46c313d581b9af6aa0a48f97ae3cc800a88535f2..07d700382fc356837045c46d320b7b69 + // Paper end + public static net.minecraft.world.entity.ai.attributes.Attribute toMinecraft(Attribute attribute) { - return net.minecraft.core.Registry.ATTRIBUTE.get(CraftNamespacedKey.toMinecraft(attribute.getKey())); + return BuiltInRegistries.ATTRIBUTE.get(CraftNamespacedKey.toMinecraft(attribute.getKey())); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 6d2acbe95f5ebe41c82d1e99c28f15a46b65a9db..c3d701f58feb503aa073b30df3999e0c7a081a6a 100644 diff --git a/patches/unapplied/server/0574-fix-dead-slime-setSize-invincibility.patch b/patches/server/0570-fix-dead-slime-setSize-invincibility.patch similarity index 100% rename from patches/unapplied/server/0574-fix-dead-slime-setSize-invincibility.patch rename to patches/server/0570-fix-dead-slime-setSize-invincibility.patch diff --git a/patches/unapplied/server/0575-Merchant-getRecipes-should-return-an-immutable-list.patch b/patches/server/0571-Merchant-getRecipes-should-return-an-immutable-list.patch similarity index 100% rename from patches/unapplied/server/0575-Merchant-getRecipes-should-return-an-immutable-list.patch rename to patches/server/0571-Merchant-getRecipes-should-return-an-immutable-list.patch diff --git a/patches/unapplied/server/0576-Add-support-for-hex-color-codes-in-console.patch b/patches/server/0572-Add-support-for-hex-color-codes-in-console.patch similarity index 99% rename from patches/unapplied/server/0576-Add-support-for-hex-color-codes-in-console.patch rename to patches/server/0572-Add-support-for-hex-color-codes-in-console.patch index fdaea8bb39..4188045b8b 100644 --- a/patches/unapplied/server/0576-Add-support-for-hex-color-codes-in-console.patch +++ b/patches/server/0572-Add-support-for-hex-color-codes-in-console.patch @@ -283,10 +283,10 @@ index 0000000000000000000000000000000000000000..b9922b07cb105618390187d98acdf89e + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2f8026fffde9976e28d3263cbc4296a51fce8221..64dd0211ac2ceed34dba900b5af3a56ac5a4a65a 100644 +index c22db75f87424e9b1dd2ae017619c0e2faee6901..194f00dac49c54809d7a1dcccc9c2844399c5b0a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1682,7 +1682,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop) recipe.map(CampfireCookingRecipe::toBukkitRecipe).orElse(null)); // Paper - world.getCraftServer().getPluginManager().callEvent(blockCookEvent); + world.getCraftServer().getPluginManager().callEvent(blockCookEvent); - if (blockCookEvent.isCancelled()) { + if (blockCookEvent.isCancelled()) { diff --git a/patches/unapplied/server/0587-Add-Block-isValidTool.patch b/patches/server/0583-Add-Block-isValidTool.patch similarity index 79% rename from patches/unapplied/server/0587-Add-Block-isValidTool.patch rename to patches/server/0583-Add-Block-isValidTool.patch index 95bf6c3432..f7df2710ac 100644 --- a/patches/unapplied/server/0587-Add-Block-isValidTool.patch +++ b/patches/server/0583-Add-Block-isValidTool.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Block#isValidTool diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 817d7143fb60916a6747ee4b9f7c77becd9071c1..1bd1f5993fc296b7d8255cabaf28382c2e258099 100644 +index 1def5d8c61d78c1d9ccacafdbf8a16072cf75c6a..8c5f9f2bb0c200a5ef7ad09b27afa6dad057c6f8 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -718,5 +718,9 @@ public class CraftBlock implements Block { +@@ -720,5 +720,9 @@ public class CraftBlock implements Block { } return speed; } diff --git a/patches/unapplied/server/0588-Allow-using-signs-inside-spawn-protection.patch b/patches/server/0584-Allow-using-signs-inside-spawn-protection.patch similarity index 56% rename from patches/unapplied/server/0588-Allow-using-signs-inside-spawn-protection.patch rename to patches/server/0584-Allow-using-signs-inside-spawn-protection.patch index d08ec6896b..57fce15e50 100644 --- a/patches/unapplied/server/0588-Allow-using-signs-inside-spawn-protection.patch +++ b/patches/server/0584-Allow-using-signs-inside-spawn-protection.patch @@ -5,15 +5,15 @@ Subject: [PATCH] Allow using signs inside spawn protection diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4083f437704e586bfc1cf1e321f0b44febf7c44b..bdd268acc850f92b27ff6035ee577f16894608a7 100644 +index b5b451ce6f29c69123b975a7b1943ca17388e6db..5a815f4a3c9ac38994d2046fccd77b536a32a425 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1844,7 +1844,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - int i = this.player.level.getMaxBuildHeight(); +@@ -1839,7 +1839,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + int i = this.player.level.getMaxBuildHeight(); - if (blockposition.getY() < i) { -- if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.mayInteract(this.player, blockposition)) { + if (blockposition.getY() < i) { +- if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.mayInteract(this.player, blockposition)) { + if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.mayInteract(this.player, blockposition) || (worldserver.paperConfig().spawn.allowUsingSignsInsideSpawnProtection && worldserver.getBlockState(blockposition).getBlock() instanceof net.minecraft.world.level.block.SignBlock))) { // Paper - sign check - this.player.stopUsingItem(); // CraftBukkit - SPIGOT-4706 - InteractionResult enuminteractionresult = this.player.gameMode.useItemOn(this.player, worldserver, itemstack, enumhand, movingobjectpositionblock); + this.player.stopUsingItem(); // CraftBukkit - SPIGOT-4706 + InteractionResult enuminteractionresult = this.player.gameMode.useItemOn(this.player, worldserver, itemstack, enumhand, movingobjectpositionblock); diff --git a/patches/unapplied/server/0589-Expand-world-key-API.patch b/patches/server/0585-Expand-world-key-API.patch similarity index 75% rename from patches/unapplied/server/0589-Expand-world-key-API.patch rename to patches/server/0585-Expand-world-key-API.patch index 82098b9936..23e342231e 100644 --- a/patches/unapplied/server/0589-Expand-world-key-API.patch +++ b/patches/server/0585-Expand-world-key-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expand world key API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index ee5e59c37301d9a806e2f696d52d9d217b232833..bb5d22125b6cd4e60d2b7e2e00af158c9ea22cd9 100644 +index 3e4ac4020c9f51e634eadd43243d34267bea4b22..ce52ae980309ecddf597e14b759b77ea76af7748 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -@@ -938,5 +938,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor { +@@ -944,5 +944,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor { public io.papermc.paper.world.MoonPhase getMoonPhase() { return io.papermc.paper.world.MoonPhase.getPhase(this.getHandle().dayTime() / 24000L); } @@ -20,10 +20,10 @@ index ee5e59c37301d9a806e2f696d52d9d217b232833..bb5d22125b6cd4e60d2b7e2e00af158c // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 462ffe647b11185001a08b09e74773b8831a3b46..e90ef57567928fdfd08fd16ce84503b07bdfe499 100644 +index 81120251dc65290a731e25662bf484637f546ac1..56898b9302fa2c5515be88e5f8c41759149685e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1143,9 +1143,15 @@ public final class CraftServer implements Server { +@@ -1156,9 +1156,15 @@ public final class CraftServer implements Server { File folder = new File(this.getWorldContainer(), name); World world = this.getWorld(name); @@ -41,23 +41,23 @@ index 462ffe647b11185001a08b09e74773b8831a3b46..e90ef57567928fdfd08fd16ce84503b0 if ((folder.exists()) && (!folder.isDirectory())) { throw new IllegalArgumentException("File exists with the name '" + name + "' and isn't a folder"); -@@ -1220,7 +1226,7 @@ public final class CraftServer implements Server { +@@ -1244,7 +1250,7 @@ public final class CraftServer implements Server { } else if (name.equals(levelName + "_the_end")) { worldKey = net.minecraft.world.level.Level.END; } else { -- worldKey = ResourceKey.create(net.minecraft.core.Registry.DIMENSION_REGISTRY, new ResourceLocation(name.toLowerCase(java.util.Locale.ENGLISH))); -+ worldKey = ResourceKey.create(net.minecraft.core.Registry.DIMENSION_REGISTRY, new net.minecraft.resources.ResourceLocation(creator.key().getNamespace().toLowerCase(java.util.Locale.ENGLISH), creator.key().getKey().toLowerCase(java.util.Locale.ENGLISH))); // Paper +- worldKey = ResourceKey.create(Registries.DIMENSION, new ResourceLocation(name.toLowerCase(java.util.Locale.ENGLISH))); ++ worldKey = ResourceKey.create(Registries.DIMENSION, new net.minecraft.resources.ResourceLocation(creator.key().getNamespace().toLowerCase(java.util.Locale.ENGLISH), creator.key().getKey().toLowerCase(java.util.Locale.ENGLISH))); // Paper } ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11), -@@ -1312,6 +1318,15 @@ public final class CraftServer implements Server { +@@ -1336,6 +1342,15 @@ public final class CraftServer implements Server { return null; } + // Paper start + @Override + public World getWorld(NamespacedKey worldKey) { -+ ServerLevel worldServer = console.getLevel(ResourceKey.create(net.minecraft.core.Registry.DIMENSION_REGISTRY, CraftNamespacedKey.toMinecraft(worldKey))); ++ ServerLevel worldServer = console.getLevel(ResourceKey.create(net.minecraft.core.registries.Registries.DIMENSION, CraftNamespacedKey.toMinecraft(worldKey))); + if (worldServer == null) return null; + return worldServer.getWorld(); + } @@ -67,10 +67,10 @@ index 462ffe647b11185001a08b09e74773b8831a3b46..e90ef57567928fdfd08fd16ce84503b0 // Check if a World already exists with the UID. if (this.getWorld(world.getUID()) != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 55301058555e0062aa349ff91cdd11c4be49ec55..2f00fa822e72b38ad2f15ed84ffa1f3998667177 100644 +index 29a151bb161623bc2544a4ae57fe2f68577d1b5a..f5943a84b99a794e54568a0d6d8ade7f7f9e4aa8 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -522,6 +522,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -520,6 +520,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public Registry registryFor(Class classOfT) { return io.papermc.paper.registry.PaperRegistry.getRegistry(classOfT); } diff --git a/patches/unapplied/server/0590-Add-fast-alternative-constructor-for-Rotations.patch b/patches/server/0586-Add-fast-alternative-constructor-for-Rotations.patch similarity index 100% rename from patches/unapplied/server/0590-Add-fast-alternative-constructor-for-Rotations.patch rename to patches/server/0586-Add-fast-alternative-constructor-for-Rotations.patch diff --git a/patches/unapplied/server/0591-Item-Rarity-API.patch b/patches/server/0587-Item-Rarity-API.patch similarity index 94% rename from patches/unapplied/server/0591-Item-Rarity-API.patch rename to patches/server/0587-Item-Rarity-API.patch index 2eb7a72cb1..20943b1573 100644 --- a/patches/unapplied/server/0591-Item-Rarity-API.patch +++ b/patches/server/0587-Item-Rarity-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Item Rarity API public net.minecraft.world.item.Item rarity diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 2f00fa822e72b38ad2f15ed84ffa1f3998667177..1f511696a21bee2ada502b5f0389368f25c45e5a 100644 +index f5943a84b99a794e54568a0d6d8ade7f7f9e4aa8..be178adcf1d21787f2c673b17ba1383fc7869388 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -527,6 +527,20 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -525,6 +525,20 @@ public final class CraftMagicNumbers implements UnsafeValues { public String getMainLevelName() { return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName; } diff --git a/patches/unapplied/server/0593-copy-TESign-isEditable-from-snapshots.patch b/patches/server/0588-copy-TESign-isEditable-from-snapshots.patch similarity index 79% rename from patches/unapplied/server/0593-copy-TESign-isEditable-from-snapshots.patch rename to patches/server/0588-copy-TESign-isEditable-from-snapshots.patch index 766607080f..e438c4025a 100644 --- a/patches/unapplied/server/0593-copy-TESign-isEditable-from-snapshots.patch +++ b/patches/server/0588-copy-TESign-isEditable-from-snapshots.patch @@ -5,10 +5,10 @@ Subject: [PATCH] copy TESign#isEditable from snapshots diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java -index a0950f5902c3719dc31205ec43dca9482278c744..dfd5d05830d3892e1d640149d1aa9d70d6f8a66b 100644 +index cdc9474d37028324d39037a456be07fd4f576a6e..548f0676fc42523d6b64f3186508ef004c3a7f9e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java -@@ -115,6 +115,7 @@ public class CraftSign extends CraftBlockEntityState implements +@@ -115,6 +115,7 @@ public class CraftSign extends CraftBlockEntityState< } // Paper end } diff --git a/patches/unapplied/server/0594-Drop-carried-item-when-player-has-disconnected.patch b/patches/server/0589-Drop-carried-item-when-player-has-disconnected.patch similarity index 88% rename from patches/unapplied/server/0594-Drop-carried-item-when-player-has-disconnected.patch rename to patches/server/0589-Drop-carried-item-when-player-has-disconnected.patch index 82e12eaa72..51269f0aed 100644 --- a/patches/unapplied/server/0594-Drop-carried-item-when-player-has-disconnected.patch +++ b/patches/server/0589-Drop-carried-item-when-player-has-disconnected.patch @@ -7,10 +7,10 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro Closes #5036 diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 4b8dc6c6c24774df4dbc1b38611152ac7a3b2fa6..10c23d1f89661b88dc8383c6846ba5ad972c43d2 100644 +index cb995a9492cbc9702804d7b62a711ea0b7618deb..8e4dcdfbbd6be8a571f1e1a2a5b452108db2ac12 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -625,6 +625,14 @@ public abstract class PlayerList { +@@ -633,6 +633,14 @@ public abstract class PlayerList { } // Paper end diff --git a/patches/unapplied/server/0595-forced-whitelist-use-configurable-kick-message.patch b/patches/server/0590-forced-whitelist-use-configurable-kick-message.patch similarity index 87% rename from patches/unapplied/server/0595-forced-whitelist-use-configurable-kick-message.patch rename to patches/server/0590-forced-whitelist-use-configurable-kick-message.patch index 788882418e..937ad223b2 100644 --- a/patches/unapplied/server/0595-forced-whitelist-use-configurable-kick-message.patch +++ b/patches/server/0590-forced-whitelist-use-configurable-kick-message.patch @@ -5,10 +5,10 @@ Subject: [PATCH] forced whitelist: use configurable kick message diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 64dd0211ac2ceed34dba900b5af3a56ac5a4a65a..4c405e699fc77766d6731e51a2fc03997232c9be 100644 +index 194f00dac49c54809d7a1dcccc9c2844399c5b0a..d5cd8d540438638268cc26e2fc9be8415950ee22 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2109,7 +2109,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements EntityTypeTest { +@@ -618,9 +618,20 @@ public class EntityType implements FeatureElement, EntityTypeT final Spliterator spliterator = entityNbtList.spliterator(); return StreamSupport.stream(new Spliterator() { diff --git a/patches/unapplied/server/0598-Expose-protocol-version.patch b/patches/server/0593-Expose-protocol-version.patch similarity index 85% rename from patches/unapplied/server/0598-Expose-protocol-version.patch rename to patches/server/0593-Expose-protocol-version.patch index 5f05bd2005..7ab07b8287 100644 --- a/patches/unapplied/server/0598-Expose-protocol-version.patch +++ b/patches/server/0593-Expose-protocol-version.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 1f511696a21bee2ada502b5f0389368f25c45e5a..69ea448975077a1c254185925987bcd9599d252a 100644 +index be178adcf1d21787f2c673b17ba1383fc7869388..36b80af06ba50f1a34f2c5812976308f1c525f2c 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -541,6 +541,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -539,6 +539,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public io.papermc.paper.inventory.ItemRarity getItemStackRarity(org.bukkit.inventory.ItemStack itemStack) { return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()]; } diff --git a/patches/unapplied/server/0599-Enhance-console-tab-completions-for-brigadier-comman.patch b/patches/server/0594-Enhance-console-tab-completions-for-brigadier-comman.patch similarity index 98% rename from patches/unapplied/server/0599-Enhance-console-tab-completions-for-brigadier-comman.patch rename to patches/server/0594-Enhance-console-tab-completions-for-brigadier-comman.patch index 591a6921f3..45270f8c43 100644 --- a/patches/unapplied/server/0599-Enhance-console-tab-completions-for-brigadier-comman.patch +++ b/patches/server/0594-Enhance-console-tab-completions-for-brigadier-comman.patch @@ -208,10 +208,10 @@ index 0000000000000000000000000000000000000000..dd9d77d7c7f1a5a130a1f4c15e5b1e68 + public void setErrorIndex(final int errorIndex) {} +} diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index b32820ead6d5f9c78f3b6dee3c598060e371dbd6..df17422d17053e400ff14ef92b2d4aa61bf6d06d 100644 +index cc885fd0eb19516d3864a43c2e4ae785950c5ba6..cf3db466459490fd09d9c82238f413a0cc24ab80 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -178,7 +178,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -173,7 +173,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface thread.setDaemon(true); thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER)); @@ -220,7 +220,7 @@ index b32820ead6d5f9c78f3b6dee3c598060e371dbd6..df17422d17053e400ff14ef92b2d4aa6 DedicatedServer.LOGGER.info("Starting minecraft server version {}", SharedConstants.getCurrentVersion().getName()); if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) { DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\""); -@@ -210,6 +210,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -205,6 +205,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface this.getPlayerList().loadAndSaveFiles(); // Must be after convertNames // Paper end - moved up org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); diff --git a/patches/unapplied/server/0600-Fix-PlayerItemConsumeEvent-cancelling-properly.patch b/patches/server/0595-Fix-PlayerItemConsumeEvent-cancelling-properly.patch similarity index 88% rename from patches/unapplied/server/0600-Fix-PlayerItemConsumeEvent-cancelling-properly.patch rename to patches/server/0595-Fix-PlayerItemConsumeEvent-cancelling-properly.patch index 0b0b417b58..183d69e2a8 100644 --- a/patches/unapplied/server/0600-Fix-PlayerItemConsumeEvent-cancelling-properly.patch +++ b/patches/server/0595-Fix-PlayerItemConsumeEvent-cancelling-properly.patch @@ -9,10 +9,10 @@ till their item is switched. This patch clears the active item when the event is cancelled diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 39d3fecfa120aaae98237417b7ea0e9123085183..d8aee7c5980055d32960aa1af80fcf4353481b88 100644 +index 53c2643136ef8902205c2fb2463f8bde6aeb8159..5690e6447209f0a74806ce1193dfa36b21042c9f 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3789,6 +3789,7 @@ public abstract class LivingEntity extends Entity { +@@ -3814,6 +3814,7 @@ public abstract class LivingEntity extends Entity { level.getCraftServer().getPluginManager().callEvent(event); if (event.isCancelled()) { diff --git a/patches/unapplied/server/0601-Add-bypass-host-check.patch b/patches/server/0596-Add-bypass-host-check.patch similarity index 100% rename from patches/unapplied/server/0601-Add-bypass-host-check.patch rename to patches/server/0596-Add-bypass-host-check.patch diff --git a/patches/unapplied/server/0602-Set-area-affect-cloud-rotation.patch b/patches/server/0597-Set-area-affect-cloud-rotation.patch similarity index 87% rename from patches/unapplied/server/0602-Set-area-affect-cloud-rotation.patch rename to patches/server/0597-Set-area-affect-cloud-rotation.patch index 08e992b45c..88ee454c71 100644 --- a/patches/unapplied/server/0602-Set-area-affect-cloud-rotation.patch +++ b/patches/server/0597-Set-area-affect-cloud-rotation.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Set area affect cloud rotation diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index bb5d22125b6cd4e60d2b7e2e00af158c9ea22cd9..84d84ceda1855bd1d11b2917c16fdb845a7600fe 100644 +index ce52ae980309ecddf597e14b759b77ea76af7748..6c627e3f2c34557e11232fb0c5fa4f1718018ef5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -@@ -919,6 +919,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor { +@@ -925,6 +925,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor { entity.moveTo(location.getX(), location.getY(), location.getZ()); } else if (AreaEffectCloud.class.isAssignableFrom(clazz)) { entity = new net.minecraft.world.entity.AreaEffectCloud(world, x, y, z); diff --git a/patches/unapplied/server/0603-add-isDeeplySleeping-to-HumanEntity.patch b/patches/server/0598-add-isDeeplySleeping-to-HumanEntity.patch similarity index 100% rename from patches/unapplied/server/0603-add-isDeeplySleeping-to-HumanEntity.patch rename to patches/server/0598-add-isDeeplySleeping-to-HumanEntity.patch diff --git a/patches/unapplied/server/0604-add-consumeFuel-to-FurnaceBurnEvent.patch b/patches/server/0599-add-consumeFuel-to-FurnaceBurnEvent.patch similarity index 86% rename from patches/unapplied/server/0604-add-consumeFuel-to-FurnaceBurnEvent.patch rename to patches/server/0599-add-consumeFuel-to-FurnaceBurnEvent.patch index 0c37516dd7..1925461940 100644 --- a/patches/unapplied/server/0604-add-consumeFuel-to-FurnaceBurnEvent.patch +++ b/patches/server/0599-add-consumeFuel-to-FurnaceBurnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add consumeFuel to FurnaceBurnEvent diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index 9a40839ccedd6a39c2b8755e29f31a4f626fe15d..4977f3fad3bfc12fd4c5f9fbe8beea2895247c57 100644 +index 0aa436da54050db81bdcb9f447660a880286c2de..1e2af7d3a6d2ad0a298d2f6ac2d8110354282988 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -@@ -363,7 +363,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -357,7 +357,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit if (blockEntity.isLit() && furnaceBurnEvent.isBurning()) { // CraftBukkit end flag1 = true; diff --git a/patches/unapplied/server/0605-add-get-set-drop-chance-to-EntityEquipment.patch b/patches/server/0600-add-get-set-drop-chance-to-EntityEquipment.patch similarity index 100% rename from patches/unapplied/server/0605-add-get-set-drop-chance-to-EntityEquipment.patch rename to patches/server/0600-add-get-set-drop-chance-to-EntityEquipment.patch diff --git a/patches/unapplied/server/0606-fix-PigZombieAngerEvent-cancellation.patch b/patches/server/0601-fix-PigZombieAngerEvent-cancellation.patch similarity index 80% rename from patches/unapplied/server/0606-fix-PigZombieAngerEvent-cancellation.patch rename to patches/server/0601-fix-PigZombieAngerEvent-cancellation.patch index df4e7b0b17..c259f75104 100644 --- a/patches/unapplied/server/0606-fix-PigZombieAngerEvent-cancellation.patch +++ b/patches/server/0601-fix-PigZombieAngerEvent-cancellation.patch @@ -5,18 +5,18 @@ Subject: [PATCH] fix PigZombieAngerEvent cancellation diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java -index 58d49da3f95f8cd5d61da199ddba1100c411276e..d0567234d1261227d29bb254f959604dc91b3c72 100644 +index 9620449fb938ad0029b1d126431f15a2994fe332..b75945807b425609394c343da56c316a769f0a29 100644 --- a/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java -@@ -52,6 +52,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { - private static final int ALERT_RANGE_Y = 10; - private static final UniformInt ALERT_INTERVAL = TimeUtil.rangeOfSeconds(4, 6); +@@ -56,6 +56,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { private int ticksUntilNextAlert; + private static final float ZOMBIFIED_PIGLIN_EYE_HEIGHT = 1.79F; + private static final float ZOMBIFIED_PIGLIN_BABY_EYE_HEIGHT_ADJUSTMENT = 0.82F; + private HurtByTargetGoal pathfinderGoalHurtByTarget; // Paper public ZombifiedPiglin(EntityType type, Level world) { super(type, world); -@@ -72,7 +73,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +@@ -76,7 +77,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { protected void addBehaviourGoals() { this.goalSelector.addGoal(2, new ZombieAttackGoal(this, 1.0D, false)); this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0D)); @@ -25,7 +25,7 @@ index 58d49da3f95f8cd5d61da199ddba1100c411276e..d0567234d1261227d29bb254f959604d this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt)); this.targetSelector.addGoal(3, new ResetUniversalAngerTargetGoal<>(this, true)); } -@@ -175,6 +176,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +@@ -184,6 +185,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { this.level.getCraftServer().getPluginManager().callEvent(event); if (event.isCancelled()) { this.setPersistentAngerTarget(null); diff --git a/patches/unapplied/server/0607-Fix-checkReach-check-for-Shulker-boxes.patch b/patches/server/0602-Fix-checkReach-check-for-Shulker-boxes.patch similarity index 89% rename from patches/unapplied/server/0607-Fix-checkReach-check-for-Shulker-boxes.patch rename to patches/server/0602-Fix-checkReach-check-for-Shulker-boxes.patch index e63651a68f..aff97b0125 100644 --- a/patches/unapplied/server/0607-Fix-checkReach-check-for-Shulker-boxes.patch +++ b/patches/server/0602-Fix-checkReach-check-for-Shulker-boxes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix checkReach check for Shulker boxes diff --git a/src/main/java/net/minecraft/world/inventory/ShulkerBoxMenu.java b/src/main/java/net/minecraft/world/inventory/ShulkerBoxMenu.java -index e9cf1ebdfdd363b588b0f7679f1533bc9c2eb844..3991ef6319030e155cb3363f73e67a2bb6ab384f 100644 +index 9923bc95e2268ea4af3d4e8b75fbb83195012ea1..8d18f6debb694962f3ea8056a7563f71e8684afa 100644 --- a/src/main/java/net/minecraft/world/inventory/ShulkerBoxMenu.java +++ b/src/main/java/net/minecraft/world/inventory/ShulkerBoxMenu.java @@ -66,6 +66,7 @@ public class ShulkerBoxMenu extends AbstractContainerMenu { diff --git a/patches/unapplied/server/0608-fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/0603-fix-PlayerItemHeldEvent-firing-twice.patch similarity index 88% rename from patches/unapplied/server/0608-fix-PlayerItemHeldEvent-firing-twice.patch rename to patches/server/0603-fix-PlayerItemHeldEvent-firing-twice.patch index e331fd28df..b24d36383c 100644 --- a/patches/unapplied/server/0608-fix-PlayerItemHeldEvent-firing-twice.patch +++ b/patches/server/0603-fix-PlayerItemHeldEvent-firing-twice.patch @@ -5,10 +5,10 @@ Subject: [PATCH] fix PlayerItemHeldEvent firing twice diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6e04920319740d31111d17800bb0e577cda8627f..27b3a9476e4c1d75d19f1e6f52ee98140bfa73dd 100644 +index 3e9036a0d38a503d798d27bdbd33c90a46fdca52..f91e849349dc6bf47e2c9cde17fa6aaf7d382cc5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2054,6 +2054,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2051,6 +2051,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (this.player.isImmobile()) return; // CraftBukkit if (packet.getSlot() >= 0 && packet.getSlot() < Inventory.getSelectionSize()) { diff --git a/patches/unapplied/server/0609-Added-PlayerDeepSleepEvent.patch b/patches/server/0604-Added-PlayerDeepSleepEvent.patch similarity index 85% rename from patches/unapplied/server/0609-Added-PlayerDeepSleepEvent.patch rename to patches/server/0604-Added-PlayerDeepSleepEvent.patch index 7813956e8c..df9c305204 100644 --- a/patches/unapplied/server/0609-Added-PlayerDeepSleepEvent.patch +++ b/patches/server/0604-Added-PlayerDeepSleepEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added PlayerDeepSleepEvent diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 8f9a5589e430c31de29d23d6c27757dd33e8bb86..350d6a987fcebde60154e8ffde9372490090075d 100644 +index 3563f5d893fb650892ca7231767d505b7a17c8c0..a591211e8ad46401ae91f0198bb2f06b2e2074dd 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -254,6 +254,11 @@ public abstract class Player extends LivingEntity { +@@ -248,6 +248,11 @@ public abstract class Player extends LivingEntity { if (this.isSleeping()) { ++this.sleepCounter; diff --git a/patches/unapplied/server/0610-More-World-API.patch b/patches/server/0605-More-World-API.patch similarity index 96% rename from patches/unapplied/server/0610-More-World-API.patch rename to patches/server/0605-More-World-API.patch index d46322280d..292c7ebc7f 100644 --- a/patches/unapplied/server/0610-More-World-API.patch +++ b/patches/server/0605-More-World-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More World API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 9bc547020f56ddbb766d31f27081a59f75ea2c1a..c801ba30f7d5fc891adc3dad7ee8e2d78e7ac359 100644 +index 2770412715a9fbd60317d356491f9f0b0bacf57d..ac8f0b163b6b2c7eefb8dd24a878112367b13566 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2035,6 +2035,65 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2034,6 +2034,65 @@ public class CraftWorld extends CraftRegionAccessor implements World { return new CraftStructureSearchResult(CraftStructure.minecraftToBukkit(found.getSecond().value(), this.getHandle().registryAccess()), new Location(this, found.getFirst().getX(), found.getFirst().getY(), found.getFirst().getZ())); } diff --git a/patches/unapplied/server/0611-Added-PlayerBedFailEnterEvent.patch b/patches/server/0606-Added-PlayerBedFailEnterEvent.patch similarity index 93% rename from patches/unapplied/server/0611-Added-PlayerBedFailEnterEvent.patch rename to patches/server/0606-Added-PlayerBedFailEnterEvent.patch index ad6eaeb223..0b9eeaf0aa 100644 --- a/patches/unapplied/server/0611-Added-PlayerBedFailEnterEvent.patch +++ b/patches/server/0606-Added-PlayerBedFailEnterEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added PlayerBedFailEnterEvent diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java -index 006541834811c20fbdef42d4ad299da1dc046d33..654a859a37bf991c7a7fa8a44a3d20f8feb223db 100644 +index 3929438f999ed6d88593880378e1e3a11790377f..f1a7c5202d4efbfaf5d88609d243f25f6817ecbe 100644 --- a/src/main/java/net/minecraft/world/level/block/BedBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java -@@ -110,14 +110,23 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock +@@ -111,14 +111,23 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock BlockPos finalblockposition = pos; // CraftBukkit end player.startSleepInBed(pos).ifLeft((entityhuman_enumbedresult) -> { diff --git a/patches/unapplied/server/0612-Implement-methods-to-convert-between-Component-and-B.patch b/patches/server/0607-Implement-methods-to-convert-between-Component-and-B.patch similarity index 93% rename from patches/unapplied/server/0612-Implement-methods-to-convert-between-Component-and-B.patch rename to patches/server/0607-Implement-methods-to-convert-between-Component-and-B.patch index 41ed1d375d..ae9be1ce8a 100644 --- a/patches/unapplied/server/0612-Implement-methods-to-convert-between-Component-and-B.patch +++ b/patches/server/0607-Implement-methods-to-convert-between-Component-and-B.patch @@ -42,10 +42,10 @@ index 0000000000000000000000000000000000000000..dd6012b6a097575b2d1471be5069ecce + } +} diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index df17422d17053e400ff14ef92b2d4aa61bf6d06d..e11d90ca94e9ec34f4593cf0dde2f5853bef7ae5 100644 +index cf3db466459490fd09d9c82238f413a0cc24ab80..8eb18e794845a2e7df5e7e6bc11134e4d132e06e 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -214,6 +214,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -209,6 +209,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface io.papermc.paper.command.PaperCommands.registerCommands(this); com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now diff --git a/patches/unapplied/server/0613-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/patches/server/0608-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch similarity index 86% rename from patches/unapplied/server/0613-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch rename to patches/server/0608-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch index ad7a356e26..4de652cecf 100644 --- a/patches/unapplied/server/0613-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch +++ b/patches/server/0608-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix anchor respawn acting as a bed respawn from the end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 10c23d1f89661b88dc8383c6846ba5ad972c43d2..2f085e1dea44760a13b059051dd32e1b83ce64a8 100644 +index 8e4dcdfbbd6be8a571f1e1a2a5b452108db2ac12..866f68e95a51ea3beabac2d5fa29bc249106e9d4 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -858,6 +858,7 @@ public abstract class PlayerList { +@@ -866,6 +866,7 @@ public abstract class PlayerList { // Paper start boolean isBedSpawn = false; @@ -17,7 +17,7 @@ index 10c23d1f89661b88dc8383c6846ba5ad972c43d2..2f085e1dea44760a13b059051dd32e1b boolean isRespawn = false; boolean isLocAltered = false; // Paper - Fix SPIGOT-5989 // Paper end -@@ -878,6 +879,7 @@ public abstract class PlayerList { +@@ -886,6 +887,7 @@ public abstract class PlayerList { if (optional.isPresent()) { BlockState iblockdata = worldserver1.getBlockState(blockposition); boolean flag3 = iblockdata.is(Blocks.RESPAWN_ANCHOR); @@ -25,7 +25,7 @@ index 10c23d1f89661b88dc8383c6846ba5ad972c43d2..2f085e1dea44760a13b059051dd32e1b Vec3 vec3d = (Vec3) optional.get(); float f1; -@@ -906,7 +908,7 @@ public abstract class PlayerList { +@@ -914,7 +916,7 @@ public abstract class PlayerList { } Player respawnPlayer = entityplayer1.getBukkitEntity(); diff --git a/patches/unapplied/server/0614-Introduce-beacon-activation-deactivation-events.patch b/patches/server/0609-Introduce-beacon-activation-deactivation-events.patch similarity index 85% rename from patches/unapplied/server/0614-Introduce-beacon-activation-deactivation-events.patch rename to patches/server/0609-Introduce-beacon-activation-deactivation-events.patch index 53321c5633..e814102c8f 100644 --- a/patches/unapplied/server/0614-Introduce-beacon-activation-deactivation-events.patch +++ b/patches/server/0609-Introduce-beacon-activation-deactivation-events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Introduce beacon activation/deactivation events diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index d60cd642f905776cab9412b72f0fde0ed6a071fe..bb4ab75ec0e7a5d71dafeeb55e26d2204455e7a1 100644 +index ab4e5c08e51f5ed1cddf8295944cd54b19f401c0..49ca1d45bb4b3ddafc1d5952ff9830ba69b745e2 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -210,6 +210,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -212,6 +212,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name BeaconBlockEntity.playSound(world, pos, SoundEvents.BEACON_AMBIENT); } } @@ -24,7 +24,7 @@ index d60cd642f905776cab9412b72f0fde0ed6a071fe..bb4ab75ec0e7a5d71dafeeb55e26d220 if (blockEntity.lastCheckY >= l) { blockEntity.lastCheckY = world.getMinBuildHeight() - 1; -@@ -267,6 +276,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -269,6 +278,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name @Override public void setRemoved() { diff --git a/patches/unapplied/server/0615-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0610-add-RespawnFlags-to-PlayerRespawnEvent.patch similarity index 89% rename from patches/unapplied/server/0615-add-RespawnFlags-to-PlayerRespawnEvent.patch rename to patches/server/0610-add-RespawnFlags-to-PlayerRespawnEvent.patch index 4819d08133..37182d6c1d 100644 --- a/patches/unapplied/server/0615-add-RespawnFlags-to-PlayerRespawnEvent.patch +++ b/patches/server/0610-add-RespawnFlags-to-PlayerRespawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add RespawnFlags to PlayerRespawnEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 27b3a9476e4c1d75d19f1e6f52ee98140bfa73dd..c326ce013828a68d5edc14efeabce3464475daa9 100644 +index f91e849349dc6bf47e2c9cde17fa6aaf7d382cc5..266a4c248ef8dc7b73c07f1cb46ad5155471a2d5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2895,7 +2895,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2762,7 +2762,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic case PERFORM_RESPAWN: if (this.player.wonGame) { this.player.wonGame = false; @@ -18,10 +18,10 @@ index 27b3a9476e4c1d75d19f1e6f52ee98140bfa73dd..c326ce013828a68d5edc14efeabce346 } else { if (this.player.getHealth() > 0.0F) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 2f085e1dea44760a13b059051dd32e1b83ce64a8..ee78edd11164f106b5ecf5645072bef7f9f28459 100644 +index 866f68e95a51ea3beabac2d5fa29bc249106e9d4..16210f30249ecc83c92e0374f7821693a9fd27c1 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -817,6 +817,12 @@ public abstract class PlayerList { +@@ -825,6 +825,12 @@ public abstract class PlayerList { } public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation) { @@ -34,7 +34,7 @@ index 2f085e1dea44760a13b059051dd32e1b83ce64a8..ee78edd11164f106b5ecf5645072bef7 entityplayer.stopRiding(); // CraftBukkit this.players.remove(entityplayer); this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot -@@ -908,7 +914,7 @@ public abstract class PlayerList { +@@ -916,7 +922,7 @@ public abstract class PlayerList { } Player respawnPlayer = entityplayer1.getBukkitEntity(); diff --git a/patches/unapplied/server/0616-Add-Channel-initialization-listeners.patch b/patches/server/0611-Add-Channel-initialization-listeners.patch similarity index 100% rename from patches/unapplied/server/0616-Add-Channel-initialization-listeners.patch rename to patches/server/0611-Add-Channel-initialization-listeners.patch diff --git a/patches/unapplied/server/0617-Send-empty-commands-if-tab-completion-is-disabled.patch b/patches/server/0612-Send-empty-commands-if-tab-completion-is-disabled.patch similarity index 88% rename from patches/unapplied/server/0617-Send-empty-commands-if-tab-completion-is-disabled.patch rename to patches/server/0612-Send-empty-commands-if-tab-completion-is-disabled.patch index e31efa98f9..a526cb6034 100644 --- a/patches/unapplied/server/0617-Send-empty-commands-if-tab-completion-is-disabled.patch +++ b/patches/server/0612-Send-empty-commands-if-tab-completion-is-disabled.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Send empty commands if tab completion is disabled diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 6ad3fe4718a0db17ad6115753e533bf069ce57c6..9c0b2679964f864671ff4041163d1065c8d9cf84 100644 +index 03a926990ecfa97d8fbc20a15ffb7fcb48fed06a..7e61f0cb96c7697fc3487fd941cacc15d78a14dc 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -358,7 +358,12 @@ public class Commands { +@@ -366,7 +366,12 @@ public class Commands { } public void sendCommands(ServerPlayer player) { diff --git a/patches/unapplied/server/0618-Add-more-WanderingTrader-API.patch b/patches/server/0613-Add-more-WanderingTrader-API.patch similarity index 97% rename from patches/unapplied/server/0618-Add-more-WanderingTrader-API.patch rename to patches/server/0613-Add-more-WanderingTrader-API.patch index a541485c99..293d7b97db 100644 --- a/patches/unapplied/server/0618-Add-more-WanderingTrader-API.patch +++ b/patches/server/0613-Add-more-WanderingTrader-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more WanderingTrader API diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -index d6c583d668abdc9302ccedba42b9b4e2f6180c56..8a4107067938f7ca990a7edd1e271d57cfdb0545 100644 +index e594cf4b8084b7448c29208a2070e766e391713d..e92e6fb4cf97f4d5406b5b5d5786bfa5fb55f536 100644 --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java @@ -56,6 +56,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill diff --git a/patches/unapplied/server/0619-Add-EntityBlockStorage-clearEntities.patch b/patches/server/0614-Add-EntityBlockStorage-clearEntities.patch similarity index 100% rename from patches/unapplied/server/0619-Add-EntityBlockStorage-clearEntities.patch rename to patches/server/0614-Add-EntityBlockStorage-clearEntities.patch diff --git a/patches/unapplied/server/0620-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch b/patches/server/0615-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch similarity index 100% rename from patches/unapplied/server/0620-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch rename to patches/server/0615-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch diff --git a/patches/unapplied/server/0621-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch b/patches/server/0616-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch similarity index 90% rename from patches/unapplied/server/0621-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch rename to patches/server/0616-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch index 472212e61a..8a369c8efc 100644 --- a/patches/unapplied/server/0621-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch +++ b/patches/server/0616-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add raw address to AsyncPlayerPreLoginEvent diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 8eec59b01b8366a0ee8c926d9bf77b22a8d75cb7..fa469313d4b38bd9441b3010743e1054420bd525 100644 +index 3042af47778f5d6c878a7a734a8eb92e952c01a8..7661f248c1c0b8de3b15793f45bf239ab561083b 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -370,12 +370,13 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -331,12 +331,13 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, public void fireEvents() throws Exception { String playerName = ServerLoginPacketListenerImpl.this.gameProfile.getName(); java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(); diff --git a/patches/unapplied/server/0622-Inventory-close.patch b/patches/server/0617-Inventory-close.patch similarity index 84% rename from patches/unapplied/server/0622-Inventory-close.patch rename to patches/server/0617-Inventory-close.patch index e7f478324a..1f12887569 100644 --- a/patches/unapplied/server/0622-Inventory-close.patch +++ b/patches/server/0617-Inventory-close.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Inventory#close diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index b17dab9e5c06d8789553b104602d7da35d926dd1..30ac442049088200e9ab77a561c59cbc58aaa28f 100644 +index 7271cf41d9ad153ce10b5b5e08ebcdbb3bc65be9..59457378820d7f2899254a6aeef4c30c926ce543 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -@@ -448,6 +448,14 @@ public class CraftInventory implements Inventory { +@@ -449,6 +449,14 @@ public class CraftInventory implements Inventory { this.clear(i); } } diff --git a/patches/unapplied/server/0623-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/server/0618-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch similarity index 100% rename from patches/unapplied/server/0623-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch rename to patches/server/0618-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch diff --git a/patches/unapplied/server/0624-Fix-CraftPotionBrewer-cache.patch b/patches/server/0619-Fix-CraftPotionBrewer-cache.patch similarity index 100% rename from patches/unapplied/server/0624-Fix-CraftPotionBrewer-cache.patch rename to patches/server/0619-Fix-CraftPotionBrewer-cache.patch diff --git a/patches/unapplied/server/0625-Add-basic-Datapack-API.patch b/patches/server/0620-Add-basic-Datapack-API.patch similarity index 94% rename from patches/unapplied/server/0625-Add-basic-Datapack-API.patch rename to patches/server/0620-Add-basic-Datapack-API.patch index f241afe9c5..d1255596ec 100644 --- a/patches/unapplied/server/0625-Add-basic-Datapack-API.patch +++ b/patches/server/0620-Add-basic-Datapack-API.patch @@ -92,10 +92,10 @@ index 0000000000000000000000000000000000000000..cf4374493c11057451a62a655514415c + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e90ef57567928fdfd08fd16ce84503b07bdfe499..c330d63cc8d40092fdf70e5aea6f6ee9e8521e88 100644 +index 56898b9302fa2c5515be88e5f8c41759149685e1..67d33a6825f8f0caa3b40cb46defa83a509bdf08 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -282,6 +282,7 @@ public final class CraftServer implements Server { +@@ -295,6 +295,7 @@ public final class CraftServer implements Server { public boolean ignoreVanillaPermissions = false; private final List playerView; public int reloadCount; @@ -103,7 +103,7 @@ index e90ef57567928fdfd08fd16ce84503b07bdfe499..c330d63cc8d40092fdf70e5aea6f6ee9 public static Exception excessiveVelEx; // Paper - Velocity warnings static { -@@ -368,6 +369,7 @@ public final class CraftServer implements Server { +@@ -381,6 +382,7 @@ public final class CraftServer implements Server { if (this.configuration.getBoolean("settings.use-map-color-cache")) { MapPalette.setMapColorCache(new CraftMapColorCache(this.logger)); } @@ -111,7 +111,7 @@ index e90ef57567928fdfd08fd16ce84503b07bdfe499..c330d63cc8d40092fdf70e5aea6f6ee9 } public boolean getCommandBlockOverride(String command) { -@@ -2770,5 +2772,11 @@ public final class CraftServer implements Server { +@@ -2794,5 +2796,11 @@ public final class CraftServer implements Server { public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() { return mobGoals; } diff --git a/patches/unapplied/server/0626-Add-environment-variable-to-disable-server-gui.patch b/patches/server/0621-Add-environment-variable-to-disable-server-gui.patch similarity index 85% rename from patches/unapplied/server/0626-Add-environment-variable-to-disable-server-gui.patch rename to patches/server/0621-Add-environment-variable-to-disable-server-gui.patch index 49bb358278..7606f71f2d 100644 --- a/patches/unapplied/server/0626-Add-environment-variable-to-disable-server-gui.patch +++ b/patches/server/0621-Add-environment-variable-to-disable-server-gui.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add environment variable to disable server gui diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 13ef3bb2b84fac9a1be72b09e7e3c022fa08221a..2f82002c52af7304ff6b2d6fe8f094314daf0bba 100644 +index 727efbe152dccabf130a6871e3d2582a5a733016..2dba2853764ca1cff114d3130672fbd596604ea3 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -284,6 +284,7 @@ public class Main { +@@ -281,6 +281,7 @@ public class Main { */ boolean flag1 = !optionset.has("nogui") && !optionset.nonOptionArguments().contains("nogui"); diff --git a/patches/unapplied/server/0627-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0622-additions-to-PlayerGameModeChangeEvent.patch similarity index 85% rename from patches/unapplied/server/0627-additions-to-PlayerGameModeChangeEvent.patch rename to patches/server/0622-additions-to-PlayerGameModeChangeEvent.patch index e9c6ccf855..905480b311 100644 --- a/patches/unapplied/server/0627-additions-to-PlayerGameModeChangeEvent.patch +++ b/patches/server/0622-additions-to-PlayerGameModeChangeEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] additions to PlayerGameModeChangeEvent diff --git a/src/main/java/net/minecraft/server/commands/DefaultGameModeCommands.java b/src/main/java/net/minecraft/server/commands/DefaultGameModeCommands.java -index d446e52aa0951af5f759fa7a91908f4d818bd4a5..3fcdc509649b3d67bfd74404bcdf8d7a65c1babf 100644 +index 2e4fd72da147393581027fc35702d6c3fd989765..1bf4c5b36f53ef1e71d50d1a9af8e1410e5dff60 100644 --- a/src/main/java/net/minecraft/server/commands/DefaultGameModeCommands.java +++ b/src/main/java/net/minecraft/server/commands/DefaultGameModeCommands.java -@@ -31,9 +31,13 @@ public class DefaultGameModeCommands { +@@ -25,9 +25,13 @@ public class DefaultGameModeCommands { GameType gameType = minecraftServer.getForcedGameType(); if (gameType != null) { for(ServerPlayer serverPlayer : minecraftServer.getPlayerList().getPlayers()) { @@ -25,10 +25,10 @@ index d446e52aa0951af5f759fa7a91908f4d818bd4a5..3fcdc509649b3d67bfd74404bcdf8d7a } diff --git a/src/main/java/net/minecraft/server/commands/GameModeCommand.java b/src/main/java/net/minecraft/server/commands/GameModeCommand.java -index 65089c0e78c9913a92ae9c66d664f48e2112ad92..7882ee2b7813d437d3b7580f046f38e79fc9e7b6 100644 +index d47f3d255eddd652fedb4aa55286b756fe962995..27c0aaf123c3e945eb24e8a3892bd8ac42115733 100644 --- a/src/main/java/net/minecraft/server/commands/GameModeCommand.java +++ b/src/main/java/net/minecraft/server/commands/GameModeCommand.java -@@ -50,9 +50,14 @@ public class GameModeCommand { +@@ -44,9 +44,14 @@ public class GameModeCommand { int i = 0; for(ServerPlayer serverPlayer : targets) { @@ -45,10 +45,10 @@ index 65089c0e78c9913a92ae9c66d664f48e2112ad92..7882ee2b7813d437d3b7580f046f38e7 } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 781bad6dd4279eddeaa2d55eaf513ef725729d26..f033a1a2bb3e44d30107bf1494b315cdc0c94b56 100644 +index c288075547cea04e0a1aba66b496c8bd5c2acd42..74cbc44cf71f482c05e1efacf35dc4b68c412b4a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1797,8 +1797,15 @@ public class ServerPlayer extends Player { +@@ -1828,8 +1828,15 @@ public class ServerPlayer extends Player { } public boolean setGameMode(GameType gameMode) { @@ -66,7 +66,7 @@ index 781bad6dd4279eddeaa2d55eaf513ef725729d26..f033a1a2bb3e44d30107bf1494b315cd } else { this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, (float) gameMode.getId())); if (gameMode == GameType.SPECTATOR) { -@@ -1810,7 +1817,7 @@ public class ServerPlayer extends Player { +@@ -1841,7 +1848,7 @@ public class ServerPlayer extends Player { this.onUpdateAbilities(); this.updateEffectVisibility(); @@ -75,7 +75,7 @@ index 781bad6dd4279eddeaa2d55eaf513ef725729d26..f033a1a2bb3e44d30107bf1494b315cd } } -@@ -2226,6 +2233,16 @@ public class ServerPlayer extends Player { +@@ -2251,6 +2258,16 @@ public class ServerPlayer extends Player { } public void loadGameTypes(@Nullable CompoundTag nbt) { @@ -93,10 +93,10 @@ index 781bad6dd4279eddeaa2d55eaf513ef725729d26..f033a1a2bb3e44d30107bf1494b315cd } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 32746dfbc2fdfc150583676b1bf0762398b76d75..1ad1f958a9b6e1bc21f1c505aa7ea54950de6cad 100644 +index 645a226c2e3f6dcf1c25187d006d425038b4545d..17c313b9cb45c8158cab751ffc4e0dc3b7e1fa3c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -73,18 +73,24 @@ public class ServerPlayerGameMode { +@@ -73,21 +73,27 @@ public class ServerPlayerGameMode { } public boolean changeGameModeForPlayer(GameType gameMode) { @@ -119,17 +119,20 @@ index 32746dfbc2fdfc150583676b1bf0762398b76d75..1ad1f958a9b6e1bc21f1c505aa7ea549 + return event; // Paper } // CraftBukkit end - this.setGameModeForPlayer(gameMode, this.gameModeForPlayer); + this.setGameModeForPlayer(gameMode, this.previousGameModeForPlayer); + this.player.onUpdateAbilities(); + this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit + this.level.updateSleepingPlayerList(); - return true; + return event; // Paper } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c326ce013828a68d5edc14efeabce3464475daa9..83a044061f77260a67023839b99915bd3abd8448 100644 +index 266a4c248ef8dc7b73c07f1cb46ad5155471a2d5..eb149b3a054255288572fda1fb5c9106a367a647 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2904,7 +2904,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2771,7 +2771,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player = this.server.getPlayerList().respawn(this.player, false); if (this.server.isHardcore()) { @@ -139,10 +142,10 @@ index c326ce013828a68d5edc14efeabce3464475daa9..83a044061f77260a67023839b99915bd } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 93b65c81dd57a09d3566f3be26926481ed37d959..e2556cadaee17eebeb34a224132b2e183c6d973e 100644 +index fa3cb1f97c23059ac5b848008af663fca9c3be53..45ad8545b5b8bf5b1ba0eb5ee2c602b34fc6a138 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1469,7 +1469,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1471,7 +1471,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { throw new IllegalArgumentException("Mode cannot be null"); } diff --git a/patches/unapplied/server/0628-ItemStack-repair-check-API.patch b/patches/server/0623-ItemStack-repair-check-API.patch similarity index 95% rename from patches/unapplied/server/0628-ItemStack-repair-check-API.patch rename to patches/server/0623-ItemStack-repair-check-API.patch index 9cec6dcbee..3b5ae7b855 100644 --- a/patches/unapplied/server/0628-ItemStack-repair-check-API.patch +++ b/patches/server/0623-ItemStack-repair-check-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 69ea448975077a1c254185925987bcd9599d252a..ec779868f37c1e8b22cd195fb458ed55fbb3aeb7 100644 +index 36b80af06ba50f1a34f2c5812976308f1c525f2c..fa2042a6bd12734ebdb99b5c04af7ac671f454ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -542,6 +542,14 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -540,6 +540,14 @@ public final class CraftMagicNumbers implements UnsafeValues { return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()]; } diff --git a/patches/unapplied/server/0629-More-Enchantment-API.patch b/patches/server/0624-More-Enchantment-API.patch similarity index 98% rename from patches/unapplied/server/0629-More-Enchantment-API.patch rename to patches/server/0624-More-Enchantment-API.patch index e5ae60be71..397304c8d0 100644 --- a/patches/unapplied/server/0629-More-Enchantment-API.patch +++ b/patches/server/0624-More-Enchantment-API.patch @@ -7,7 +7,7 @@ Subject: [PATCH] More Enchantment API public net.minecraft.world.item.enchantment.Enchantment slots diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index 31a22f26070059e5379730c1940ff1c5fb109be1..873185fd4d4c994130f2e7c271b3e03cefb2278c 100644 +index 57decf4156f176ebcc988478c17856cbc555c5e4..3d0ce0803e1da8a2681a3cb41096ac942ece54a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java @@ -71,7 +71,7 @@ public class CraftEnchantment extends Enchantment { diff --git a/patches/server/0625-Move-range-check-for-block-placing-up.patch b/patches/server/0625-Move-range-check-for-block-placing-up.patch new file mode 100644 index 0000000000..1b55e54397 --- /dev/null +++ b/patches/server/0625-Move-range-check-for-block-placing-up.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke +Date: Wed, 8 Jun 2022 10:52:18 +0200 +Subject: [PATCH] Move range check for block placing up + + +diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +index eb149b3a054255288572fda1fb5c9106a367a647..96f6eb2b152d1183ee45cb0b77c9c77ae8e03950 100644 +--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +@@ -1825,6 +1825,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + if (itemstack.isItemEnabled(worldserver.enabledFeatures())) { + BlockHitResult movingobjectpositionblock = packet.getHitResult(); + Vec3 vec3d = movingobjectpositionblock.getLocation(); ++ // Paper start - improve distance check ++ if (!Double.isFinite(vec3d.x) || !Double.isFinite(vec3d.y) || !Double.isFinite(vec3d.z)) { ++ return; ++ } ++ // Paper end + BlockPos blockposition = movingobjectpositionblock.getBlockPos(); + Vec3 vec3d1 = Vec3.atCenterOf(blockposition); + diff --git a/patches/unapplied/server/0631-Fix-and-optimise-world-force-upgrading.patch b/patches/server/0626-Fix-and-optimise-world-force-upgrading.patch similarity index 93% rename from patches/unapplied/server/0631-Fix-and-optimise-world-force-upgrading.patch rename to patches/server/0626-Fix-and-optimise-world-force-upgrading.patch index 4c808317dd..6ab2cb73df 100644 --- a/patches/unapplied/server/0631-Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/0626-Fix-and-optimise-world-force-upgrading.patch @@ -247,10 +247,10 @@ index 0000000000000000000000000000000000000000..95cac7edae8ac64811fc6a2f6b97dd4a + } +} diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 2f82002c52af7304ff6b2d6fe8f094314daf0bba..5962f7a2b185d7d54a0f9e341a4fdf6e6f1c1ec5 100644 +index 2dba2853764ca1cff114d3130672fbd596604ea3..6a5698f05a5f839e643e747c21834aacb90feec8 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -16,6 +16,7 @@ import java.util.Objects; +@@ -15,6 +15,7 @@ import java.nio.file.Paths; import java.util.Optional; import java.util.UUID; import java.util.function.BooleanSupplier; @@ -258,8 +258,8 @@ index 2f82002c52af7304ff6b2d6fe8f094314daf0bba..5962f7a2b185d7d54a0f9e341a4fdf6e import joptsimple.NonOptionArgumentSpec; import joptsimple.OptionParser; import joptsimple.OptionSet; -@@ -314,6 +315,15 @@ public class Main { - +@@ -329,6 +330,15 @@ public class Main { + return new WorldLoader.InitConfig(worldloader_d, Commands.CommandSelection.DEDICATED, serverPropertiesHandler.functionPermissionLevel); } + // Paper start - fix and optimise world upgrading @@ -271,27 +271,27 @@ index 2f82002c52af7304ff6b2d6fe8f094314daf0bba..5962f7a2b185d7d54a0f9e341a4fdf6e + } + // Paper end - fix and optimise world upgrading + - public static void forceUpgrade(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, boolean eraseCache, BooleanSupplier continueCheck, WorldGenSettings generatorOptions) { + public static void forceUpgrade(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, boolean eraseCache, BooleanSupplier continueCheck, Registry dimensionOptionsRegistry) { Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit - WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, generatorOptions, eraseCache); + WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, dimensionOptionsRegistry, eraseCache); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4c405e699fc77766d6731e51a2fc03997232c9be..adacd9a7234b98124cbd8cf9af2efd4b9db6b5b4 100644 +index d5cd8d540438638268cc26e2fc9be8415950ee22..13f8b4699c5b3a99715fada2d774469fb5c17363 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -545,11 +545,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { - return true; -- }, worlddata.worldGenSettings()); +- }, iregistry); - } + // Paper - move down PrimaryLevelData iworlddataserver = worlddata; - WorldGenSettings generatorsettings = worlddata.worldGenSettings(); -@@ -564,6 +560,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop worldKey = ResourceKey.create(Registry.DIMENSION_REGISTRY, dimensionKey.location()); + ResourceKey worldKey = ResourceKey.create(Registries.DIMENSION, dimensionKey.location()); if (dimensionKey == LevelStem.OVERWORLD) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index c00a7913274ff246c33a9894b680955427948f45..74d9ed2606c2fd10e9b633cdb584654cfa8f0ab8 100644 +index 7ed5f86f66b49d33952b2cb3dd5ea438284fcbd4..e42cb082e4f3643fbae730d23b53ccc5c3440665 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -182,6 +182,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -181,6 +181,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public final Map explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions public java.util.ArrayDeque redstoneUpdateInfos; // Paper - Move from Map in BlockRedstoneTorch to here @@ -326,7 +326,7 @@ index c00a7913274ff246c33a9894b680955427948f45..74d9ed2606c2fd10e9b633cdb584654c return this.world; } diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -index 7bfb0716964af5ee300150d500c97e8f90c849d4..c881d15efa94fc379ed2817a534fef3a4dd3d90d 100644 +index b294ef87fb93e7f4651dc04128124f297575860d..65fd57609e45ccd49ebfc1ba80d25243da13ab6e 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java @@ -32,6 +32,28 @@ public class RegionFileStorage implements AutoCloseable { @@ -359,10 +359,10 @@ index 7bfb0716964af5ee300150d500c97e8f90c849d4..c881d15efa94fc379ed2817a534fef3a return this.regionCache.getAndMoveToFirst(ChunkPos.asLong(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ())); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c330d63cc8d40092fdf70e5aea6f6ee9e8521e88..acc385d4b6852a55e93a5c19755a3d7f59a16eea 100644 +index 67d33a6825f8f0caa3b40cb46defa83a509bdf08..02f677322ed2d9d921d7c0151a9cedb96722dc11 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1204,12 +1204,7 @@ public final class CraftServer implements Server { +@@ -1229,12 +1229,7 @@ public final class CraftServer implements Server { } worlddata.checkName(name); worlddata.setModdedInfo(this.console.getServerModName(), this.console.getModdedStatus().shouldReportAsModified()); @@ -370,13 +370,13 @@ index c330d63cc8d40092fdf70e5aea6f6ee9e8521e88..acc385d4b6852a55e93a5c19755a3d7f - if (console.options.has("forceUpgrade")) { - net.minecraft.server.Main.forceUpgrade(worldSession, DataFixers.getDataFixer(), console.options.has("eraseCache"), () -> { - return true; -- }, worlddata.worldGenSettings()); +- }, iregistry); - } + // Paper - move down long j = BiomeManager.obfuscateSeed(creator.seed()); List list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata)); -@@ -1221,6 +1216,13 @@ public final class CraftServer implements Server { +@@ -1245,6 +1240,13 @@ public final class CraftServer implements Server { biomeProvider = generator.getDefaultBiomeProvider(worldInfo); } diff --git a/patches/unapplied/server/0632-Add-Mob-lookAt-API.patch b/patches/server/0627-Add-Mob-lookAt-API.patch similarity index 100% rename from patches/unapplied/server/0632-Add-Mob-lookAt-API.patch rename to patches/server/0627-Add-Mob-lookAt-API.patch diff --git a/patches/unapplied/server/0633-Add-Unix-domain-socket-support.patch b/patches/server/0628-Add-Unix-domain-socket-support.patch similarity index 97% rename from patches/unapplied/server/0633-Add-Unix-domain-socket-support.patch rename to patches/server/0628-Add-Unix-domain-socket-support.patch index 6eae147cc8..79735abe60 100644 --- a/patches/unapplied/server/0633-Add-Unix-domain-socket-support.patch +++ b/patches/server/0628-Add-Unix-domain-socket-support.patch @@ -27,10 +27,10 @@ index a7ab818440dc98087d877d7efdfafbf65e9ca92d..ea6c1439e92c24194cde4dcf6388363a } // Spigot End diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index e11d90ca94e9ec34f4593cf0dde2f5853bef7ae5..7dba8ef3291987cc428cd337693c3446d01e435b 100644 +index 8eb18e794845a2e7df5e7e6bc11134e4d132e06e..7dcffb49a982a8db00d66441a03e2951b1d29ff9 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -224,6 +224,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -219,6 +219,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface this.setEnforceWhitelist(dedicatedserverproperties.enforceWhitelist); // this.worldData.setGameType(dedicatedserverproperties.gamemode); // CraftBukkit - moved to world loading DedicatedServer.LOGGER.info("Default game type: {}", dedicatedserverproperties.gamemode); @@ -51,7 +51,7 @@ index e11d90ca94e9ec34f4593cf0dde2f5853bef7ae5..7dba8ef3291987cc428cd337693c3446 InetAddress inetaddress = null; if (!this.getLocalIp().isEmpty()) { -@@ -233,12 +247,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -228,12 +242,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface if (this.getPort() < 0) { this.setPort(dedicatedserverproperties.serverPort); } diff --git a/patches/unapplied/server/0634-Add-EntityInsideBlockEvent.patch b/patches/server/0629-Add-EntityInsideBlockEvent.patch similarity index 95% rename from patches/unapplied/server/0634-Add-EntityInsideBlockEvent.patch rename to patches/server/0629-Add-EntityInsideBlockEvent.patch index 712e15581a..6ec2cad77a 100644 --- a/patches/unapplied/server/0634-Add-EntityInsideBlockEvent.patch +++ b/patches/server/0629-Add-EntityInsideBlockEvent.patch @@ -17,7 +17,7 @@ index 922b5b22a4ccfeead9d6d2b9a2a2b3cc8a1e6c55..a76c452dc5c2069a3071aec31bfb3e97 entity.setRemainingFireTicks(entity.getRemainingFireTicks() + 1); if (entity.getRemainingFireTicks() == 0) { diff --git a/src/main/java/net/minecraft/world/level/block/BasePressurePlateBlock.java b/src/main/java/net/minecraft/world/level/block/BasePressurePlateBlock.java -index af808ddea455b2df9e551ce32dcd5bb472623dd9..f9aaec28be3e7a191981d30b361e369d7fea2c9e 100644 +index 7b0ead5131d4681214bf9b719cad5210631d69f2..caa0fbe5cad9cdc11d6e4af92bc627990cd8204c 100644 --- a/src/main/java/net/minecraft/world/level/block/BasePressurePlateBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BasePressurePlateBlock.java @@ -67,6 +67,7 @@ public abstract class BasePressurePlateBlock extends Block { @@ -29,7 +29,7 @@ index af808ddea455b2df9e551ce32dcd5bb472623dd9..f9aaec28be3e7a191981d30b361e369d int i = this.getSignalForState(state); diff --git a/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java b/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java -index ce32a0582c6d86e754710daa1413ff46da05dc56..63aa6b82ba21ec8e8f362b390063e4e275a979a5 100644 +index cb557c99cc84a79966c32523e2de9b5b9e60c842..8537581e7ca1f4efb492a2e734f46f947f36cffa 100644 --- a/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java @@ -170,6 +170,7 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone @@ -53,15 +53,15 @@ index 3da8d49f7e36d8f1c0873bec32123971e53d2a31..461288cb56793f11e8dac80720b36cb9 if (blockState.isAir()) { entity.onAboveBubbleCol(state.getValue(DRAG_DOWN)); diff --git a/src/main/java/net/minecraft/world/level/block/ButtonBlock.java b/src/main/java/net/minecraft/world/level/block/ButtonBlock.java -index c187e9df237ee71562343bbb4b577b2dcd9b4f1c..a0194e78913017693df7d92516dfbacb1153a1c2 100644 +index 1357ad425c92d281529c505aef74e797f1737b81..940f9328d02b99bfc6a154032b25862431a0ba2c 100644 --- a/src/main/java/net/minecraft/world/level/block/ButtonBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ButtonBlock.java -@@ -186,6 +186,7 @@ public abstract class ButtonBlock extends FaceAttachedHorizontalDirectionalBlock +@@ -182,6 +182,7 @@ public class ButtonBlock extends FaceAttachedHorizontalDirectionalBlock { @Override public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - if (!world.isClientSide && this.sensitive && !(Boolean) state.getValue(ButtonBlock.POWERED)) { + if (!world.isClientSide && this.arrowsCanPress && !(Boolean) state.getValue(ButtonBlock.POWERED)) { this.checkPressed(state, world, pos); } diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java @@ -89,7 +89,7 @@ index 930421c72326fabfa3f2e3ab37c4dd6f416d6d44..a4c44cb59dee29cf227dbb51bfc1576d org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = CraftBlock.at(world, pos); // CraftBukkit entity.hurt(DamageSource.IN_FIRE, (float) this.fireDamage); diff --git a/src/main/java/net/minecraft/world/level/block/CropBlock.java b/src/main/java/net/minecraft/world/level/block/CropBlock.java -index 26b4a4d8784923cb2caea3c20a180a9fe7bb4d8b..7d8394d09ec11c96b9329857a0d347565dd07b32 100644 +index 4597bfbe2268f14262c56f1e5266aa7d344f16d1..519d02a2009c4f09c9e8be7196a701f0f042012d 100644 --- a/src/main/java/net/minecraft/world/level/block/CropBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CropBlock.java @@ -163,6 +163,7 @@ public class CropBlock extends BushBlock implements BonemealableBlock { @@ -173,10 +173,10 @@ index 2d0191eeb746d496a481d66cdfa77078313a13ec..24d2da792bc498adf4251555a538df4c // CraftBukkit start if (entity.mayInteract(world, pos)) { diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java -index 8c97cae63b4b373f1d67e797b9fe1064b5205da5..08a84e8fdb242f467fb20eec73764ef71691ad42 100644 +index a423aff5fde3f42c8b8aecb74fe0022c4d2dbe81..192689be9dfc9373876921bd4da0715d58f9421c 100644 --- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java -@@ -85,6 +85,7 @@ public class NetherPortalBlock extends Block { +@@ -82,6 +82,7 @@ public class NetherPortalBlock extends Block { @Override public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { @@ -197,10 +197,10 @@ index 47f54002654d198a56a85884de34e305e545eb4b..518d3832c36c9ecf1ed9267ffc1f926d entity.makeStuckInBlock(state, new Vec3(0.8999999761581421D, 1.5D, 0.8999999761581421D)); if (world.isClientSide) { diff --git a/src/main/java/net/minecraft/world/level/block/SweetBerryBushBlock.java b/src/main/java/net/minecraft/world/level/block/SweetBerryBushBlock.java -index 3eba9715601fcd1e86cb50bdef2434b404009caf..9871249335b67cfcfc17e7a1d504da1bc9b08c8a 100644 +index 6086b60795b7cb2e16833af59b6326e5957f2e74..c926cd3ebb916115a608e86b389ffe7e15d48cd7 100644 --- a/src/main/java/net/minecraft/world/level/block/SweetBerryBushBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SweetBerryBushBlock.java -@@ -77,6 +77,7 @@ public class SweetBerryBushBlock extends BushBlock implements BonemealableBlock +@@ -78,6 +78,7 @@ public class SweetBerryBushBlock extends BushBlock implements BonemealableBlock @Override public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { diff --git a/patches/unapplied/server/0635-Attributes-API-for-item-defaults.patch b/patches/server/0630-Attributes-API-for-item-defaults.patch similarity index 91% rename from patches/unapplied/server/0635-Attributes-API-for-item-defaults.patch rename to patches/server/0630-Attributes-API-for-item-defaults.patch index 3e1c85c9cc..4562d430f2 100644 --- a/patches/unapplied/server/0635-Attributes-API-for-item-defaults.patch +++ b/patches/server/0630-Attributes-API-for-item-defaults.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Attributes API for item defaults diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index ec779868f37c1e8b22cd195fb458ed55fbb3aeb7..6b2df5d9aa2c7a7be0d18816cfddf381b71bbe36 100644 +index fa2042a6bd12734ebdb99b5c04af7ac671f454ac..4195a6e8bb58b0e60354900fe021b10b1d25cf12 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -550,6 +550,19 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -548,6 +548,19 @@ public final class CraftMagicNumbers implements UnsafeValues { return CraftMagicNumbers.getItem(itemToBeRepaired.getType()).isValidRepairItem(CraftItemStack.asNMSCopy(itemToBeRepaired), CraftItemStack.asNMSCopy(repairMaterial)); } diff --git a/patches/unapplied/server/0636-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0631-Add-cause-to-Weather-ThunderChangeEvents.patch similarity index 87% rename from patches/unapplied/server/0636-Add-cause-to-Weather-ThunderChangeEvents.patch rename to patches/server/0631-Add-cause-to-Weather-ThunderChangeEvents.patch index 4e815fe346..a793b5851f 100644 --- a/patches/unapplied/server/0636-Add-cause-to-Weather-ThunderChangeEvents.patch +++ b/patches/server/0631-Add-cause-to-Weather-ThunderChangeEvents.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index dc3c519542e40a9645fd21cc91bbebc5e1285e3a..8a18b41bba88c8fd75bc08576a8f01b7967dbda5 100644 +index 835fda071197f9d7b929e015fbd9b143d13856d5..862314a0a73c2c6676fa4a4dc70bc719a356a93b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -531,8 +531,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -534,8 +534,8 @@ public class ServerLevel extends Level implements WorldGenLevel { this.serverLevelData.setClearWeatherTime(clearDuration); this.serverLevelData.setRainTime(rainDuration); this.serverLevelData.setThunderTime(rainDuration); @@ -19,7 +19,7 @@ index dc3c519542e40a9645fd21cc91bbebc5e1285e3a..8a18b41bba88c8fd75bc08576a8f01b7 } @Override -@@ -927,8 +927,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -948,8 +948,8 @@ public class ServerLevel extends Level implements WorldGenLevel { this.serverLevelData.setThunderTime(j); this.serverLevelData.setRainTime(k); this.serverLevelData.setClearWeatherTime(i); @@ -30,7 +30,7 @@ index dc3c519542e40a9645fd21cc91bbebc5e1285e3a..8a18b41bba88c8fd75bc08576a8f01b7 } this.oThunderLevel = this.thunderLevel; -@@ -994,14 +994,14 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1015,14 +1015,14 @@ public class ServerLevel extends Level implements WorldGenLevel { private void resetWeatherCycle() { // CraftBukkit start @@ -48,10 +48,10 @@ index dc3c519542e40a9645fd21cc91bbebc5e1285e3a..8a18b41bba88c8fd75bc08576a8f01b7 // If we stop due to everyone sleeping we should reset the weather duration to some other random value. // Not that everyone ever manages to get the whole server to sleep at the same time.... diff --git a/src/main/java/net/minecraft/world/level/storage/PrimaryLevelData.java b/src/main/java/net/minecraft/world/level/storage/PrimaryLevelData.java -index a85e81d3128b7cb45d3b611728dcc5b3c3105f6d..e37d687c9c5b8482fe053e18c7dd38a174800b19 100644 +index 68d495d5554d5c5758537be11188745e1458a00c..6eafa7969f463a6ee33b84b7e6a79f8088aa40a1 100644 --- a/src/main/java/net/minecraft/world/level/storage/PrimaryLevelData.java +++ b/src/main/java/net/minecraft/world/level/storage/PrimaryLevelData.java -@@ -351,6 +351,11 @@ public class PrimaryLevelData implements ServerLevelData, WorldData { +@@ -354,6 +354,11 @@ public class PrimaryLevelData implements ServerLevelData, WorldData { @Override public void setThundering(boolean thundering) { @@ -63,7 +63,7 @@ index a85e81d3128b7cb45d3b611728dcc5b3c3105f6d..e37d687c9c5b8482fe053e18c7dd38a1 // CraftBukkit start if (this.thundering == thundering) { return; -@@ -358,7 +363,7 @@ public class PrimaryLevelData implements ServerLevelData, WorldData { +@@ -361,7 +366,7 @@ public class PrimaryLevelData implements ServerLevelData, WorldData { org.bukkit.World world = Bukkit.getWorld(this.getLevelName()); if (world != null) { @@ -72,7 +72,7 @@ index a85e81d3128b7cb45d3b611728dcc5b3c3105f6d..e37d687c9c5b8482fe053e18c7dd38a1 Bukkit.getServer().getPluginManager().callEvent(thunder); if (thunder.isCancelled()) { return; -@@ -385,6 +390,12 @@ public class PrimaryLevelData implements ServerLevelData, WorldData { +@@ -388,6 +393,12 @@ public class PrimaryLevelData implements ServerLevelData, WorldData { @Override public void setRaining(boolean raining) { @@ -85,7 +85,7 @@ index a85e81d3128b7cb45d3b611728dcc5b3c3105f6d..e37d687c9c5b8482fe053e18c7dd38a1 // CraftBukkit start if (this.raining == raining) { return; -@@ -392,7 +403,7 @@ public class PrimaryLevelData implements ServerLevelData, WorldData { +@@ -395,7 +406,7 @@ public class PrimaryLevelData implements ServerLevelData, WorldData { org.bukkit.World world = Bukkit.getWorld(this.getLevelName()); if (world != null) { @@ -95,10 +95,10 @@ index a85e81d3128b7cb45d3b611728dcc5b3c3105f6d..e37d687c9c5b8482fe053e18c7dd38a1 if (weather.isCancelled()) { return; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index c801ba30f7d5fc891adc3dad7ee8e2d78e7ac359..b1382dab98963b362c49d2e8f1a97177eadeb22d 100644 +index ac8f0b163b6b2c7eefb8dd24a878112367b13566..a31016f6b5651732c8bbcdcb239b237ccaf0a36e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1184,7 +1184,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1183,7 +1183,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setStorm(boolean hasStorm) { @@ -107,7 +107,7 @@ index c801ba30f7d5fc891adc3dad7ee8e2d78e7ac359..b1382dab98963b362c49d2e8f1a97177 this.setWeatherDuration(0); // Reset weather duration (legacy behaviour) this.setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands) } -@@ -1206,7 +1206,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1205,7 +1205,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setThundering(boolean thundering) { diff --git a/patches/unapplied/server/0637-More-Lidded-Block-API.patch b/patches/server/0632-More-Lidded-Block-API.patch similarity index 100% rename from patches/unapplied/server/0637-More-Lidded-Block-API.patch rename to patches/server/0632-More-Lidded-Block-API.patch diff --git a/patches/unapplied/server/0638-Limit-item-frame-cursors-on-maps.patch b/patches/server/0633-Limit-item-frame-cursors-on-maps.patch similarity index 93% rename from patches/unapplied/server/0638-Limit-item-frame-cursors-on-maps.patch rename to patches/server/0633-Limit-item-frame-cursors-on-maps.patch index d4916fb1f4..2ef5668d6f 100644 --- a/patches/unapplied/server/0638-Limit-item-frame-cursors-on-maps.patch +++ b/patches/server/0633-Limit-item-frame-cursors-on-maps.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Limit item frame cursors on maps diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -index 2a7c4b70f3d4442b33fa3d005da0da5da9756e83..ed96f092febd5a589b4d94368d6921ac0a71f7d6 100644 +index df616dbe37b8a2068338f071300d6315a361a075..b2845ed8d28627178589da3d2224cd9edd29c31e 100644 --- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java @@ -295,8 +295,12 @@ public class MapItemSavedData extends SavedData { diff --git a/patches/unapplied/server/0639-Add-PlayerKickEvent-causes.patch b/patches/server/0634-Add-PlayerKickEvent-causes.patch similarity index 86% rename from patches/unapplied/server/0639-Add-PlayerKickEvent-causes.patch rename to patches/server/0634-Add-PlayerKickEvent-causes.patch index ba52268ac5..29958ae511 100644 --- a/patches/unapplied/server/0639-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0634-Add-PlayerKickEvent-causes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerKickEvent causes diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index adacd9a7234b98124cbd8cf9af2efd4b9db6b5b4..1203076f688a16af17b7e55d913c9248e3f0fec7 100644 +index 13f8b4699c5b3a99715fada2d774469fb5c17363..213033a59be4239f1225286764be83dcc6fbf973 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2112,7 +2112,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString()); @@ -69,7 +69,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 return; } } else { -@@ -388,7 +388,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -381,7 +381,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) { if (++this.aboveGroundVehicleTickCount > 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString()); @@ -78,7 +78,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 return; } } else { -@@ -410,7 +410,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -403,7 +403,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.keepAlivePending) { if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info @@ -87,7 +87,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 } } else { if (elapsedTime >= 15000L) { // 15 seconds -@@ -440,7 +440,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -433,7 +433,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.player.getLastActionTime() > 0L && this.server.getPlayerIdleTimeout() > 0 && Util.getMillis() - this.player.getLastActionTime() > (long) (this.server.getPlayerIdleTimeout() * 1000 * 60)) { this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854 @@ -95,8 +95,8 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 + this.disconnect(Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause } - this.chatPreviewThrottler.tick(); -@@ -464,16 +464,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + } +@@ -456,16 +456,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return this.server.isSingleplayerOwner(this.player.getGameProfile()); } @@ -115,18 +115,18 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 public void disconnect(final Component reason) { - this.disconnect(PaperAdventure.asAdventure(reason)); + this.disconnect(PaperAdventure.asAdventure(reason), org.bukkit.event.player.PlayerKickEvent.Cause.UNKNOWN); -+ } -+ -+ public void disconnect(final Component reason, PlayerKickEvent.Cause cause) { -+ this.disconnect(PaperAdventure.asAdventure(reason), cause); } - public void disconnect(net.kyori.adventure.text.Component reason) { ++ public void disconnect(final Component reason, PlayerKickEvent.Cause cause) { ++ this.disconnect(PaperAdventure.asAdventure(reason), cause); ++ } ++ + public void disconnect(net.kyori.adventure.text.Component reason, org.bukkit.event.player.PlayerKickEvent.Cause cause) { // Paper end // CraftBukkit start - fire PlayerKickEvent if (this.processedDisconnect) { -@@ -502,7 +512,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -494,7 +504,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic net.kyori.adventure.text.Component leaveMessage = net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? this.player.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(this.player.getScoreboardName())); // Paper - Adventure @@ -135,7 +135,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 if (this.cserver.getServer().isRunning()) { this.cserver.getPluginManager().callEvent(event); -@@ -572,7 +582,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -564,7 +574,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleMoveVehicle(ServerboundMoveVehiclePacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(), packet.getY(), packet.getZ(), packet.getYRot(), packet.getXRot())) { @@ -144,7 +144,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 } else { Entity entity = this.player.getRootVehicle(); -@@ -770,7 +780,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -762,7 +772,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (packet.getId() == this.awaitingTeleport) { if (this.awaitingPositionFromClient == null) { @@ -153,7 +153,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 return; } -@@ -827,13 +837,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -819,13 +829,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async // CraftBukkit start if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable @@ -169,7 +169,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 return; } // Paper end -@@ -986,7 +996,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -978,7 +988,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper start - validate pick item position if (!(packet.getSlot() >= 0 && packet.getSlot() < this.player.getInventory().items.size())) { ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString()); @@ -178,7 +178,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 return; } this.player.getInventory().pickSlot(packet.getSlot()); // Paper - Diff above if changed -@@ -1173,7 +1183,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1165,7 +1175,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length; if (byteLength > 256 * 4) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send a book with with a page too large!"); @@ -187,7 +187,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 return; } byteTotal += byteLength; -@@ -1196,14 +1206,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1188,14 +1198,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (byteTotal > byteAllowed) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size()); @@ -204,7 +204,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 return; } this.lastBookTick = MinecraftServer.currentTick; -@@ -1327,7 +1337,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1319,7 +1329,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleMovePlayer(ServerboundMovePlayerPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(0.0D), packet.getY(0.0D), packet.getZ(0.0D), packet.getYRot(0.0F), packet.getXRot(0.0F))) { @@ -213,7 +213,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 } else { ServerLevel worldserver = this.player.getLevel(); -@@ -1754,7 +1764,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1747,7 +1757,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.dropCount++; if (this.dropCount >= 20) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!"); @@ -222,7 +222,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 return; } } -@@ -1963,7 +1973,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1959,7 +1969,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) { ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName()); @@ -231,7 +231,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 } // Paper start PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.action.ordinal()]; -@@ -2076,7 +2086,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2073,7 +2083,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.resetLastActionTime(); } else { ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString()); @@ -240,43 +240,67 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 } } -@@ -2089,7 +2099,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2086,7 +2096,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) { - this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters")); + this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add cause } else { - if (this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages())) { - // this.server.submit(() -> { // CraftBukkit - async chat -@@ -2117,7 +2127,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + Optional optional = this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages()); + +@@ -2120,7 +2130,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) { - this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters")); + this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper } else { - if (this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages())) { - this.server.submit(() -> { -@@ -2203,7 +2213,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - private boolean tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { + Optional optional = this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages()); + +@@ -2200,7 +2210,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + private Optional tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); - this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat")); -+ this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event cause - return false; ++ this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event ca + return Optional.empty(); } else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false)); -@@ -2465,7 +2475,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - } +@@ -2428,6 +2438,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + this.detectRateSpam(s); // Spigot + } - if (!message.verify(chatsender)) { -- this.disconnect(Component.translatable("multiplayer.disconnect.unsigned_chat")); ++<<<<<<< HEAD ++======= ++ private boolean verifyChatMessage(PlayerChatMessage message) { ++ ChatSender chatsender = this.player.asChatSender(); ++ ProfilePublicKey profilepublickey = chatsender.profilePublicKey(); ++ ++ if (profilepublickey != null) { ++ if (profilepublickey.data().hasExpired()) { ++ this.player.sendSystemMessage(Component.translatable("chat.disabled.expiredProfileKey").withStyle(ChatFormatting.RED)); ++ return false; ++ } ++ ++ if (!message.verify(chatsender)) { + this.disconnect(Component.translatable("multiplayer.disconnect.unsigned_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.UNSIGNED_CHAT); // Paper - kick event cause - return false; - } - } -@@ -2493,7 +2503,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ++ return false; ++ } ++ } ++ ++ if (message.hasExpiredServer(Instant.now())) { ++ ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized?", this.player.getName().getString(), message.signedContent().plain()); ++ } ++ ++ return true; ++ } ++ ++>>>>>>> Add PlayerKickEvent causes + // Spigot start - spam exclusions + private void detectRateSpam(String s) { + // CraftBukkit start - replaced with thread safe throttle +@@ -2444,7 +2480,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // this.chatSpamTickCount += 20; if (this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // CraftBukkit end @@ -285,16 +309,23 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 } } -@@ -2596,7 +2606,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2460,6 +2496,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + } - private void handleValidationFailure(Set reasons) { - ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message from {}, reasons: {}", this.player.getName().getString(), reasons.stream().map(LastSeenMessagesValidator.ErrorCondition::message).collect(Collectors.joining(","))); -- this.disconnect(Component.translatable("multiplayer.disconnect.chat_validation_failed")); + } ++<<<<<<< HEAD ++======= ++ ++ } ++ ++ private void handleValidationFailure(Set reasons) { ++ ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message from {}, reasons: {}", this.player.getName().getString(), reasons.stream().map(LastSeenMessagesValidator.ErrorCondition::message).collect(Collectors.joining(","))); + this.disconnect(Component.translatable("multiplayer.disconnect.chat_validation_failed"), org.bukkit.event.player.PlayerKickEvent.Cause.CHAT_VALIDATION_FAILED); // Paper - kick event cause ++>>>>>>> Add PlayerKickEvent causes } @Override -@@ -2737,7 +2747,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2597,7 +2642,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (i > 4096) { @@ -303,7 +334,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 } } -@@ -2752,7 +2762,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2621,7 +2666,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Spigot Start if ( entity == this.player && !this.player.isSpectator() ) { @@ -312,16 +343,16 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 return; } // Spigot End -@@ -2851,7 +2861,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2718,7 +2763,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + // CraftBukkit end } - // CraftBukkit end } else { - ServerGamePacketListenerImpl.this.disconnect(Component.translatable("multiplayer.disconnect.invalid_entity_attacked")); + ServerGamePacketListenerImpl.this.disconnect(Component.translatable("multiplayer.disconnect.invalid_entity_attacked"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_ENTITY_ATTACKED); // Paper - add cause ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString()); } } -@@ -3259,7 +3269,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3126,7 +3171,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper start if (!org.bukkit.Bukkit.isPrimaryThread()) { if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) { @@ -330,7 +361,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 return; } } -@@ -3462,7 +3472,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3334,7 +3379,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } else if (!this.isSingleplayerOwner()) { // Paper start - This needs to be handled on the main thread for plugins server.submit(() -> { @@ -339,7 +370,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 }); // Paper end } -@@ -3508,7 +3518,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3380,7 +3425,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex); @@ -348,7 +379,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 } } else if (packet.identifier.equals(CUSTOM_UNREGISTER)) { try { -@@ -3518,7 +3528,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3390,7 +3435,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex); @@ -357,7 +388,7 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 } } else { try { -@@ -3536,7 +3546,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3408,7 +3453,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data); } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); @@ -367,10 +398,10 @@ index 4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af..db43e6c4673a4f679132869b7cb22911 } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index ee78edd11164f106b5ecf5645072bef7f9f28459..d2ecd5143e931579b96f434c0d3ced4a87e739ac 100644 +index 16210f30249ecc83c92e0374f7821693a9fd27c1..20598ef01293d8889145921cb3c5a9c7287b6b23 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -726,7 +726,7 @@ public abstract class PlayerList { +@@ -734,7 +734,7 @@ public abstract class PlayerList { while (iterator.hasNext()) { entityplayer = (ServerPlayer) iterator.next(); this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved @@ -379,7 +410,7 @@ index ee78edd11164f106b5ecf5645072bef7f9f28459..d2ecd5143e931579b96f434c0d3ced4a } // Instead of kicking then returning, we need to store the kick reason -@@ -1357,8 +1357,8 @@ public abstract class PlayerList { +@@ -1367,8 +1367,8 @@ public abstract class PlayerList { // Paper end // CraftBukkit start - disconnect safely for (ServerPlayer player : this.players) { @@ -391,10 +422,10 @@ index ee78edd11164f106b5ecf5645072bef7f9f28459..d2ecd5143e931579b96f434c0d3ced4a // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e2556cadaee17eebeb34a224132b2e183c6d973e..ed51d20ebe72cd5f94882127968006fca2acec08 100644 +index 45ad8545b5b8bf5b1ba0eb5ee2c602b34fc6a138..49501e3cb2e604655f0c6eba38d07855b7632cbf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -597,7 +597,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -599,7 +599,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot if (this.getHandle().connection == null) return; @@ -403,7 +434,7 @@ index e2556cadaee17eebeb34a224132b2e183c6d973e..ed51d20ebe72cd5f94882127968006fc } // Paper start -@@ -609,10 +609,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -611,10 +611,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void kick(final net.kyori.adventure.text.Component message) { diff --git a/patches/unapplied/server/0640-Add-PufferFishStateChangeEvent.patch b/patches/server/0635-Add-PufferFishStateChangeEvent.patch similarity index 100% rename from patches/unapplied/server/0640-Add-PufferFishStateChangeEvent.patch rename to patches/server/0635-Add-PufferFishStateChangeEvent.patch diff --git a/patches/unapplied/server/0641-Fix-PlayerBucketEmptyEvent-result-itemstack.patch b/patches/server/0636-Fix-PlayerBucketEmptyEvent-result-itemstack.patch similarity index 100% rename from patches/unapplied/server/0641-Fix-PlayerBucketEmptyEvent-result-itemstack.patch rename to patches/server/0636-Fix-PlayerBucketEmptyEvent-result-itemstack.patch diff --git a/patches/unapplied/server/0642-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch b/patches/server/0637-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch similarity index 97% rename from patches/unapplied/server/0642-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch rename to patches/server/0637-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch index 4fd0ff61f2..ebe62da740 100644 --- a/patches/unapplied/server/0642-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch +++ b/patches/server/0637-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch @@ -14,7 +14,7 @@ contention situations. And this is extremely a low contention situation. diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index 8f5114b6d64461866140b6d2ced3f838a1228851..9e652cf68b289696b5aee53ac157fc52cca10d2c 100644 +index 510bbdc5b79736fca2f116a980e71f85b65cf9bc..5cd4b81a9e89402c617aa3458200b95faa551c9c 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java @@ -32,14 +32,14 @@ public class PalettedContainer implements PaletteResize, PalettedContainer diff --git a/patches/unapplied/server/0643-Add-option-to-fix-items-merging-through-walls.patch b/patches/server/0638-Add-option-to-fix-items-merging-through-walls.patch similarity index 90% rename from patches/unapplied/server/0643-Add-option-to-fix-items-merging-through-walls.patch rename to patches/server/0638-Add-option-to-fix-items-merging-through-walls.patch index 0c6f1b92fc..4dca11c818 100644 --- a/patches/unapplied/server/0643-Add-option-to-fix-items-merging-through-walls.patch +++ b/patches/server/0638-Add-option-to-fix-items-merging-through-walls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to fix items merging through walls diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 7e293167e73238f42fc213ee29d89aa775cf9e60..30c417c3169c1df43662fd77ac6816db64a42802 100644 +index 1dc7f3963069313de6b969c44bdd21272483f7be..1f965e4428d627eaab69ace45486f1d14d2bb504 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -245,6 +245,14 @@ public class ItemEntity extends Entity { +@@ -243,6 +243,14 @@ public class ItemEntity extends Entity { ItemEntity entityitem = (ItemEntity) iterator.next(); if (entityitem.isMergable()) { diff --git a/patches/unapplied/server/0644-Add-BellRevealRaiderEvent.patch b/patches/server/0639-Add-BellRevealRaiderEvent.patch similarity index 100% rename from patches/unapplied/server/0644-Add-BellRevealRaiderEvent.patch rename to patches/server/0639-Add-BellRevealRaiderEvent.patch diff --git a/patches/unapplied/server/0645-Fix-invulnerable-end-crystals.patch b/patches/server/0640-Fix-invulnerable-end-crystals.patch similarity index 74% rename from patches/unapplied/server/0645-Fix-invulnerable-end-crystals.patch rename to patches/server/0640-Fix-invulnerable-end-crystals.patch index e5ce326afa..320df6b30d 100644 --- a/patches/unapplied/server/0645-Fix-invulnerable-end-crystals.patch +++ b/patches/server/0640-Fix-invulnerable-end-crystals.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix invulnerable end crystals MC-108513 diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java -index 78b0456a3f9e3f66d467386c3e5f68d07adf1977..6a08ab40e60b80f8f5c4d3f02da121be9da05111 100644 +index 7f195640bd8299c1ecd12ea1892c6d8d20e4fcec..500500468c12d1d44ea6b83a9176b470a954f59a 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java -@@ -30,6 +30,7 @@ public class EndCrystal extends Entity { +@@ -28,6 +28,7 @@ public class EndCrystal extends Entity { private static final EntityDataAccessor> DATA_BEAM_TARGET = SynchedEntityData.defineId(EndCrystal.class, EntityDataSerializers.OPTIONAL_BLOCK_POS); private static final EntityDataAccessor DATA_SHOW_BOTTOM = SynchedEntityData.defineId(EndCrystal.class, EntityDataSerializers.BOOLEAN); public int time; @@ -17,7 +17,7 @@ index 78b0456a3f9e3f66d467386c3e5f68d07adf1977..6a08ab40e60b80f8f5c4d3f02da121be public EndCrystal(EntityType type, Level world) { super(type, world); -@@ -66,6 +67,17 @@ public class EndCrystal extends Entity { +@@ -64,6 +65,17 @@ public class EndCrystal extends Entity { } // CraftBukkit end } @@ -35,7 +35,7 @@ index 78b0456a3f9e3f66d467386c3e5f68d07adf1977..6a08ab40e60b80f8f5c4d3f02da121be } } -@@ -77,6 +89,7 @@ public class EndCrystal extends Entity { +@@ -75,6 +87,7 @@ public class EndCrystal extends Entity { } nbt.putBoolean("ShowBottom", this.showsBottom()); @@ -43,7 +43,7 @@ index 78b0456a3f9e3f66d467386c3e5f68d07adf1977..6a08ab40e60b80f8f5c4d3f02da121be } @Override -@@ -88,6 +101,7 @@ public class EndCrystal extends Entity { +@@ -86,6 +99,7 @@ public class EndCrystal extends Entity { if (nbt.contains("ShowBottom", 1)) { this.setShowBottom(nbt.getBoolean("ShowBottom")); } @@ -52,14 +52,14 @@ index 78b0456a3f9e3f66d467386c3e5f68d07adf1977..6a08ab40e60b80f8f5c4d3f02da121be } diff --git a/src/main/java/net/minecraft/world/level/levelgen/feature/SpikeFeature.java b/src/main/java/net/minecraft/world/level/levelgen/feature/SpikeFeature.java -index 8e51c2bc6dc6483b2c670348daf793ca4d59e5b9..94209f8c02656c113b537093cbbfaba1b9871045 100644 +index 32903759e94e43328de38a985cc121252c81f481..570c0646e245a1527b3a569f2c8a6fae5b18b373 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/feature/SpikeFeature.java +++ b/src/main/java/net/minecraft/world/level/levelgen/feature/SpikeFeature.java -@@ -99,6 +99,7 @@ public class SpikeFeature extends Feature { - endCrystal.setBeamTarget(config.getCrystalBeamTarget()); - endCrystal.setInvulnerable(config.isCrystalInvulnerable()); - endCrystal.moveTo((double)spike.getCenterX() + 0.5D, (double)(spike.getHeight() + 1), (double)spike.getCenterZ() + 0.5D, random.nextFloat() * 360.0F, 0.0F); +@@ -100,6 +100,7 @@ public class SpikeFeature extends Feature { + endCrystal.setBeamTarget(config.getCrystalBeamTarget()); + endCrystal.setInvulnerable(config.isCrystalInvulnerable()); + endCrystal.moveTo((double)spike.getCenterX() + 0.5D, (double)(spike.getHeight() + 1), (double)spike.getCenterZ() + 0.5D, random.nextFloat() * 360.0F, 0.0F); + endCrystal.generatedByDragonFight = true; // Paper - world.addFreshEntity(endCrystal); - this.setBlock(world, new BlockPos(spike.getCenterX(), spike.getHeight(), spike.getCenterZ()), Blocks.BEDROCK.defaultBlockState()); - } + world.addFreshEntity(endCrystal); + this.setBlock(world, new BlockPos(spike.getCenterX(), spike.getHeight(), spike.getCenterZ()), Blocks.BEDROCK.defaultBlockState()); + } diff --git a/patches/unapplied/server/0646-Add-ElderGuardianAppearanceEvent.patch b/patches/server/0641-Add-ElderGuardianAppearanceEvent.patch similarity index 96% rename from patches/unapplied/server/0646-Add-ElderGuardianAppearanceEvent.patch rename to patches/server/0641-Add-ElderGuardianAppearanceEvent.patch index 13c35cf8b6..e6cc949c93 100644 --- a/patches/unapplied/server/0646-Add-ElderGuardianAppearanceEvent.patch +++ b/patches/server/0641-Add-ElderGuardianAppearanceEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add ElderGuardianAppearanceEvent diff --git a/src/main/java/net/minecraft/world/effect/MobEffectUtil.java b/src/main/java/net/minecraft/world/effect/MobEffectUtil.java -index f6c22fbad828afa29b9374b13d7bc8ac8cac7891..aefc65a81c91dac715df6d9a4eaaacd94f918cb5 100644 +index f2f336cdecc12ed59f836aa921ffa477bd280986..e4d36d6477bb8f07af05b27d6e56342f35b0f41a 100644 --- a/src/main/java/net/minecraft/world/effect/MobEffectUtil.java +++ b/src/main/java/net/minecraft/world/effect/MobEffectUtil.java -@@ -53,10 +53,23 @@ public final class MobEffectUtil { +@@ -49,10 +49,23 @@ public final class MobEffectUtil { } public static List addEffectToPlayersAround(ServerLevel worldserver, @Nullable Entity entity, Vec3 vec3d, double d0, MobEffectInstance mobeffect, int i, org.bukkit.event.entity.EntityPotionEffectEvent.Cause cause) { diff --git a/patches/unapplied/server/0647-Fix-dangerous-end-portal-logic.patch b/patches/server/0642-Fix-dangerous-end-portal-logic.patch similarity index 96% rename from patches/unapplied/server/0647-Fix-dangerous-end-portal-logic.patch rename to patches/server/0642-Fix-dangerous-end-portal-logic.patch index 380c43c234..af4cd2fc95 100644 --- a/patches/unapplied/server/0647-Fix-dangerous-end-portal-logic.patch +++ b/patches/server/0642-Fix-dangerous-end-portal-logic.patch @@ -11,7 +11,7 @@ Move the tick logic into the post tick, where portaling was designed to happen in the first place. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0624f832f301ec2a36085e66f67b6a529583a496..6b6de6812740357d4c2c8bca0c064aa52e61fa60 100644 +index b2c85ef84d5455cbdcb211af94a5046593d663c3..331e88186cc47dabbb35e849313721f38070c4d6 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -509,6 +509,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -51,7 +51,7 @@ index 0624f832f301ec2a36085e66f67b6a529583a496..6b6de6812740357d4c2c8bca0c064aa5 public Entity(EntityType type, Level world) { this.id = Entity.ENTITY_COUNTER.incrementAndGet(); -@@ -2685,6 +2715,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2704,6 +2734,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } this.processPortalCooldown(); diff --git a/patches/unapplied/server/0648-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/patches/server/0643-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 96% rename from patches/unapplied/server/0648-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to patches/server/0643-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch index c46f8fbb65..0f58d3eeef 100644 --- a/patches/unapplied/server/0648-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch +++ b/patches/server/0643-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning Uses an EnumMap as well as a Set paired List for O(1) contains calls. diff --git a/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java b/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java -index 08e3a3c250056227c518a15d5df38b346abae45a..7c92decbf0f4a10cc31f821a249749009d8b1485 100644 +index 23b3d2235c90cf6b15da279ba83200d7a9e709d8..04c35af0431654c2a5c54113f257a0e0a42bff4f 100644 --- a/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java +++ b/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java @@ -59,11 +59,43 @@ public class MobSpawnSettings { diff --git a/patches/unapplied/server/0649-Make-item-validations-configurable.patch b/patches/server/0644-Make-item-validations-configurable.patch similarity index 100% rename from patches/unapplied/server/0649-Make-item-validations-configurable.patch rename to patches/server/0644-Make-item-validations-configurable.patch diff --git a/patches/unapplied/server/0650-Line-Of-Sight-Changes.patch b/patches/server/0645-Line-Of-Sight-Changes.patch similarity index 93% rename from patches/unapplied/server/0650-Line-Of-Sight-Changes.patch rename to patches/server/0645-Line-Of-Sight-Changes.patch index 941f8ed350..6094d8f83a 100644 --- a/patches/unapplied/server/0650-Line-Of-Sight-Changes.patch +++ b/patches/server/0645-Line-Of-Sight-Changes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Line Of Sight Changes diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d8aee7c5980055d32960aa1af80fcf4353481b88..7f0107757c03126b54104f8446577ef417de52fe 100644 +index 5690e6447209f0a74806ce1193dfa36b21042c9f..97e8d9568f21888bc6b92fe7a8544372c8d0db71 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3517,7 +3517,8 @@ public abstract class LivingEntity extends Entity { +@@ -3542,7 +3542,8 @@ public abstract class LivingEntity extends Entity { Vec3 vec3d = new Vec3(this.getX(), this.getEyeY(), this.getZ()); Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ()); @@ -19,10 +19,10 @@ index d8aee7c5980055d32960aa1af80fcf4353481b88..7f0107757c03126b54104f8446577ef4 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index 84d84ceda1855bd1d11b2917c16fdb845a7600fe..d1fca0e3227b5f37c11367548be362f5a49b6a71 100644 +index 6c627e3f2c34557e11232fb0c5fa4f1718018ef5..e5684294b2d71c4496a47e72afe41b8ab45755fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -@@ -944,5 +944,16 @@ public abstract class CraftRegionAccessor implements RegionAccessor { +@@ -950,5 +950,16 @@ public abstract class CraftRegionAccessor implements RegionAccessor { public org.bukkit.NamespacedKey getKey() { return org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(this.getHandle().getLevel().dimension().location()); } diff --git a/patches/unapplied/server/0651-add-per-world-spawn-limits.patch b/patches/server/0646-add-per-world-spawn-limits.patch similarity index 86% rename from patches/unapplied/server/0651-add-per-world-spawn-limits.patch rename to patches/server/0646-add-per-world-spawn-limits.patch index 5d59715b0d..ffcda96f0e 100644 --- a/patches/unapplied/server/0651-add-per-world-spawn-limits.patch +++ b/patches/server/0646-add-per-world-spawn-limits.patch @@ -6,10 +6,10 @@ Subject: [PATCH] add per world spawn limits Taken from #2982. Credit to Chasewhip8 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index b1382dab98963b362c49d2e8f1a97177eadeb22d..684e091e7eb68a3e9157e7b945248821553a03df 100644 +index a31016f6b5651732c8bbcdcb239b237ccaf0a36e..e7c334dfe8f9eda2f1c8449bcae5ad983715f9db 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -210,6 +210,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -209,6 +209,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { this.biomeProvider = biomeProvider; this.environment = env; diff --git a/patches/unapplied/server/0652-Fix-PotionSplashEvent-for-water-splash-potions.patch b/patches/server/0647-Fix-PotionSplashEvent-for-water-splash-potions.patch similarity index 74% rename from patches/unapplied/server/0652-Fix-PotionSplashEvent-for-water-splash-potions.patch rename to patches/server/0647-Fix-PotionSplashEvent-for-water-splash-potions.patch index 56f02dad6e..6ae65ae8f6 100644 --- a/patches/unapplied/server/0652-Fix-PotionSplashEvent-for-water-splash-potions.patch +++ b/patches/server/0647-Fix-PotionSplashEvent-for-water-splash-potions.patch @@ -6,34 +6,33 @@ Subject: [PATCH] Fix PotionSplashEvent for water splash potions Fixes SPIGOT-6221: https://hub.spigotmc.org/jira/projects/SPIGOT/issues/SPIGOT-6221 diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java -index ebe9b713905d33a4107fe32874a783e154bd0524..fee09e6ff72cf1da389d5811dd005642cd50a5b4 100644 +index b5e2c391ebcca05db5c960792fcb14991aec4fe2..87c148922d693b5a5bfde89b0dcbc44438df592b 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java -@@ -121,30 +121,47 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie +@@ -123,18 +123,30 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie } } + private static final Predicate APPLY_WATER_GET_ENTITIES_PREDICATE = ThrownPotion.WATER_SENSITIVE.or(Axolotl.class::isInstance); // Paper private void applyWater() { AABB axisalignedbb = this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D); -- List list = this.level.getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb, ThrownPotion.WATER_SENSITIVE); +- List list = this.level.getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb, ThrownPotion.WATER_SENSITIVE_OR_ON_FIRE); + List list = this.level.getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb, ThrownPotion.APPLY_WATER_GET_ENTITIES_PREDICATE); // Paper + Map affected = new HashMap<>(); // Paper + Iterator iterator = list.iterator(); - if (!list.isEmpty()) { - Iterator iterator = list.iterator(); + while (iterator.hasNext()) { + net.minecraft.world.entity.LivingEntity entityliving = (net.minecraft.world.entity.LivingEntity) iterator.next(); ++ // Paper start - Change into single getEntities for axolotls & water sensitive ++ if (entityliving instanceof Axolotl axolotl) { ++ affected.put(axolotl.getBukkitLivingEntity(), 1.0); ++ continue; ++ } ++ // Paper end + double d0 = this.distanceToSqr((Entity) entityliving); - while (iterator.hasNext()) { - net.minecraft.world.entity.LivingEntity entityliving = (net.minecraft.world.entity.LivingEntity) iterator.next(); -+ // Paper start - Change into single getEntities for axolotls & water sensitive -+ if (entityliving instanceof Axolotl axolotl) { -+ affected.put(axolotl.getBukkitLivingEntity(), 1.0); -+ continue; -+ } -+ // Paper end - double d0 = this.distanceToSqr((Entity) entityliving); - - if (d0 < 16.0D && entityliving.isSensitiveToWater()) { + if (d0 < 16.0D) { + if (entityliving.isSensitiveToWater()) { - entityliving.hurt(DamageSource.indirectMagic(this, this.getOwner()), 1.0F); + // Paper start + double intensity = 1.0D - Math.sqrt(d0) / 4.0D; @@ -41,6 +40,9 @@ index ebe9b713905d33a4107fe32874a783e154bd0524..fee09e6ff72cf1da389d5811dd005642 + // entityliving.hurt(DamageSource.indirectMagic(this, this.getOwner()), 1.0F); // Paper - moved down + // Paper end } + + if (entityliving.isOnFire() && entityliving.isAlive()) { +@@ -143,13 +155,18 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie } } @@ -66,7 +68,7 @@ index ebe9b713905d33a4107fe32874a783e154bd0524..fee09e6ff72cf1da389d5811dd005642 } } -@@ -165,6 +182,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie +@@ -170,6 +187,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie double d0 = this.distanceToSqr((Entity) entityliving); if (d0 < 16.0D) { diff --git a/patches/unapplied/server/0653-Add-more-LimitedRegion-API.patch b/patches/server/0648-Add-more-LimitedRegion-API.patch similarity index 100% rename from patches/unapplied/server/0653-Add-more-LimitedRegion-API.patch rename to patches/server/0648-Add-more-LimitedRegion-API.patch diff --git a/patches/unapplied/server/0654-Fix-PlayerDropItemEvent-using-wrong-item.patch b/patches/server/0649-Fix-PlayerDropItemEvent-using-wrong-item.patch similarity index 82% rename from patches/unapplied/server/0654-Fix-PlayerDropItemEvent-using-wrong-item.patch rename to patches/server/0649-Fix-PlayerDropItemEvent-using-wrong-item.patch index 082bf083be..2b4a3cc593 100644 --- a/patches/unapplied/server/0654-Fix-PlayerDropItemEvent-using-wrong-item.patch +++ b/patches/server/0649-Fix-PlayerDropItemEvent-using-wrong-item.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix PlayerDropItemEvent using wrong item diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index f033a1a2bb3e44d30107bf1494b315cdc0c94b56..5bbc8f5f1f5c66ae6d1128d87fb7dde0b546387e 100644 +index 74cbc44cf71f482c05e1efacf35dc4b68c412b4a..b21b4e4113b2dc80ba3536e7ab3d700e8db01339 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2202,7 +2202,7 @@ public class ServerPlayer extends Player { +@@ -2227,7 +2227,7 @@ public class ServerPlayer extends Player { if (retainOwnership) { if (!itemstack1.isEmpty()) { @@ -18,10 +18,10 @@ index f033a1a2bb3e44d30107bf1494b315cdc0c94b56..5bbc8f5f1f5c66ae6d1128d87fb7dde0 this.awardStat(Stats.DROP); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 350d6a987fcebde60154e8ffde9372490090075d..e44351546f25421c959e091d0831197621553b41 100644 +index a591211e8ad46401ae91f0198bb2f06b2e2074dd..9a00e515f3e7717eaa088dab7a33c28e3aae55a0 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -723,6 +723,11 @@ public abstract class Player extends LivingEntity { +@@ -718,6 +718,11 @@ public abstract class Player extends LivingEntity { } double d0 = this.getEyeY() - 0.30000001192092896D; diff --git a/patches/unapplied/server/0655-Missing-Entity-Behavior-API.patch b/patches/server/0650-Missing-Entity-Behavior-API.patch similarity index 95% rename from patches/unapplied/server/0655-Missing-Entity-Behavior-API.patch rename to patches/server/0650-Missing-Entity-Behavior-API.patch index 08374e3a0f..4317567f90 100644 --- a/patches/unapplied/server/0655-Missing-Entity-Behavior-API.patch +++ b/patches/server/0650-Missing-Entity-Behavior-API.patch @@ -117,10 +117,10 @@ index e2efbf08e39f8966cb75c9f06f8e0990fbc1dbb4..ebe6ded8adc9de83f94d5a1796856391 this.leader = null; } diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index 66293e620dcf2c7ee3e2fc91f8a7cf52f2950de1..f2243f65cdf0e4b327e8597dfefe5b2de8912cef 100644 +index 3d06d69d170634f5c643cfa717fdc5ee348d01f0..5cb23a6b85bccb6e873be24a5be39224870dac3c 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java -@@ -540,11 +540,13 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -542,11 +542,13 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { this.setFlag(4, hasStung); } @@ -135,10 +135,10 @@ index 66293e620dcf2c7ee3e2fc91f8a7cf52f2950de1..f2243f65cdf0e4b327e8597dfefe5b2d } diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java -index 04a119e6641898454253e2478bc1b4dff181b5ee..a8da601b8342aa6e4902b452eb588c76c98a7adf 100644 +index 3a06f48e9aed59d429ef4142785b393898b96f60..821b88d0c32f946af9af1c2e211b38446fab4ecb 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java -@@ -663,6 +663,14 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, +@@ -667,6 +667,15 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, } @@ -150,10 +150,11 @@ index 04a119e6641898454253e2478bc1b4dff181b5ee..a8da601b8342aa6e4902b452eb588c76 + return this.getFlag(FLAG_OPEN_MOUTH); + } + // Paper End - Horse API - private void openMouth() { - if (!this.level.isClientSide) { - this.mouthCounter = 1; -@@ -675,6 +683,11 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, ++ + @Override + public InteractionResult mobInteract(Player player, InteractionHand hand) { + if (!this.isVehicle() && !this.isBaby()) { +@@ -709,6 +718,11 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, this.setFlag(16, eatingGrass); } @@ -166,10 +167,10 @@ index 04a119e6641898454253e2478bc1b4dff181b5ee..a8da601b8342aa6e4902b452eb588c76 if (angry) { this.setEating(false); diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -index 5ffae9d3be22b5e78645da57a6bd0e7350749ef1..9aec9f80c564fa3ae03e445423d9e50afc45f837 100644 +index 1c67b4d6ec31711b7d41ea1f1394067ad8765277..39c6b9b74e072953abe6398ecfcdd444e6d8f194 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -@@ -67,7 +67,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { +@@ -72,7 +72,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder type, Level world) { super(type, world); diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -index 0d36a903b7aa8d26232e6edcb0fdbba1defde660..d4d7830ab5b9944c38a301a0e2a2150063adf229 100644 +index 807c8e18fdf5b0704638d7d084d6892556cc1525..b8d264848f917a698fc4dcd932fdcd78d487a80d 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -@@ -84,6 +84,11 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob +@@ -83,6 +83,11 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob return entityliving.getMobType() != MobType.UNDEAD && entityliving.attackable(); }; private static final TargetingConditions TARGETING_CONDITIONS = TargetingConditions.forCombat().range(20.0D).selector(WitherBoss.LIVING_ENTITY_SELECTOR); @@ -194,7 +195,7 @@ index 0d36a903b7aa8d26232e6edcb0fdbba1defde660..d4d7830ab5b9944c38a301a0e2a21500 public WitherBoss(EntityType type, Level world) { super(type, world); -@@ -601,7 +606,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob +@@ -599,7 +604,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @Override public boolean canChangeDimensions() { @@ -204,10 +205,10 @@ index 0d36a903b7aa8d26232e6edcb0fdbba1defde660..d4d7830ab5b9944c38a301a0e2a21500 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -index e0e32528ed9f2f494b5ee2079c3167021f2e84c4..f22e615dba31619c97bf58930da060476a52facf 100644 +index 1d8cf9b765f9c55feeb26e4ba4aa969be142dc3f..f4002ac7cba7d5e41b4f11b98212c625f6a92a65 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java +++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -@@ -433,6 +433,16 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -449,6 +449,16 @@ public class EnderMan extends Monster implements NeutralMob { this.entityData.set(EnderMan.DATA_STARED_AT, true); } @@ -242,10 +243,10 @@ index 1f3506d38894fea224f3b2f125b45c3b68d705c7..bb2cb17e4e5ce142eeec18951c8948e3 protected boolean shouldDespawnInPeaceful() { return true; diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -index e93a2634cd80cd4f1caf6bd60e569783bc6b577c..fb0a77b4cf1ba47c73c00993bd9b7454240fe5d6 100644 +index bbeb9ebe0a939281ef67d624d589c53bee55b44d..aabedf25fa40ffa0d7b378c6006928f806ef0fa6 100644 --- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -197,6 +197,12 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { +@@ -198,6 +198,12 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { } public void startConverting(@Nullable UUID uuid, int delay) { @@ -258,7 +259,7 @@ index e93a2634cd80cd4f1caf6bd60e569783bc6b577c..fb0a77b4cf1ba47c73c00993bd9b7454 this.conversionStarter = uuid; this.villagerConversionTime = delay; this.getEntityData().set(ZombieVillager.DATA_CONVERTING_ID, true); -@@ -204,7 +210,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { +@@ -205,7 +211,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { this.removeEffect(MobEffects.WEAKNESS, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION); this.addEffect(new MobEffectInstance(MobEffects.DAMAGE_BOOST, delay, Math.min(this.level.getDifficulty().getId() - 1, 0)), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION); // CraftBukkit end @@ -268,7 +269,7 @@ index e93a2634cd80cd4f1caf6bd60e569783bc6b577c..fb0a77b4cf1ba47c73c00993bd9b7454 @Override diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java -index c5b82dcf6c9da9d6699f699c3e13d9b949128cc8..d890446315787b7aaa2869637e905c25c93558aa 100644 +index 97d123891a926d7234ed85dc54690b8b0dcd32bb..fb6e590e4613f59aaa8278932134aa0ca3d9da8f 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java @@ -105,6 +105,20 @@ public class ThrownTrident extends AbstractArrow { @@ -293,10 +294,10 @@ index c5b82dcf6c9da9d6699f699c3e13d9b949128cc8..d890446315787b7aaa2869637e905c25 @Override protected EntityHitResult findHitEntity(Vec3 currentPosition, Vec3 nextPosition) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index d1fca0e3227b5f37c11367548be362f5a49b6a71..11ee6a2b264b570b61facec5625f6257259432bd 100644 +index e5684294b2d71c4496a47e72afe41b8ab45755fc..bb486249d409743b0fc9891ac5ae76a38034800b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -@@ -797,14 +797,19 @@ public abstract class CraftRegionAccessor implements RegionAccessor { +@@ -803,14 +803,19 @@ public abstract class CraftRegionAccessor implements RegionAccessor { } else if (Phantom.class.isAssignableFrom(clazz)) { entity = net.minecraft.world.entity.EntityType.PHANTOM.create(world); } else if (Fish.class.isAssignableFrom(clazz)) { @@ -441,10 +442,10 @@ index 8ada3dfbe89c8b55d85c31c71e365af0cbf66d19..1ae8d6e819cd9d195e1bd31ccf55d289 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java -index 37352ca3ff267d02a26ed182ce3df3ef775fa9bc..6a504f61c55d3983871f8d1c5c002c7a7b9c50ff 100644 +index d2531a2a323be74169324a5cb2c558655c380ea6..273a062090f4c6f6ffd5a4238623b32af497f6b6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java -@@ -51,4 +51,25 @@ public class CraftCat extends CraftTameableAnimal implements Cat { +@@ -50,4 +50,25 @@ public class CraftCat extends CraftTameableAnimal implements Cat { public void setCollarColor(DyeColor color) { this.getHandle().setCollarColor(net.minecraft.world.item.DyeColor.byId(color.getWoolData())); } @@ -567,10 +568,10 @@ index 04976616da8c85b1278dad33ff05554aa74a6b33..75c7645fb5732c43d1da15181cf5c7ee + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index d34e1da89e04df311c1627f43790851c23fef0b0..cc86c455588f33463100a58f3be6f21e26dda5da 100644 +index b28187c9a9a678cfd17d6fb1813226a0d32ec84c..f1ee89047e8cd916c762b91162842e3f981856b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -223,10 +223,16 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -224,10 +224,16 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { else { return new CraftSquid(server, (Squid) entity); } } else if (entity instanceof AbstractFish) { @@ -591,7 +592,7 @@ index d34e1da89e04df311c1627f43790851c23fef0b0..cc86c455588f33463100a58f3be6f21e else { return new CraftFish(server, (AbstractFish) entity); } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java -index f6369a1b0ea3fc64e9e7902d9da25924a0745855..fce96b67300b8808984904ee19d4e987f5235bfd 100644 +index d66c3b6da16b09a471fbbc07ee143a02468c9228..6c71be9b453fb662276869a24257969941501c0e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java @@ -119,4 +119,41 @@ public class CraftFox extends CraftAnimals implements Fox { @@ -659,7 +660,7 @@ index 7adda5c93e7c172ea0ba4a3f15828b5e54a283e7..fffaf4108b632ceabac4186d93b34ad0 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java -index ae05f526f9ec70a2992ef3ee66b7f57eca2351fc..15e2c2653d7d41e8bafa0ffe1afaa733c569b2ab 100644 +index 5500d5768bb22f70b99aa28cf4541b4871e12139..4d7a2c4c1001aefe9fcd4be8dbcb414f721bfff9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java @@ -64,4 +64,36 @@ public class CraftLlama extends CraftChestedHorse implements Llama, com.destroys @@ -759,11 +760,11 @@ index 9569068c0a6e1eb934f063634f5d3efe674aa33d..dfd0b5e018194343ca40629db6f70c60 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -index 7fe1eae79dfac7e02f85bae9c1990467a4b0037b..b68e0dbd709085df795dc72b552ced9ac5de47e7 100644 +index 383c6d464e8077eeb900d61baa6a02f15a818b01..20eaa3424428b8b30fd15591b660983cb7fc4375 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java @@ -28,6 +28,38 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow { - this.getHandle().setMushroomType(net.minecraft.world.entity.animal.MushroomCow.MushroomType.values()[variant.ordinal()]); + this.getHandle().setVariant(net.minecraft.world.entity.animal.MushroomCow.MushroomType.values()[variant.ordinal()]); } + // Paper start @@ -1016,7 +1017,7 @@ index bf5b2fd6676c4430578db4cc6c603c501cc5e349..832981b07ef5c633ef00a382f56798ee + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java -index aca8111f7e435d7ab5499b0bba4100c6bc4cd079..e37abe9e28b6e2ff4fe892357300d3d0d205fecd 100644 +index ee84a90772381f7cfe864642c860880b827d25ea..4352af0a76ce4a4cd4afbea96f4851ef2b64ac7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java @@ -8,7 +8,7 @@ import org.bukkit.entity.EntityType; @@ -1060,7 +1061,7 @@ index 2ba16e33dd21c3c72cb12244aa78c59bf53e76d1..634a5099fb6faea03615783f57e643ad @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java -index 8a0a905f6701c6e94cbbf15793788350958fb728..2a74e6ecb4f57bc6879b37f7bc0675417223bcbf 100644 +index e98242321fcaa5cbaa242cb7e77832378a8aecf6..3954fe7e5f9ce8ea9300bfb92b7e4f4b55f0e6da 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java @@ -72,13 +72,20 @@ public class CraftVillagerZombie extends CraftZombie implements ZombieVillager { diff --git a/patches/unapplied/server/0656-Ensure-disconnect-for-book-edit-is-called-on-main.patch b/patches/server/0651-Ensure-disconnect-for-book-edit-is-called-on-main.patch similarity index 88% rename from patches/unapplied/server/0656-Ensure-disconnect-for-book-edit-is-called-on-main.patch rename to patches/server/0651-Ensure-disconnect-for-book-edit-is-called-on-main.patch index 79fad9c132..5de7947595 100644 --- a/patches/unapplied/server/0656-Ensure-disconnect-for-book-edit-is-called-on-main.patch +++ b/patches/server/0651-Ensure-disconnect-for-book-edit-is-called-on-main.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Ensure disconnect for book edit is called on main diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index db43e6c4673a4f679132869b7cb22911cb015ee2..cda39f4ba09e5c9aabf68bd2df4f593554201ff9 100644 +index 5567689b642ca591bacd47d5d613191caee97e3d..cdbab53cff509b308ab8dfc4c70f27037bbbe948 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1213,7 +1213,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1205,7 +1205,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper end // CraftBukkit start if (this.lastBookTick + 20 > MinecraftServer.currentTick) { diff --git a/patches/unapplied/server/0657-Fix-return-value-of-Block-applyBoneMeal-always-being.patch b/patches/server/0652-Fix-return-value-of-Block-applyBoneMeal-always-being.patch similarity index 84% rename from patches/unapplied/server/0657-Fix-return-value-of-Block-applyBoneMeal-always-being.patch rename to patches/server/0652-Fix-return-value-of-Block-applyBoneMeal-always-being.patch index 863796fe03..8cb3e43344 100644 --- a/patches/unapplied/server/0657-Fix-return-value-of-Block-applyBoneMeal-always-being.patch +++ b/patches/server/0652-Fix-return-value-of-Block-applyBoneMeal-always-being.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix return value of Block#applyBoneMeal always being false diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 1bd1f5993fc296b7d8255cabaf28382c2e258099..b2628b1698ef2a235e7b465f09747cafbb133b7a 100644 +index 8c5f9f2bb0c200a5ef7ad09b27afa6dad057c6f8..6ec8ebdd702424d94821180f65f6344be1a0527a 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -558,7 +558,7 @@ public class CraftBlock implements Block { +@@ -560,7 +560,7 @@ public class CraftBlock implements Block { } } diff --git a/patches/unapplied/server/0658-Use-getChunkIfLoadedImmediately-in-places.patch b/patches/server/0653-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 69% rename from patches/unapplied/server/0658-Use-getChunkIfLoadedImmediately-in-places.patch rename to patches/server/0653-Use-getChunkIfLoadedImmediately-in-places.patch index 104ecc47b6..15a23fa72f 100644 --- a/patches/unapplied/server/0658-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/patches/server/0653-Use-getChunkIfLoadedImmediately-in-places.patch @@ -8,10 +8,10 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk load in that case). diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 8a18b41bba88c8fd75bc08576a8f01b7967dbda5..acc378462a9e24cfa51d89f67b8252aeb2198bf1 100644 +index 862314a0a73c2c6676fa4a4dc70bc719a356a93b..17aaa93e5ad6badb7a220e891328962a69a63a7b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -225,7 +225,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -228,7 +228,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI @@ -20,20 +20,11 @@ index 8a18b41bba88c8fd75bc08576a8f01b7967dbda5..acc378462a9e24cfa51d89f67b8252ae } @Override -@@ -1479,7 +1479,7 @@ public class ServerLevel extends Level implements WorldGenLevel { - - for (int l1 = j; l1 <= i1; ++l1) { - for (int i2 = l; i2 <= k1; ++i2) { -- LevelChunk chunk = this.getChunkSource().getChunkNow(l1, i2); -+ LevelChunk chunk = (LevelChunk) this.getChunkIfLoadedImmediately(l1, i2); // Paper - - if (chunk != null) { - for (int j2 = k; j2 <= j1; ++j2) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 74d9ed2606c2fd10e9b633cdb584654cfa8f0ab8..e2e705d9d48adf61bb10f0ef60e2717ea660e24a 100644 +index e42cb082e4f3643fbae730d23b53ccc5c3440665..8a73f999c18bd3f8880af831f7d4bc3c97241627 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -199,6 +199,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -198,6 +198,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return (CraftServer) Bukkit.getServer(); } @@ -47,3 +38,16 @@ index 74d9ed2606c2fd10e9b633cdb584654cfa8f0ab8..e2e705d9d48adf61bb10f0ef60e2717e public abstract ResourceKey getTypeKey(); protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, Holder holder, Supplier supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor +diff --git a/src/main/java/net/minecraft/world/level/gameevent/GameEventDispatcher.java b/src/main/java/net/minecraft/world/level/gameevent/GameEventDispatcher.java +index a4c9eecc7c0794b93d290855391ba71ab63eab54..11349f02d453c78e1cf0db8b89042b9023aa02bb 100644 +--- a/src/main/java/net/minecraft/world/level/gameevent/GameEventDispatcher.java ++++ b/src/main/java/net/minecraft/world/level/gameevent/GameEventDispatcher.java +@@ -56,7 +56,7 @@ public class GameEventDispatcher { + + for (int l1 = j; l1 <= i1; ++l1) { + for (int i2 = l; i2 <= k1; ++i2) { +- LevelChunk chunk = this.level.getChunkSource().getChunkNow(l1, i2); ++ LevelChunk chunk = (LevelChunk) this.level.getChunkIfLoadedImmediately(l1, i2); // Paper + + if (chunk != null) { + for (int j2 = k; j2 <= j1; ++j2) { diff --git a/patches/unapplied/server/0659-Fix-commands-from-signs-not-firing-command-events.patch b/patches/server/0654-Fix-commands-from-signs-not-firing-command-events.patch similarity index 95% rename from patches/unapplied/server/0659-Fix-commands-from-signs-not-firing-command-events.patch rename to patches/server/0654-Fix-commands-from-signs-not-firing-command-events.patch index 67844b2f67..3b091b6fa5 100644 --- a/patches/unapplied/server/0659-Fix-commands-from-signs-not-firing-command-events.patch +++ b/patches/server/0654-Fix-commands-from-signs-not-firing-command-events.patch @@ -58,10 +58,10 @@ index 0000000000000000000000000000000000000000..01a2bc1feec808790bb93618ce46adb9 + } +} diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -index 831db5ee21938d71e99bf9d17b92a6ca15531740..58599ead28c25a76d9f41d2d29ee8024c9afdccd 100644 +index aca2da47651a76f3e5593d71c500d749d92ccc3b..4da4edae517a0efec6e03a719ec47b700509dab1 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -@@ -40,6 +40,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C +@@ -43,6 +43,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C private boolean renderMessagedFiltered; private DyeColor color; private boolean hasGlowingText; @@ -69,7 +69,7 @@ index 831db5ee21938d71e99bf9d17b92a6ca15531740..58599ead28c25a76d9f41d2d29ee8024 public SignBlockEntity(BlockPos pos, BlockState state) { super(BlockEntityType.SIGN, pos, state); -@@ -224,7 +225,17 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C +@@ -260,7 +261,17 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C ClickEvent chatclickable = chatmodifier.getClickEvent(); if (chatclickable != null && chatclickable.getAction() == ClickEvent.Action.RUN_COMMAND) { @@ -88,7 +88,7 @@ index 831db5ee21938d71e99bf9d17b92a6ca15531740..58599ead28c25a76d9f41d2d29ee8024 } } -@@ -260,8 +271,21 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C +@@ -296,8 +307,21 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C String s = player == null ? "Sign" : player.getName().getString(); Object object = player == null ? Component.literal("Sign") : player.getDisplayName(); diff --git a/patches/unapplied/server/0660-Adds-PlayerArmSwingEvent.patch b/patches/server/0655-Adds-PlayerArmSwingEvent.patch similarity index 88% rename from patches/unapplied/server/0660-Adds-PlayerArmSwingEvent.patch rename to patches/server/0655-Adds-PlayerArmSwingEvent.patch index 9276ee0939..b90fcd3f15 100644 --- a/patches/unapplied/server/0660-Adds-PlayerArmSwingEvent.patch +++ b/patches/server/0655-Adds-PlayerArmSwingEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Adds PlayerArmSwingEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index cda39f4ba09e5c9aabf68bd2df4f593554201ff9..20fdebcabbeb008b3e412d471fd6b471d99d0614 100644 +index cdbab53cff509b308ab8dfc4c70f27037bbbe948..bf11a9ad6d777c7634b5c02b0122528c9c05302a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2631,7 +2631,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2529,7 +2529,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Arm swing animation diff --git a/patches/unapplied/server/0661-Fixes-kick-event-leave-message-not-being-sent.patch b/patches/server/0656-Fixes-kick-event-leave-message-not-being-sent.patch similarity index 86% rename from patches/unapplied/server/0661-Fixes-kick-event-leave-message-not-being-sent.patch rename to patches/server/0656-Fixes-kick-event-leave-message-not-being-sent.patch index 7f901f87c1..20eac018ce 100644 --- a/patches/unapplied/server/0661-Fixes-kick-event-leave-message-not-being-sent.patch +++ b/patches/server/0656-Fixes-kick-event-leave-message-not-being-sent.patch @@ -5,22 +5,22 @@ Subject: [PATCH] Fixes kick event leave message not being sent diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 5bbc8f5f1f5c66ae6d1128d87fb7dde0b546387e..e505fa3a6f90efec32e408a08a31295ae829ac2c 100644 +index b21b4e4113b2dc80ba3536e7ab3d700e8db01339..4bf491ceca7291c3df727cfd55873d260078b692 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -259,7 +259,6 @@ public class ServerPlayer extends Player { +@@ -264,7 +264,6 @@ public class ServerPlayer extends Player { public boolean supressTrackerForLogin = false; // Paper public boolean didPlayerJoinEvent = false; // Paper public Integer clientViewDistance; - public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent // CraftBukkit end - public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - + public boolean isRealPlayer; // Paper + public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 20fdebcabbeb008b3e412d471fd6b471d99d0614..1a2446afabce39a488d680f66c5e5b581863b4ae 100644 +index bf11a9ad6d777c7634b5c02b0122528c9c05302a..c760a12fd857efe438a302cf02e2bfb627753fab 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -522,7 +522,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -514,7 +514,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Do not kick the player return; } @@ -28,7 +28,7 @@ index 20fdebcabbeb008b3e412d471fd6b471d99d0614..1a2446afabce39a488d680f66c5e5b58 // Send the possibly modified leave message final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure // CraftBukkit end -@@ -531,7 +530,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -523,7 +522,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> { this.connection.disconnect(ichatbasecomponent); })); @@ -37,7 +37,7 @@ index 20fdebcabbeb008b3e412d471fd6b471d99d0614..1a2446afabce39a488d680f66c5e5b58 this.connection.setReadOnly(); MinecraftServer minecraftserver = this.server; Connection networkmanager = this.connection; -@@ -1998,6 +1997,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1994,6 +1993,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void onDisconnect(Component reason) { @@ -49,7 +49,7 @@ index 20fdebcabbeb008b3e412d471fd6b471d99d0614..1a2446afabce39a488d680f66c5e5b58 // CraftBukkit start - Rarely it would send a disconnect line twice if (this.processedDisconnect) { return; -@@ -2014,7 +2018,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2011,7 +2015,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.disconnect(); // Paper start - Adventure @@ -59,10 +59,10 @@ index 20fdebcabbeb008b3e412d471fd6b471d99d0614..1a2446afabce39a488d680f66c5e5b58 this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false); // Paper end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index d2ecd5143e931579b96f434c0d3ced4a87e739ac..c72f6e73a80f7e738362c02f03deb6f245c0c7c5 100644 +index 20598ef01293d8889145921cb3c5a9c7287b6b23..20ba3b4fc4781205b04eab3670989b7634143e03 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -598,6 +598,11 @@ public abstract class PlayerList { +@@ -606,6 +606,11 @@ public abstract class PlayerList { } public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer) { // Paper - return Component @@ -74,7 +74,7 @@ index d2ecd5143e931579b96f434c0d3ced4a87e739ac..c72f6e73a80f7e738362c02f03deb6f2 ServerLevel worldserver = entityplayer.getLevel(); entityplayer.awardStat(Stats.LEAVE_GAME); -@@ -608,7 +613,7 @@ public abstract class PlayerList { +@@ -616,7 +621,7 @@ public abstract class PlayerList { entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper } diff --git a/patches/unapplied/server/0662-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/0657-Add-config-for-mobs-immune-to-default-effects.patch similarity index 88% rename from patches/unapplied/server/0662-Add-config-for-mobs-immune-to-default-effects.patch rename to patches/server/0657-Add-config-for-mobs-immune-to-default-effects.patch index 9a5036a4d1..390f37c70e 100644 --- a/patches/unapplied/server/0662-Add-config-for-mobs-immune-to-default-effects.patch +++ b/patches/server/0657-Add-config-for-mobs-immune-to-default-effects.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add config for mobs immune to default effects diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 7f0107757c03126b54104f8446577ef417de52fe..530b94a864536f4bfd3c5250a2ffe40069b5bac2 100644 +index 97e8d9568f21888bc6b92fe7a8544372c8d0db71..36d27f64a837630d5056b0cf5a0b1b009d1d4f0f 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1153,7 +1153,7 @@ public abstract class LivingEntity extends Entity { +@@ -1152,7 +1152,7 @@ public abstract class LivingEntity extends Entity { if (this.getMobType() == MobType.UNDEAD) { MobEffect mobeffectlist = effect.getEffect(); @@ -18,10 +18,10 @@ index 7f0107757c03126b54104f8446577ef417de52fe..530b94a864536f4bfd3c5250a2ffe400 } } diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -index d4d7830ab5b9944c38a301a0e2a2150063adf229..b9d42e59a9f9e9ee4e6a06e2245a00dcc34f9002 100644 +index b8d264848f917a698fc4dcd932fdcd78d487a80d..b781c849737225c00f1dd8d45a6d08cebc000263 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -@@ -611,7 +611,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob +@@ -609,7 +609,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @Override public boolean canBeAffected(MobEffectInstance effect) { @@ -31,7 +31,7 @@ index d4d7830ab5b9944c38a301a0e2a2150063adf229..b9d42e59a9f9e9ee4e6a06e2245a00dc private class WitherDoNothingGoal extends Goal { diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java -index 46779380f44a037d3915f287f40515a9bd31a439..c3085ad5410b41d9c7703b28ca835dbee3f49ee7 100644 +index d0d53d576a9bd79f721a8264a15bcfdd4a2132d0..001f6cf2ea3d664864f444a92dd71d069b9a38f5 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Spider.java +++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java @@ -133,7 +133,7 @@ public class Spider extends Monster { diff --git a/patches/unapplied/server/0663-Fix-incorrect-message-for-outdated-client.patch b/patches/server/0658-Fix-incorrect-message-for-outdated-client.patch similarity index 100% rename from patches/unapplied/server/0663-Fix-incorrect-message-for-outdated-client.patch rename to patches/server/0658-Fix-incorrect-message-for-outdated-client.patch diff --git a/patches/unapplied/server/0664-Don-t-apply-cramming-damage-to-players.patch b/patches/server/0659-Don-t-apply-cramming-damage-to-players.patch similarity index 89% rename from patches/unapplied/server/0664-Don-t-apply-cramming-damage-to-players.patch rename to patches/server/0659-Don-t-apply-cramming-damage-to-players.patch index 99755d10d8..45cec72081 100644 --- a/patches/unapplied/server/0664-Don-t-apply-cramming-damage-to-players.patch +++ b/patches/server/0659-Don-t-apply-cramming-damage-to-players.patch @@ -11,10 +11,10 @@ It does not make a lot of sense to damage players if they get crammed, For those who really want it a config option is provided. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e505fa3a6f90efec32e408a08a31295ae829ac2c..b335d10dcc2f23c6b7b9976b33af5ab2f221f15c 100644 +index 4bf491ceca7291c3df727cfd55873d260078b692..c8d55095c20ab5c5b4eb1767aa4b1210d0aa5cda 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1433,7 +1433,7 @@ public class ServerPlayer extends Player { +@@ -1455,7 +1455,7 @@ public class ServerPlayer extends Player { @Override public boolean isInvulnerableTo(DamageSource damageSource) { diff --git a/patches/unapplied/server/0665-Rate-options-and-timings-for-sensors-and-behaviors.patch b/patches/server/0660-Rate-options-and-timings-for-sensors-and-behaviors.patch similarity index 93% rename from patches/unapplied/server/0665-Rate-options-and-timings-for-sensors-and-behaviors.patch rename to patches/server/0660-Rate-options-and-timings-for-sensors-and-behaviors.patch index 30867e6cf9..9fda987dbe 100644 --- a/patches/unapplied/server/0665-Rate-options-and-timings-for-sensors-and-behaviors.patch +++ b/patches/server/0660-Rate-options-and-timings-for-sensors-and-behaviors.patch @@ -28,10 +28,10 @@ index 3f540dc05315103ef97fd53628f681c67f7e7c2d..23e564b05ba438924180c91f9b19a607 * Get a named timer for the specified tile entity type to track type specific timings. * @param entity diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java -index ea5dea8fc6af73afb3b9f79bcb254e1644a3b302..eb5a332f0705dd2e5568749a22f2f318d68010d1 100644 +index 4ea437253539e3ee533ca9da77a337cbf4d1e807..57ef7fbba3028c28231abf7b7ae78aa019323536 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java -@@ -13,6 +13,10 @@ public abstract class Behavior { +@@ -13,6 +13,10 @@ public abstract class Behavior implements BehaviorContro private long endTimestamp; private final int minDuration; private final int maxDuration; @@ -42,7 +42,7 @@ index ea5dea8fc6af73afb3b9f79bcb254e1644a3b302..eb5a332f0705dd2e5568749a22f2f318 public Behavior(Map, MemoryStatus> requiredMemoryState) { this(requiredMemoryState, 60); -@@ -26,6 +30,15 @@ public abstract class Behavior { +@@ -26,6 +30,15 @@ public abstract class Behavior implements BehaviorContro this.minDuration = minRunTime; this.maxDuration = maxRunTime; this.entryCondition = requiredMemoryState; @@ -57,10 +57,10 @@ index ea5dea8fc6af73afb3b9f79bcb254e1644a3b302..eb5a332f0705dd2e5568749a22f2f318 + // Paper end } - public Behavior.Status getStatus() { -@@ -33,11 +46,19 @@ public abstract class Behavior { - } + @Override +@@ -35,11 +48,19 @@ public abstract class Behavior implements BehaviorContro + @Override public final boolean tryStart(ServerLevel world, E entity, long time) { + // Paper start - behavior tick rate + int tickRate = java.util.Objects.requireNonNullElse(world.paperConfig().tickRates.behavior.get(entity.getType(), this.configKey), -1); @@ -78,9 +78,9 @@ index ea5dea8fc6af73afb3b9f79bcb254e1644a3b302..eb5a332f0705dd2e5568749a22f2f318 return true; } else { return false; -@@ -48,11 +69,13 @@ public abstract class Behavior { - } +@@ -51,11 +72,13 @@ public abstract class Behavior implements BehaviorContro + @Override public final void tickOrStop(ServerLevel world, E entity, long time) { + this.timing.startTiming(); // Paper - behavior timings if (!this.timedOut(time) && this.canStillUse(world, entity, time)) { diff --git a/patches/unapplied/server/0666-Add-a-bunch-of-missing-forceDrop-toggles.patch b/patches/server/0661-Add-a-bunch-of-missing-forceDrop-toggles.patch similarity index 89% rename from patches/unapplied/server/0666-Add-a-bunch-of-missing-forceDrop-toggles.patch rename to patches/server/0661-Add-a-bunch-of-missing-forceDrop-toggles.patch index 43cef84f6f..94ed89a597 100644 --- a/patches/unapplied/server/0666-Add-a-bunch-of-missing-forceDrop-toggles.patch +++ b/patches/server/0661-Add-a-bunch-of-missing-forceDrop-toggles.patch @@ -19,10 +19,10 @@ index e47f3092b6bd6b86b577de705db1a575d0952348..490212cfe4e5cea7219eaf4304e14bfa } diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java -index 9c07e3f5554b3b9cf2a2c4d9239a72342567d7f1..a5633cb6824e801732f5ca2dbc01691794a6975b 100644 +index 2db5d8a937c841718e7b568c215109c39775d82c..0a18108fda778af5b600f77533770bd98584d60e 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Panda.java +++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java -@@ -522,7 +522,9 @@ public class Panda extends Animal { +@@ -528,7 +528,9 @@ public class Panda extends Animal { } if (!this.level.isClientSide() && this.random.nextInt(700) == 0 && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { @@ -32,7 +32,7 @@ index 9c07e3f5554b3b9cf2a2c4d9239a72342567d7f1..a5633cb6824e801732f5ca2dbc016917 } } -@@ -646,7 +648,9 @@ public class Panda extends Animal { +@@ -652,7 +654,9 @@ public class Panda extends Animal { ItemStack itemstack1 = this.getItemBySlot(EquipmentSlot.MAINHAND); if (!itemstack1.isEmpty() && !player.getAbilities().instabuild) { @@ -42,7 +42,7 @@ index 9c07e3f5554b3b9cf2a2c4d9239a72342567d7f1..a5633cb6824e801732f5ca2dbc016917 } this.setItemSlot(EquipmentSlot.MAINHAND, new ItemStack(itemstack.getItem(), 1)); -@@ -938,7 +942,9 @@ public class Panda extends Animal { +@@ -929,7 +933,9 @@ public class Panda extends Animal { ItemStack itemstack = Panda.this.getItemBySlot(EquipmentSlot.MAINHAND); if (!itemstack.isEmpty()) { @@ -53,10 +53,10 @@ index 9c07e3f5554b3b9cf2a2c4d9239a72342567d7f1..a5633cb6824e801732f5ca2dbc016917 int i = Panda.this.isLazy() ? Panda.this.random.nextInt(50) + 10 : Panda.this.random.nextInt(150) + 10; diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java -index d733bcf1049a21009c2548679a51563c15f79523..793576928dad6752dddd86e62d4c0800d8515fc4 100644 +index 035c0ff01000f3fd57e1fcab13b93cafb133a169..7b42f7bd100808cb2367d0d7c7361e8f2e597502 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java -@@ -306,7 +306,9 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento +@@ -325,7 +325,9 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento @Override protected void finishConversion(ServerLevel world) { PiglinAi.cancelAdmiring(this); @@ -67,10 +67,10 @@ index d733bcf1049a21009c2548679a51563c15f79523..793576928dad6752dddd86e62d4c0800 } diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java -index 8aecd15cfb915f44bc6208b656e7db309270c132..5c6b4676c2020b358f8057e9a583eb176c826cb3 100644 +index e6d398f07564b4027552db9836e6da2c0972cd42..a3c28f327627b340905ba61238ce8454db0ec9ee 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java -@@ -260,7 +260,9 @@ public class PiglinAi { +@@ -270,7 +270,9 @@ public class PiglinAi { private static void holdInOffhand(Piglin piglin, ItemStack stack) { if (PiglinAi.isHoldingItemInOffHand(piglin)) { @@ -80,7 +80,7 @@ index 8aecd15cfb915f44bc6208b656e7db309270c132..5c6b4676c2020b358f8057e9a583eb17 } piglin.holdInOffHand(stack); -@@ -320,7 +322,9 @@ public class PiglinAi { +@@ -330,7 +332,9 @@ public class PiglinAi { protected static void cancelAdmiring(Piglin piglin) { if (PiglinAi.isAdmiringItem(piglin) && !piglin.getOffhandItem().isEmpty()) { diff --git a/patches/unapplied/server/0667-Stinger-API.patch b/patches/server/0662-Stinger-API.patch similarity index 100% rename from patches/unapplied/server/0667-Stinger-API.patch rename to patches/server/0662-Stinger-API.patch diff --git a/patches/unapplied/server/0668-Fix-incosistency-issue-with-empty-map-items-in-CB.patch b/patches/server/0663-Fix-incosistency-issue-with-empty-map-items-in-CB.patch similarity index 91% rename from patches/unapplied/server/0668-Fix-incosistency-issue-with-empty-map-items-in-CB.patch rename to patches/server/0663-Fix-incosistency-issue-with-empty-map-items-in-CB.patch index 3f1afe6bf8..5ee54b974b 100644 --- a/patches/unapplied/server/0668-Fix-incosistency-issue-with-empty-map-items-in-CB.patch +++ b/patches/server/0663-Fix-incosistency-issue-with-empty-map-items-in-CB.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix incosistency issue with empty map items in CB diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java -index d407cf849a31a7a77fda07aa687ebb254f43d6ab..45a7e01288f780cf8a812d8e0ae12c4fb79d79e1 100644 +index f883e1bc4150bc074f1d8363a95b4eae16f3828e..586852e347cfeb6e52d16e51b3f193e814036e81 100644 --- a/src/main/java/net/minecraft/world/item/MapItem.java +++ b/src/main/java/net/minecraft/world/item/MapItem.java -@@ -71,7 +71,7 @@ public class MapItem extends ComplexItem { +@@ -73,7 +73,7 @@ public class MapItem extends ComplexItem { public static Integer getMapId(ItemStack stack) { CompoundTag nbttagcompound = stack.getTag(); diff --git a/patches/unapplied/server/0669-Add-System.out-err-catcher.patch b/patches/server/0664-Add-System.out-err-catcher.patch similarity index 97% rename from patches/unapplied/server/0669-Add-System.out-err-catcher.patch rename to patches/server/0664-Add-System.out-err-catcher.patch index 9c4386581a..a9562b9aca 100644 --- a/patches/unapplied/server/0669-Add-System.out-err-catcher.patch +++ b/patches/server/0664-Add-System.out-err-catcher.patch @@ -105,10 +105,10 @@ index 0000000000000000000000000000000000000000..76d0d00cd6742991e3f3ec827a75ee87 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index acc385d4b6852a55e93a5c19755a3d7f59a16eea..3ebf81b45cf1897471a3262d23cc59dd45652b6d 100644 +index 02f677322ed2d9d921d7c0151a9cedb96722dc11..1b4143092f709541469c037325d826f25d9e675f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -284,6 +284,7 @@ public final class CraftServer implements Server { +@@ -297,6 +297,7 @@ public final class CraftServer implements Server { public int reloadCount; private final io.papermc.paper.datapack.PaperDatapackManager datapackManager; // Paper public static Exception excessiveVelEx; // Paper - Velocity warnings diff --git a/patches/unapplied/server/0670-Fix-test-not-bootstrapping.patch b/patches/server/0665-Fix-test-not-bootstrapping.patch similarity index 91% rename from patches/unapplied/server/0670-Fix-test-not-bootstrapping.patch rename to patches/server/0665-Fix-test-not-bootstrapping.patch index 5d0466c3b3..6c582bf1e6 100644 --- a/patches/unapplied/server/0670-Fix-test-not-bootstrapping.patch +++ b/patches/server/0665-Fix-test-not-bootstrapping.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix test not bootstrapping Signed-off-by: Mariell Hoversholm diff --git a/src/test/java/org/bukkit/enchantments/EnchantmentTargetTest.java b/src/test/java/org/bukkit/enchantments/EnchantmentTargetTest.java -index 19777eaca02640f220626940f5384563777dd74a..9873addca9e7a2a7eaa30a1c1cd332260ca07b35 100644 +index 439bf35c251ab5dc0d27923e62789a496618de82..5d3b8ba99d0fe966b7329540d61825aa266c7e64 100644 --- a/src/test/java/org/bukkit/enchantments/EnchantmentTargetTest.java +++ b/src/test/java/org/bukkit/enchantments/EnchantmentTargetTest.java @@ -5,10 +5,11 @@ import net.minecraft.world.item.Item; diff --git a/patches/unapplied/server/0671-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/server/0666-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch similarity index 100% rename from patches/unapplied/server/0671-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch rename to patches/server/0666-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch diff --git a/patches/unapplied/server/0672-Improve-boat-collision-performance.patch b/patches/server/0667-Improve-boat-collision-performance.patch similarity index 81% rename from patches/unapplied/server/0672-Improve-boat-collision-performance.patch rename to patches/server/0667-Improve-boat-collision-performance.patch index 4fa9e978df..a30069b762 100644 --- a/patches/unapplied/server/0672-Improve-boat-collision-performance.patch +++ b/patches/server/0667-Improve-boat-collision-performance.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Improve boat collision performance diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java -index 0773447354542925826369625f21e26aa30ebff4..adb1c48f42157fb127be4fd9f0a6f3784d8c4b39 100644 +index 8120739e2a7c4c86ecb7058f08bd8179d3a943b8..439ae035d8b2787916e017e2636115b5455811f1 100644 --- a/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java @@ -112,6 +112,7 @@ public class Util { @@ -17,22 +17,22 @@ index 0773447354542925826369625f21e26aa30ebff4..adb1c48f42157fb127be4fd9f0a6f378 }; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 530b94a864536f4bfd3c5250a2ffe40069b5bac2..8b377ca58a0e4d11701a831c5f976e61f642f8a8 100644 +index 36d27f64a837630d5056b0cf5a0b1b009d1d4f0f..00726cca55d45043003032e32b045d84e74cf1d2 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1341,7 +1341,7 @@ public abstract class LivingEntity extends Entity { +@@ -1340,7 +1340,7 @@ public abstract class LivingEntity extends Entity { if (!source.isProjectile()) { Entity entity = source.getDirectEntity(); - if (entity instanceof LivingEntity) { + if (entity instanceof LivingEntity && entity.distanceToSqr(this) <= (200.0D * 200.0D)) { // Paper - this.blockUsingShield((LivingEntity) entity); - } - } -@@ -1449,11 +1449,12 @@ public abstract class LivingEntity extends Entity { + LivingEntity entityliving = (LivingEntity) entity; + + this.blockUsingShield(entityliving); +@@ -1450,11 +1450,12 @@ public abstract class LivingEntity extends Entity { } - if (entity1 != null) { + if (entity1 != null && !source.isExplosion()) { - double d0 = entity1.getX() - this.getX(); + final boolean far = entity1.distanceToSqr(this) > (200.0 * 200.0); // Paper + double d0 = far ? (Math.random() - Math.random()) : entity1.getX() - this.getX(); // Paper @@ -44,7 +44,7 @@ index 530b94a864536f4bfd3c5250a2ffe40069b5bac2..8b377ca58a0e4d11701a831c5f976e61 d0 = (Math.random() - Math.random()) * 0.01D; } -@@ -2166,7 +2167,7 @@ public abstract class LivingEntity extends Entity { +@@ -2179,7 +2180,7 @@ public abstract class LivingEntity extends Entity { this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING)); Entity entity = damagesource.getDirectEntity(); @@ -54,10 +54,10 @@ index 530b94a864536f4bfd3c5250a2ffe40069b5bac2..8b377ca58a0e4d11701a831c5f976e61 } } diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java -index 5641a7b5c5e3d93cddabd91703c6f001700c5869..29da8a42406feccf7932097b07b1d32a38fa96b7 100644 +index e102410bd4c657a8bf0f55a3cbd5e8ec7e6306b0..85e1892866cd2ee0cec1552b8541c1f800bdf68c 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java -@@ -691,8 +691,8 @@ public class Boat extends Entity { +@@ -705,8 +705,8 @@ public class Boat extends Entity implements VariantHolder { this.invFriction = 0.05F; if (this.oldStatus == Boat.Status.IN_AIR && this.status != Boat.Status.IN_AIR && this.status != Boat.Status.ON_LAND) { this.waterLevel = this.getY(1.0D); diff --git a/patches/unapplied/server/0673-Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/0668-Prevent-AFK-kick-while-watching-end-credits.patch similarity index 89% rename from patches/unapplied/server/0673-Prevent-AFK-kick-while-watching-end-credits.patch rename to patches/server/0668-Prevent-AFK-kick-while-watching-end-credits.patch index ab586e72f9..861295de53 100644 --- a/patches/unapplied/server/0673-Prevent-AFK-kick-while-watching-end-credits.patch +++ b/patches/server/0668-Prevent-AFK-kick-while-watching-end-credits.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent AFK kick while watching end credits. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1a2446afabce39a488d680f66c5e5b581863b4ae..131577917ef0420f6b75a3cfa896ba4306ded3e7 100644 +index c760a12fd857efe438a302cf02e2bfb627753fab..875cf692f747b51c16c69e40e0fd5af0161cf858 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -438,7 +438,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -431,7 +431,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic --this.dropSpamTickCount; } diff --git a/patches/unapplied/server/0674-Allow-skipping-writing-of-comments-to-server.propert.patch b/patches/server/0669-Allow-skipping-writing-of-comments-to-server.propert.patch similarity index 100% rename from patches/unapplied/server/0674-Allow-skipping-writing-of-comments-to-server.propert.patch rename to patches/server/0669-Allow-skipping-writing-of-comments-to-server.propert.patch diff --git a/patches/unapplied/server/0675-Add-PlayerSetSpawnEvent.patch b/patches/server/0670-Add-PlayerSetSpawnEvent.patch similarity index 92% rename from patches/unapplied/server/0675-Add-PlayerSetSpawnEvent.patch rename to patches/server/0670-Add-PlayerSetSpawnEvent.patch index 15f6f425ed..43d9e0204b 100644 --- a/patches/unapplied/server/0675-Add-PlayerSetSpawnEvent.patch +++ b/patches/server/0670-Add-PlayerSetSpawnEvent.patch @@ -32,10 +32,10 @@ index ce1c7512cc368e196ae94ee22c6a228c975b4980..1e41de9523c5fa3b9cfced798a5c35a2 String string = resourceKey.location().toString(); if (targets.size() == 1) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index b335d10dcc2f23c6b7b9976b33af5ab2f221f15c..e212f7a2f20fb5b8af18f3f11aef189d7d533160 100644 +index c8d55095c20ab5c5b4eb1767aa4b1210d0aa5cda..95e268a3d50bbcea3e5a2273df6e92d8364970ce 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1274,7 +1274,7 @@ public class ServerPlayer extends Player { +@@ -1296,7 +1296,7 @@ public class ServerPlayer extends Player { } else if (this.bedBlocked(blockposition, enumdirection)) { return Either.left(Player.BedSleepingProblem.OBSTRUCTED); } else { @@ -44,7 +44,7 @@ index b335d10dcc2f23c6b7b9976b33af5ab2f221f15c..e212f7a2f20fb5b8af18f3f11aef189d if (this.level.isDay()) { return Either.left(Player.BedSleepingProblem.NOT_POSSIBLE_NOW); } else { -@@ -2129,12 +2129,33 @@ public class ServerPlayer extends Player { +@@ -2154,12 +2154,33 @@ public class ServerPlayer extends Player { return this.respawnForced; } @@ -80,7 +80,7 @@ index b335d10dcc2f23c6b7b9976b33af5ab2f221f15c..e212f7a2f20fb5b8af18f3f11aef189d } this.respawnPosition = pos; -@@ -2148,6 +2169,7 @@ public class ServerPlayer extends Player { +@@ -2173,6 +2194,7 @@ public class ServerPlayer extends Player { this.respawnForced = false; } @@ -89,10 +89,10 @@ index b335d10dcc2f23c6b7b9976b33af5ab2f221f15c..e212f7a2f20fb5b8af18f3f11aef189d public void trackChunk(ChunkPos chunkPos, Packet chunkDataPacket) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index c72f6e73a80f7e738362c02f03deb6f245c0c7c5..eedcccde859d39fada71122488ea019cc7405e27 100644 +index 20ba3b4fc4781205b04eab3670989b7634143e03..f734c7ea8c6ce468882ea758a358a8f19a16dcdb 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -902,13 +902,13 @@ public abstract class PlayerList { +@@ -910,13 +910,13 @@ public abstract class PlayerList { f1 = (float) Mth.wrapDegrees(Mth.atan2(vec3d1.z, vec3d1.x) * 57.2957763671875D - 90.0D); } @@ -109,7 +109,7 @@ index c72f6e73a80f7e738362c02f03deb6f245c0c7c5..eedcccde859d39fada71122488ea019c } diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java -index c3e49a781f838e6a46cb89744f3f1846de182275..c2f3d3a09327e7cb7d3167609eb3ce68eadf6443 100644 +index 37e111589134d80fdfd7a04d624b8c1d58a2d664..53b35f003034e7f4c9dd8ccfaf77389163009453 100644 --- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java +++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java @@ -72,9 +72,14 @@ public class RespawnAnchorBlock extends Block { @@ -129,10 +129,10 @@ index c3e49a781f838e6a46cb89744f3f1846de182275..c2f3d3a09327e7cb7d3167609eb3ce68 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ed51d20ebe72cd5f94882127968006fca2acec08..44d2473625420490e35e79f0388a9890bff18fa8 100644 +index 49501e3cb2e604655f0c6eba38d07855b7632cbf..ea2316ffa7b494f3f5f102b44fc8d3ec6d9a4131 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1289,9 +1289,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1291,9 +1291,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setBedSpawnLocation(Location location, boolean override) { if (location == null) { diff --git a/patches/unapplied/server/0676-Make-hoppers-respect-inventory-max-stack-size.patch b/patches/server/0671-Make-hoppers-respect-inventory-max-stack-size.patch similarity index 100% rename from patches/unapplied/server/0676-Make-hoppers-respect-inventory-max-stack-size.patch rename to patches/server/0671-Make-hoppers-respect-inventory-max-stack-size.patch diff --git a/patches/unapplied/server/0677-Optimize-entity-tracker-passenger-checks.patch b/patches/server/0672-Optimize-entity-tracker-passenger-checks.patch similarity index 85% rename from patches/unapplied/server/0677-Optimize-entity-tracker-passenger-checks.patch rename to patches/server/0672-Optimize-entity-tracker-passenger-checks.patch index 463446a38b..bdcae11d7b 100644 --- a/patches/unapplied/server/0677-Optimize-entity-tracker-passenger-checks.patch +++ b/patches/server/0672-Optimize-entity-tracker-passenger-checks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize entity tracker passenger checks diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 5d16d9dc07349c4193084ba9e70c16e58155c892..464fef44317949839a5f050c11eacd67b1cf8f8a 100644 +index 4ebe6bdc01b2d80fc84ba31aae9eb9ac26339436..2869eef4eca2ecc83aedb39f46b97ebcda1f9242 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -72,7 +72,7 @@ public class ServerEntity { +@@ -75,7 +75,7 @@ public class ServerEntity { this.trackedPlayers = trackedPlayers; // CraftBukkit end this.ap = Vec3.ZERO; diff --git a/patches/unapplied/server/0678-Config-option-for-Piglins-guarding-chests.patch b/patches/server/0673-Config-option-for-Piglins-guarding-chests.patch similarity index 86% rename from patches/unapplied/server/0678-Config-option-for-Piglins-guarding-chests.patch rename to patches/server/0673-Config-option-for-Piglins-guarding-chests.patch index 33c177ef52..abf0d8935e 100644 --- a/patches/unapplied/server/0678-Config-option-for-Piglins-guarding-chests.patch +++ b/patches/server/0673-Config-option-for-Piglins-guarding-chests.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Config option for Piglins guarding chests diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java -index 5c6b4676c2020b358f8057e9a583eb176c826cb3..20c234e29e7c1f64a0fdbbe92e06efe8c99e6172 100644 +index a3c28f327627b340905ba61238ce8454db0ec9ee..c3a2b83794c612340edf0bc67f58917f1f96db45 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java -@@ -467,6 +467,7 @@ public class PiglinAi { +@@ -477,6 +477,7 @@ public class PiglinAi { } public static void angerNearbyPiglins(Player player, boolean blockOpen) { diff --git a/patches/unapplied/server/0679-Added-EntityDamageItemEvent.patch b/patches/server/0674-Added-EntityDamageItemEvent.patch similarity index 90% rename from patches/unapplied/server/0679-Added-EntityDamageItemEvent.patch rename to patches/server/0674-Added-EntityDamageItemEvent.patch index 569af38f9d..844198f927 100644 --- a/patches/unapplied/server/0679-Added-EntityDamageItemEvent.patch +++ b/patches/server/0674-Added-EntityDamageItemEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added EntityDamageItemEvent diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 0bd7b64bd1c468221d3354494527b456bc02437a..8ed905d4ef43e2314c64758d0ed075cb969a075c 100644 +index 40e2fc6746b3a243c82d6100578ad510b193faa0..a2d92e0ed4348e632b8a55a4fae71ecc3777edcb 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -547,7 +547,7 @@ public final class ItemStack { +@@ -555,7 +555,7 @@ public final class ItemStack { return this.getItem().getMaxDamage(); } @@ -17,7 +17,7 @@ index 0bd7b64bd1c468221d3354494527b456bc02437a..8ed905d4ef43e2314c64758d0ed075cb if (!this.isDamageableItem()) { return false; } else { -@@ -565,8 +565,8 @@ public final class ItemStack { +@@ -573,8 +573,8 @@ public final class ItemStack { amount -= k; // CraftBukkit start @@ -28,7 +28,7 @@ index 0bd7b64bd1c468221d3354494527b456bc02437a..8ed905d4ef43e2314c64758d0ed075cb event.getPlayer().getServer().getPluginManager().callEvent(event); if (amount != event.getDamage() || event.isCancelled()) { -@@ -577,6 +577,14 @@ public final class ItemStack { +@@ -585,6 +585,14 @@ public final class ItemStack { } amount = event.getDamage(); @@ -43,7 +43,7 @@ index 0bd7b64bd1c468221d3354494527b456bc02437a..8ed905d4ef43e2314c64758d0ed075cb } // CraftBukkit end if (amount <= 0) { -@@ -584,8 +592,8 @@ public final class ItemStack { +@@ -592,8 +600,8 @@ public final class ItemStack { } } @@ -54,7 +54,7 @@ index 0bd7b64bd1c468221d3354494527b456bc02437a..8ed905d4ef43e2314c64758d0ed075cb } j = this.getDamageValue() + amount; -@@ -597,7 +605,7 @@ public final class ItemStack { +@@ -605,7 +613,7 @@ public final class ItemStack { public void hurtAndBreak(int amount, T entity, Consumer breakCallback) { if (!entity.level.isClientSide && (!(entity instanceof net.minecraft.world.entity.player.Player) || !((net.minecraft.world.entity.player.Player) entity).getAbilities().instabuild)) { if (this.isDamageableItem()) { diff --git a/patches/unapplied/server/0680-Optimize-indirect-passenger-iteration.patch b/patches/server/0675-Optimize-indirect-passenger-iteration.patch similarity index 90% rename from patches/unapplied/server/0680-Optimize-indirect-passenger-iteration.patch rename to patches/server/0675-Optimize-indirect-passenger-iteration.patch index 6688b1a3b1..329ba20b42 100644 --- a/patches/unapplied/server/0680-Optimize-indirect-passenger-iteration.patch +++ b/patches/server/0675-Optimize-indirect-passenger-iteration.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 6b6de6812740357d4c2c8bca0c064aa52e61fa60..325e6518c279a9915ea4b9a25df0e05669b33fe8 100644 +index 331e88186cc47dabbb35e849313721f38070c4d6..e70272cd9e6566e79c5aa9d2a1440b19f6c7a19c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3660,20 +3660,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3704,20 +3704,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } private Stream getIndirectPassengersStream() { @@ -43,7 +43,7 @@ index 6b6de6812740357d4c2c8bca0c064aa52e61fa60..325e6518c279a9915ea4b9a25df0e056 return () -> { return this.getIndirectPassengersStream().iterator(); }; -@@ -3690,6 +3704,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3734,6 +3748,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { // Paper end - rewrite chunk system public boolean hasExactlyOnePlayerPassenger() { diff --git a/patches/unapplied/server/0681-Fix-block-drops-position-losing-precision-millions-o.patch b/patches/server/0676-Fix-block-drops-position-losing-precision-millions-o.patch similarity index 92% rename from patches/unapplied/server/0681-Fix-block-drops-position-losing-precision-millions-o.patch rename to patches/server/0676-Fix-block-drops-position-losing-precision-millions-o.patch index 6b5cd596c4..7dea55e612 100644 --- a/patches/unapplied/server/0681-Fix-block-drops-position-losing-precision-millions-o.patch +++ b/patches/server/0676-Fix-block-drops-position-losing-precision-millions-o.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix block drops position losing precision millions of blocks diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index cb11cef117fc896ddcb40993ddb852a2e717c2ad..2db7b9f145b53df5ef79ae235a0de7ccff50db7e 100644 +index a9171ca47e836428e1b5c8366898a94702242e13..f595e64d6f9509c04ed6dac00205136c17c67edd 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java -@@ -346,9 +346,11 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -344,9 +344,11 @@ public class Block extends BlockBehaviour implements ItemLike { public static void popResource(Level world, BlockPos pos, ItemStack stack) { float f = EntityType.ITEM.getHeight() / 2.0F; @@ -24,7 +24,7 @@ index cb11cef117fc896ddcb40993ddb852a2e717c2ad..2db7b9f145b53df5ef79ae235a0de7cc Block.popResource(world, () -> { return new ItemEntity(world, d0, d1, d2, stack); -@@ -361,9 +363,11 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -359,9 +361,11 @@ public class Block extends BlockBehaviour implements ItemLike { int k = direction.getStepZ(); float f = EntityType.ITEM.getWidth() / 2.0F; float f1 = EntityType.ITEM.getHeight() / 2.0F; diff --git a/patches/unapplied/server/0682-Configurable-item-frame-map-cursor-update-interval.patch b/patches/server/0677-Configurable-item-frame-map-cursor-update-interval.patch similarity index 90% rename from patches/unapplied/server/0682-Configurable-item-frame-map-cursor-update-interval.patch rename to patches/server/0677-Configurable-item-frame-map-cursor-update-interval.patch index 1c23124230..ea5fd53183 100644 --- a/patches/unapplied/server/0682-Configurable-item-frame-map-cursor-update-interval.patch +++ b/patches/server/0677-Configurable-item-frame-map-cursor-update-interval.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable item frame map cursor update interval diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 464fef44317949839a5f050c11eacd67b1cf8f8a..98b8239205c61df5a2a4e344c50645e2cd2cbaad 100644 +index 2869eef4eca2ecc83aedb39f46b97ebcda1f9242..6281ade15b2700d16dc1f98c2affea8c0ba936c9 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -101,7 +101,7 @@ public class ServerEntity { +@@ -105,7 +105,7 @@ public class ServerEntity { if (true || this.tickCount % 10 == 0) { // CraftBukkit - Moved below, should always enter this block ItemStack itemstack = entityitemframe.getItem(); diff --git a/patches/unapplied/server/0683-Make-EntityUnleashEvent-cancellable.patch b/patches/server/0678-Make-EntityUnleashEvent-cancellable.patch similarity index 90% rename from patches/unapplied/server/0683-Make-EntityUnleashEvent-cancellable.patch rename to patches/server/0678-Make-EntityUnleashEvent-cancellable.patch index d2f86ad28c..32bc89d32e 100644 --- a/patches/unapplied/server/0683-Make-EntityUnleashEvent-cancellable.patch +++ b/patches/server/0678-Make-EntityUnleashEvent-cancellable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make EntityUnleashEvent cancellable diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 965dd5564d64c094ffc1347621a45d50c6c5f1e3..147ec41ae4a3b9e9ad495ab4309c9f7306122749 100644 +index c092164eb9e634d4844cb079d291bb0d7af9f76c..082da4f8eaede9d7f70341c207a2aaa6f07b997e 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1488,7 +1488,7 @@ public abstract class Mob extends LivingEntity { +@@ -1510,7 +1510,7 @@ public abstract class Mob extends LivingEntity { if (flag1 && this.isLeashed()) { // Paper start - drop leash variable EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN, true); @@ -18,7 +18,7 @@ index 965dd5564d64c094ffc1347621a45d50c6c5f1e3..147ec41ae4a3b9e9ad495ab4309c9f73 // Paper end } diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java -index f5cb3576aa2560c86f4a1df9d51d8ecde4e98905..7b2a81f9a79c5e96beba44ffe9b56a305ac2404f 100644 +index e49fb8be7d3975506a6c39c87cace664e45b3c86..a53466a84973f5e83afc71245b317ab4296e0f9e 100644 --- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java +++ b/src/main/java/net/minecraft/world/entity/PathfinderMob.java @@ -51,7 +51,7 @@ public abstract class PathfinderMob extends Mob { diff --git a/patches/unapplied/server/0684-Clear-bucket-NBT-after-dispense.patch b/patches/server/0679-Clear-bucket-NBT-after-dispense.patch similarity index 87% rename from patches/unapplied/server/0684-Clear-bucket-NBT-after-dispense.patch rename to patches/server/0679-Clear-bucket-NBT-after-dispense.patch index 52e26f4674..a025469973 100644 --- a/patches/unapplied/server/0684-Clear-bucket-NBT-after-dispense.patch +++ b/patches/server/0679-Clear-bucket-NBT-after-dispense.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Clear bucket NBT after dispense diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -index 15fc100e468e68cbb0c43363c0eb25dc2ef8c6e0..3d2b5f040715a0e4fac0e6786bd11a4d715330ce 100644 +index 7132f1c304824feb80733f01b9554092e425f0bb..c0c31a5d356d0754b478d84f0cef87fc84c4fea1 100644 --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -@@ -642,8 +642,7 @@ public interface DispenseItemBehavior { +@@ -645,8 +645,7 @@ public interface DispenseItemBehavior { Item item = Items.BUCKET; stack.shrink(1); if (stack.isEmpty()) { diff --git a/patches/unapplied/server/0685-Change-EnderEye-target-without-changing-other-things.patch b/patches/server/0680-Change-EnderEye-target-without-changing-other-things.patch similarity index 90% rename from patches/unapplied/server/0685-Change-EnderEye-target-without-changing-other-things.patch rename to patches/server/0680-Change-EnderEye-target-without-changing-other-things.patch index ce9dc32309..e8e8b566cf 100644 --- a/patches/unapplied/server/0685-Change-EnderEye-target-without-changing-other-things.patch +++ b/patches/server/0680-Change-EnderEye-target-without-changing-other-things.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Change EnderEye target without changing other things diff --git a/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java b/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java -index 16f520706c22bd55135fe2bc114bdf440925333b..ac4b6840cca345416a9e5695fc07879cd96f64d2 100644 +index f1582be22ffdd916eaab8998e3f367f2aac29d51..855e85e8d0d1f15304b0a42b46ef845325e103aa 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java +++ b/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java -@@ -75,6 +75,11 @@ public class EyeOfEnder extends Entity implements ItemSupplier { +@@ -73,6 +73,11 @@ public class EyeOfEnder extends Entity implements ItemSupplier { } public void signalTo(BlockPos pos) { @@ -20,7 +20,7 @@ index 16f520706c22bd55135fe2bc114bdf440925333b..ac4b6840cca345416a9e5695fc07879c double d0 = (double) pos.getX(); int i = pos.getY(); double d1 = (double) pos.getZ(); -@@ -92,8 +97,10 @@ public class EyeOfEnder extends Entity implements ItemSupplier { +@@ -90,8 +95,10 @@ public class EyeOfEnder extends Entity implements ItemSupplier { this.tz = d1; } diff --git a/patches/unapplied/server/0686-Add-BlockBreakBlockEvent.patch b/patches/server/0681-Add-BlockBreakBlockEvent.patch similarity index 91% rename from patches/unapplied/server/0686-Add-BlockBreakBlockEvent.patch rename to patches/server/0681-Add-BlockBreakBlockEvent.patch index a69de03ab7..8c5703ac62 100644 --- a/patches/unapplied/server/0686-Add-BlockBreakBlockEvent.patch +++ b/patches/server/0681-Add-BlockBreakBlockEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add BlockBreakBlockEvent diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 2db7b9f145b53df5ef79ae235a0de7ccff50db7e..2e65b44f10aeb44fd524a58e7eb815a566c1ad61 100644 +index f595e64d6f9509c04ed6dac00205136c17c67edd..7b71073027f4cf79736546500ededdfbb83d968e 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java -@@ -333,6 +333,23 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -331,6 +331,23 @@ public class Block extends BlockBehaviour implements ItemLike { } } @@ -46,7 +46,7 @@ index 8d73893100884c08aa552ff41c2a07a3e714df47..24a822ade17849a083161216c184f02c world.gameEvent(GameEvent.BLOCK_DESTROY, blockposition3, GameEvent.Context.of(iblockdata1)); if (!iblockdata1.is(BlockTags.FIRE)) { diff --git a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java -index 02be7c3d104fe3b3a2772201f5ebdfb6d16e9b49..ff40fe323964f173561a6838fb443e79abf9df38 100644 +index fb0784c8a4950776bd270bec3c80a8c5856c2655..0ffc131baf5c0edc4f2ca0f466fcdb20be4a47b8 100644 --- a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java +++ b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java @@ -294,7 +294,7 @@ public abstract class FlowingFluid extends Fluid { @@ -67,11 +67,11 @@ index 02be7c3d104fe3b3a2772201f5ebdfb6d16e9b49..ff40fe323964f173561a6838fb443e79 private static short getCacheKey(BlockPos blockposition, BlockPos blockposition1) { diff --git a/src/main/java/net/minecraft/world/level/material/WaterFluid.java b/src/main/java/net/minecraft/world/level/material/WaterFluid.java -index a10b6a6b0ff9c104a94be3e9d0d1757333d81a00..ac33ba631f4b0ae0e08bff5748440ef5b76c2117 100644 +index 1897c0012800d5ba9d2fc386f3e2bf57c9d878bb..82e85fbbd45244d02df90fa00c9046e7f51275a2 100644 --- a/src/main/java/net/minecraft/world/level/material/WaterFluid.java +++ b/src/main/java/net/minecraft/world/level/material/WaterFluid.java -@@ -63,6 +63,13 @@ public abstract class WaterFluid extends FlowingFluid { - return true; +@@ -64,6 +64,13 @@ public abstract class WaterFluid extends FlowingFluid { + return world.getGameRules().getBoolean(GameRules.RULE_WATER_SOURCE_CONVERSION); } + // Paper start diff --git a/patches/unapplied/server/0687-Option-to-prevent-NBT-copy-in-smithing-recipes.patch b/patches/server/0682-Option-to-prevent-NBT-copy-in-smithing-recipes.patch similarity index 100% rename from patches/unapplied/server/0687-Option-to-prevent-NBT-copy-in-smithing-recipes.patch rename to patches/server/0682-Option-to-prevent-NBT-copy-in-smithing-recipes.patch diff --git a/patches/unapplied/server/0688-More-CommandBlock-API.patch b/patches/server/0683-More-CommandBlock-API.patch similarity index 100% rename from patches/unapplied/server/0688-More-CommandBlock-API.patch rename to patches/server/0683-More-CommandBlock-API.patch diff --git a/patches/unapplied/server/0689-Add-missing-team-sidebar-display-slots.patch b/patches/server/0684-Add-missing-team-sidebar-display-slots.patch similarity index 100% rename from patches/unapplied/server/0689-Add-missing-team-sidebar-display-slots.patch rename to patches/server/0684-Add-missing-team-sidebar-display-slots.patch diff --git a/patches/unapplied/server/0690-Add-back-EntityPortalExitEvent.patch b/patches/server/0685-Add-back-EntityPortalExitEvent.patch similarity index 93% rename from patches/unapplied/server/0690-Add-back-EntityPortalExitEvent.patch rename to patches/server/0685-Add-back-EntityPortalExitEvent.patch index 8f5abe7571..afa1b51ddc 100644 --- a/patches/unapplied/server/0690-Add-back-EntityPortalExitEvent.patch +++ b/patches/server/0685-Add-back-EntityPortalExitEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add back EntityPortalExitEvent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 325e6518c279a9915ea4b9a25df0e05669b33fe8..3abc8894f575e246201845b757dbef2699663859 100644 +index e70272cd9e6566e79c5aa9d2a1440b19f6c7a19c..c5cbb845d5b79af580cb2d4f3df6d52ffe4e4f82 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3162,6 +3162,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3188,6 +3188,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } else { // CraftBukkit start worldserver = shapedetectorshape.world; @@ -32,7 +32,7 @@ index 325e6518c279a9915ea4b9a25df0e05669b33fe8..3abc8894f575e246201845b757dbef26 if (worldserver == this.level) { // SPIGOT-6782: Just move the entity if a plugin changed the world to the one the entity is already in this.moveTo(shapedetectorshape.pos.x, shapedetectorshape.pos.y, shapedetectorshape.pos.z, shapedetectorshape.yRot, shapedetectorshape.xRot); -@@ -3181,8 +3198,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3207,8 +3224,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (entity != null) { entity.restoreFrom(this); diff --git a/patches/unapplied/server/0691-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0686-Add-methods-to-find-targets-for-lightning-strikes.patch similarity index 87% rename from patches/unapplied/server/0691-Add-methods-to-find-targets-for-lightning-strikes.patch rename to patches/server/0686-Add-methods-to-find-targets-for-lightning-strikes.patch index b6b9a157da..9fce41f148 100644 --- a/patches/unapplied/server/0691-Add-methods-to-find-targets-for-lightning-strikes.patch +++ b/patches/server/0686-Add-methods-to-find-targets-for-lightning-strikes.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Add methods to find targets for lightning strikes public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index acc378462a9e24cfa51d89f67b8252aeb2198bf1..b20391fce0cb6f1f92c329962a9798c5d4caf82c 100644 +index 17aaa93e5ad6badb7a220e891328962a69a63a7b..507792ec35a075c72c6ca9341ec95fcda2ecc665 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -816,6 +816,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -837,6 +837,11 @@ public class ServerLevel extends Level implements WorldGenLevel { } protected BlockPos findLightningTargetAround(BlockPos pos) { @@ -22,7 +22,7 @@ index acc378462a9e24cfa51d89f67b8252aeb2198bf1..b20391fce0cb6f1f92c329962a9798c5 BlockPos blockposition1 = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, pos); Optional optional = this.findLightningRod(blockposition1); -@@ -830,6 +835,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -851,6 +856,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (!list.isEmpty()) { return ((LivingEntity) list.get(this.random.nextInt(list.size()))).blockPosition(); } else { @@ -31,10 +31,10 @@ index acc378462a9e24cfa51d89f67b8252aeb2198bf1..b20391fce0cb6f1f92c329962a9798c5 blockposition1 = blockposition1.above(2); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 684e091e7eb68a3e9157e7b945248821553a03df..ef1b84c52722e33f1f3d346df60c11d5bb805a0b 100644 +index e7c334dfe8f9eda2f1c8449bcae5ad983715f9db..30561840201f3e560753d91f82a646bad20f1a93 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -686,6 +686,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -685,6 +685,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (LightningStrike) lightning.getBukkitEntity(); } diff --git a/patches/unapplied/server/0692-Get-entity-default-attributes.patch b/patches/server/0687-Get-entity-default-attributes.patch similarity index 97% rename from patches/unapplied/server/0692-Get-entity-default-attributes.patch rename to patches/server/0687-Get-entity-default-attributes.patch index 5d86f86083..3d5df5cdbd 100644 --- a/patches/unapplied/server/0692-Get-entity-default-attributes.patch +++ b/patches/server/0687-Get-entity-default-attributes.patch @@ -81,10 +81,10 @@ index 0000000000000000000000000000000000000000..cf9d28ea97d93cec05c9fb768d59e283 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 6b2df5d9aa2c7a7be0d18816cfddf381b71bbe36..7b4a0df8bf6b10699a9ef7ea5b1165ef79655a0e 100644 +index 4195a6e8bb58b0e60354900fe021b10b1d25cf12..84c71a28b16160c2eae53707e29bc6242ac08b26 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -567,6 +567,18 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -565,6 +565,18 @@ public final class CraftMagicNumbers implements UnsafeValues { public int getProtocolVersion() { return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion(); } diff --git a/patches/unapplied/server/0693-Left-handed-API.patch b/patches/server/0688-Left-handed-API.patch similarity index 100% rename from patches/unapplied/server/0693-Left-handed-API.patch rename to patches/server/0688-Left-handed-API.patch diff --git a/patches/unapplied/server/0694-Add-more-advancement-API.patch b/patches/server/0689-Add-more-advancement-API.patch similarity index 99% rename from patches/unapplied/server/0694-Add-more-advancement-API.patch rename to patches/server/0689-Add-more-advancement-API.patch index ea8714f80d..1f83877e35 100644 --- a/patches/unapplied/server/0694-Add-more-advancement-API.patch +++ b/patches/server/0689-Add-more-advancement-API.patch @@ -113,7 +113,7 @@ index 2c01231dcfbb992c9d2f034fcfd4af52fe8ac265..dd4409790524293be07483f00df05d8a } diff --git a/src/main/java/net/minecraft/advancements/DisplayInfo.java b/src/main/java/net/minecraft/advancements/DisplayInfo.java -index db939a754e9308ad68f1b09a970f7a1b00a673bf..538f19f15b553d14ad95f09b1c81359f4c68b17f 100644 +index 2e9e8b1f391a223cfb0fed9a100ae78004ad2f48..7909ba26bb7a883c74eda1ffd2d3e2bad286bc8b 100644 --- a/src/main/java/net/minecraft/advancements/DisplayInfo.java +++ b/src/main/java/net/minecraft/advancements/DisplayInfo.java @@ -28,6 +28,7 @@ public class DisplayInfo { diff --git a/patches/unapplied/server/0695-Add-ItemFactory-getSpawnEgg-API.patch b/patches/server/0690-Add-ItemFactory-getSpawnEgg-API.patch similarity index 89% rename from patches/unapplied/server/0695-Add-ItemFactory-getSpawnEgg-API.patch rename to patches/server/0690-Add-ItemFactory-getSpawnEgg-API.patch index a0deed1bb0..51dfe5c931 100644 --- a/patches/unapplied/server/0695-Add-ItemFactory-getSpawnEgg-API.patch +++ b/patches/server/0690-Add-ItemFactory-getSpawnEgg-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add ItemFactory#getSpawnEgg API diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index f3a6a4d97b5be2e75c438a6f7010a8f588afe86c..30bff345b33a1b4f7909efbe4b3622d7780e7bbf 100644 +index b7a53edbf6c4730ae65a8e5fb414feaef9bdf1b7..2d25b7fb8e0c8984a6d3bad94b177713e3114533 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -440,5 +440,17 @@ public final class CraftItemFactory implements ItemFactory { +@@ -465,5 +465,17 @@ public final class CraftItemFactory implements ItemFactory { entity.getUniqueId().toString(), new net.md_5.bungee.api.chat.TextComponent(customName)); } diff --git a/patches/unapplied/server/0696-Add-critical-damage-API.patch b/patches/server/0691-Add-critical-damage-API.patch similarity index 90% rename from patches/unapplied/server/0696-Add-critical-damage-API.patch rename to patches/server/0691-Add-critical-damage-API.patch index cd683c4c04..58ac21839e 100644 --- a/patches/unapplied/server/0696-Add-critical-damage-API.patch +++ b/patches/server/0691-Add-critical-damage-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add critical damage API diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -index 752f9f11227a47b7bed675b93e95af89c6732f63..67bce77093dcc126098731047447da2031e3388d 100644 +index ed8bad446a1845befa6d5d75c40cf281fa47a9d9..8795c94e6b6474addddbb0b337a962e8fac46b2b 100644 --- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java +++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -@@ -64,6 +64,19 @@ public class DamageSource { +@@ -61,6 +61,19 @@ public class DamageSource { return this; } // CraftBukkit end @@ -26,13 +26,13 @@ index 752f9f11227a47b7bed675b93e95af89c6732f63..67bce77093dcc126098731047447da20 + } + // Paper end - public static DamageSource sting(LivingEntity attacker) { - return new EntityDamageSource("sting", attacker); + public static DamageSource fallingBlock(Entity attacker) { + return (new EntityDamageSource("fallingBlock", attacker)).damageHelmet(); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index e44351546f25421c959e091d0831197621553b41..860636642707e09f76d01ee566b5ceab6512159f 100644 +index 9a00e515f3e7717eaa088dab7a33c28e3aae55a0..983be45492dad5a1c73b591bc14b57102b273851 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1274,7 +1274,7 @@ public abstract class Player extends LivingEntity { +@@ -1256,7 +1256,7 @@ public abstract class Player extends LivingEntity { flag1 = true; } @@ -41,7 +41,7 @@ index e44351546f25421c959e091d0831197621553b41..860636642707e09f76d01ee566b5ceab flag2 = flag2 && !level.paperConfig().entities.behavior.disablePlayerCrits; // Paper flag2 = flag2 && !this.isSprinting(); -@@ -1314,7 +1314,7 @@ public abstract class Player extends LivingEntity { +@@ -1296,7 +1296,7 @@ public abstract class Player extends LivingEntity { } Vec3 vec3d = target.getDeltaMovement(); @@ -50,7 +50,7 @@ index e44351546f25421c959e091d0831197621553b41..860636642707e09f76d01ee566b5ceab if (flag5) { if (i > 0) { -@@ -1342,7 +1342,7 @@ public abstract class Player extends LivingEntity { +@@ -1324,7 +1324,7 @@ public abstract class Player extends LivingEntity { if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) { // CraftBukkit start - Only apply knockback if the damage hits @@ -60,10 +60,10 @@ index e44351546f25421c959e091d0831197621553b41..860636642707e09f76d01ee566b5ceab } // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 3b1e17a8733de823b36315c81e8ca5884e83368e..39136b9707221e4e4934ee0ef18fc2cb92723aa2 100644 +index 61d4a58ab25ce3bdf7ced426d2f92bc75ef02f7d..dcd3c5b4d3982f02214f8e0306eab37ebbf15299 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -382,6 +382,7 @@ public abstract class AbstractArrow extends Projectile { +@@ -383,6 +383,7 @@ public abstract class AbstractArrow extends Projectile { } } @@ -72,7 +72,7 @@ index 3b1e17a8733de823b36315c81e8ca5884e83368e..39136b9707221e4e4934ee0ef18fc2cb int k = entity.getRemainingFireTicks(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 2faefc58ac600fb6b374ef87c6f8f378d3883594..3bdde2057c9c2ac0e12cf3edab1c3150838dce01 100644 +index 8f248352fa17d96a5d64d0ad52e4de61beee0a62..debaeb0ccf78c6a65efa13c8158d1ef4d90bdedd 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -969,7 +969,7 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0697-Fix-issues-with-mob-conversion.patch b/patches/server/0692-Fix-issues-with-mob-conversion.patch similarity index 86% rename from patches/unapplied/server/0697-Fix-issues-with-mob-conversion.patch rename to patches/server/0692-Fix-issues-with-mob-conversion.patch index 69feb4b3a4..a0b9db0f18 100644 --- a/patches/unapplied/server/0697-Fix-issues-with-mob-conversion.patch +++ b/patches/server/0692-Fix-issues-with-mob-conversion.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix issues with mob conversion diff --git a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java -index ded88c78c9000d4401d293d18b89b07ea46088dd..3a3f3358c4bbd16bdcadc56c6a865ecfb942ad54 100644 +index e799714e562d2653c75604b7331487e5f3c42067..badde621357a567965f0ef203e402e21bed09059 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java +++ b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java -@@ -86,10 +86,15 @@ public class Skeleton extends AbstractSkeleton { +@@ -90,10 +90,15 @@ public class Skeleton extends AbstractSkeleton { } protected void doFreezeConversion() { @@ -27,10 +27,10 @@ index ded88c78c9000d4401d293d18b89b07ea46088dd..3a3f3358c4bbd16bdcadc56c6a865ecf } diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java -index 38f56cb4adeac0d7dcad63d0fbd98f17ab6e3b46..5e0e6ab7eaa9825b2f8c90353c30673dd43dd8b8 100644 +index 5df28bd2d4e2d3c3c28bc35179e098289ecd07c5..67c012476519d93e2a4529b6cdccb0f1e53b52ad 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java -@@ -105,6 +105,11 @@ public abstract class AbstractPiglin extends Monster { +@@ -113,6 +113,11 @@ public abstract class AbstractPiglin extends Monster { if (entitypigzombie != null) { entitypigzombie.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0)); } diff --git a/patches/unapplied/server/0698-Add-isCollidable-methods-to-various-places.patch b/patches/server/0693-Add-isCollidable-methods-to-various-places.patch similarity index 88% rename from patches/unapplied/server/0698-Add-isCollidable-methods-to-various-places.patch rename to patches/server/0693-Add-isCollidable-methods-to-various-places.patch index 98a23cf0fd..06cf00ef06 100644 --- a/patches/unapplied/server/0698-Add-isCollidable-methods-to-various-places.patch +++ b/patches/server/0693-Add-isCollidable-methods-to-various-places.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Add isCollidable methods to various places public net.minecraft.world.level.block.state.BlockBehaviour hasCollision diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index b2628b1698ef2a235e7b465f09747cafbb133b7a..2881bcb570dc86a7602309e1f540ecd1c7f00284 100644 +index 6ec8ebdd702424d94821180f65f6344be1a0527a..016f58f452e19a00d72a277d41bcbbb107e4232b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -480,6 +480,11 @@ public class CraftBlock implements Block { +@@ -482,6 +482,11 @@ public class CraftBlock implements Block { public boolean isSolid() { return getNMS().getMaterial().blocksMotion(); } @@ -39,10 +39,10 @@ index 7b9e943b391c061782fccd2b8d705ceec8db50fe..966ac60daebb7bb211ab8096fc0c5f33 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 7b4a0df8bf6b10699a9ef7ea5b1165ef79655a0e..8d1212436f3a70986dae9868e80fa5b7fe893541 100644 +index 84c71a28b16160c2eae53707e29bc6242ac08b26..1cf2c29e4fc7073b19f62368ce4569ce54a4b13d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -579,6 +579,12 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -577,6 +577,12 @@ public final class CraftMagicNumbers implements UnsafeValues { var supplier = net.minecraft.world.entity.ai.attributes.DefaultAttributes.getSupplier((net.minecraft.world.entity.EntityType) net.minecraft.core.Registry.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(bukkitEntityKey))); return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier); } diff --git a/patches/unapplied/server/0699-Goat-ram-API.patch b/patches/server/0694-Goat-ram-API.patch similarity index 93% rename from patches/unapplied/server/0699-Goat-ram-API.patch rename to patches/server/0694-Goat-ram-API.patch index c9eca7cb7e..ba52bb8712 100644 --- a/patches/unapplied/server/0699-Goat-ram-API.patch +++ b/patches/server/0694-Goat-ram-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Goat ram API diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -index ebf462aa6431da05372200a2cae29449597267b1..4d6c3cb8eb2da05b7f0c8fba92e371cd440605b0 100644 +index ad8dc8c58c50eb75ab14d3d87f8584f4ba402c45..d562ad27bf690927e6a84e416ab74a460950f249 100644 --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -@@ -359,4 +359,15 @@ public class Goat extends Animal { +@@ -384,4 +384,15 @@ public class Goat extends Animal { public static boolean checkGoatSpawnRules(EntityType entityType, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, RandomSource random) { return world.getBlockState(pos.below()).is(BlockTags.GOATS_SPAWNABLE_ON) && isBrightEnoughToSpawn(world, pos); } diff --git a/patches/unapplied/server/0700-Add-API-for-resetting-a-single-score.patch b/patches/server/0695-Add-API-for-resetting-a-single-score.patch similarity index 100% rename from patches/unapplied/server/0700-Add-API-for-resetting-a-single-score.patch rename to patches/server/0695-Add-API-for-resetting-a-single-score.patch diff --git a/patches/unapplied/server/0701-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0696-Add-Raw-Byte-Entity-Serialization.patch similarity index 89% rename from patches/unapplied/server/0701-Add-Raw-Byte-Entity-Serialization.patch rename to patches/server/0696-Add-Raw-Byte-Entity-Serialization.patch index 6243e98b09..6defedac03 100644 --- a/patches/unapplied/server/0701-Add-Raw-Byte-Entity-Serialization.patch +++ b/patches/server/0696-Add-Raw-Byte-Entity-Serialization.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 3abc8894f575e246201845b757dbef2699663859..dcbbf53b23a9347470986f052ecba0149d7503aa 100644 +index c5cbb845d5b79af580cb2d4f3df6d52ffe4e4f82..15d9159bb67619a40edc4be5556615dcd9a211a0 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1985,6 +1985,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2000,6 +2000,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } } @@ -25,10 +25,10 @@ index 3abc8894f575e246201845b757dbef2699663859..dcbbf53b23a9347470986f052ecba014 return this.isPassenger() ? false : this.saveAsPassenger(nbt); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index cc86c455588f33463100a58f3be6f21e26dda5da..99a9ddbeee75611c5bab8d0e8952a9291bf73a16 100644 +index f1ee89047e8cd916c762b91162842e3f981856b3..726a4ae7ab928eda3ae1c1e98f3421575af2e065 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1330,5 +1330,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1332,5 +1332,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } return set; } @@ -45,10 +45,10 @@ index cc86c455588f33463100a58f3be6f21e26dda5da..99a9ddbeee75611c5bab8d0e8952a929 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 8d1212436f3a70986dae9868e80fa5b7fe893541..2f71e549c5c3f7e8ebfd10a7b0c8601fcc1d9c49 100644 +index 1cf2c29e4fc7073b19f62368ce4569ce54a4b13d..ca0b9b6f2b9bbbc53ab0001d5eabad341bfb3b0d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -462,6 +462,30 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -460,6 +460,30 @@ public final class CraftMagicNumbers implements UnsafeValues { return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.of((CompoundTag) converted.getValue())); } diff --git a/patches/unapplied/server/0702-Vanilla-command-permission-fixes.patch b/patches/server/0697-Vanilla-command-permission-fixes.patch similarity index 96% rename from patches/unapplied/server/0702-Vanilla-command-permission-fixes.patch rename to patches/server/0697-Vanilla-command-permission-fixes.patch index 44a7db13ec..c109df4692 100644 --- a/patches/unapplied/server/0702-Vanilla-command-permission-fixes.patch +++ b/patches/server/0697-Vanilla-command-permission-fixes.patch @@ -33,10 +33,10 @@ index 899008b2980d13f1be6280cd8cb959c53a29bebf..f875507241ac6769545e91cd3285232b private RedirectModifier modifier = null; private boolean forks; diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 9c0b2679964f864671ff4041163d1065c8d9cf84..27093aed1f4112a5414671fd5d9c4e683011506d 100644 +index 7e61f0cb96c7697fc3487fd941cacc15d78a14dc..9cf69ef59ef4330a69753cab7aa8ec7716587d32 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -212,7 +212,13 @@ public class Commands { +@@ -220,7 +220,13 @@ public class Commands { if (environment.includeIntegrated) { PublishCommand.register(this.dispatcher); } diff --git a/patches/unapplied/server/0703-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0698-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch similarity index 87% rename from patches/unapplied/server/0703-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch rename to patches/server/0698-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch index 1c3003e28f..9d18c6a9e7 100644 --- a/patches/unapplied/server/0703-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch +++ b/patches/server/0698-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch @@ -9,10 +9,10 @@ chunk through it. This should also be OK from a leak prevention/ state desync POV because the TE is getting unloaded anyways. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index b20391fce0cb6f1f92c329962a9798c5d4caf82c..c5867232ed6f630d76dad9d111022b37ca781b94 100644 +index 507792ec35a075c72c6ca9341ec95fcda2ecc665..52f424e381e3b15e5c53bca536025b5dd77bf562 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1376,9 +1376,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1416,9 +1416,13 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot Start for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) { if (tileentity instanceof net.minecraft.world.Container) { @@ -28,10 +28,10 @@ index b20391fce0cb6f1f92c329962a9798c5d4caf82c..c5867232ed6f630d76dad9d111022b37 } // Spigot End diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e212f7a2f20fb5b8af18f3f11aef189d7d533160..eac88fdb3c9184e9c0d3500c62fbc34958bfcb47 100644 +index 95e268a3d50bbcea3e5a2273df6e92d8364970ce..d02cab4c09e2036f6b1ac3667ef8282475daf015 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1575,6 +1575,18 @@ public class ServerPlayer extends Player { +@@ -1597,6 +1597,18 @@ public class ServerPlayer extends Player { this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId)); this.doCloseContainer(); } @@ -48,13 +48,13 @@ index e212f7a2f20fb5b8af18f3f11aef189d7d533160..eac88fdb3c9184e9c0d3500c62fbc349 + } + // Paper end - special close for unloaded inventory + @Override public void doCloseContainer() { - this.containerMenu.removed(this); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 860636642707e09f76d01ee566b5ceab6512159f..4b2495aed39450eb148627a0787848fd7c35f1f9 100644 +index 983be45492dad5a1c73b591bc14b57102b273851..2a770125bf31906a3def5e563fbfcc283c39127d 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -506,6 +506,11 @@ public abstract class Player extends LivingEntity { +@@ -499,6 +499,11 @@ public abstract class Player extends LivingEntity { this.containerMenu = this.inventoryMenu; } // Paper end diff --git a/patches/unapplied/server/0382-Don-t-run-entity-collision-code-if-not-needed.patch b/patches/unapplied/server/0382-Don-t-run-entity-collision-code-if-not-needed.patch deleted file mode 100644 index 44e34f7cfe..0000000000 --- a/patches/unapplied/server/0382-Don-t-run-entity-collision-code-if-not-needed.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Wed, 15 Apr 2020 17:56:07 -0700 -Subject: [PATCH] Don't run entity collision code if not needed - -Will not run if: -Max entity cramming is disabled and the max collisions per entity is less than or equal to 0. -Entity#isPushable() returns false, meaning all entities will not be able to collide with this -entity anyways. -The entity's current team collision rule causes them to NEVER collide. - -Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> - -diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index fc498652272cb4990668b3ac05d5aa1f0b627a67..67c3e02bf4ee61237a7d0ea72e7bb0260af159e9 100644 ---- a/src/main/java/net/minecraft/world/entity/LivingEntity.java -+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3340,10 +3340,24 @@ public abstract class LivingEntity extends Entity { - protected void serverAiStep() {} - - protected void pushEntities() { -+ // Paper start - don't run getEntities if we're not going to use its result -+ if (!this.isPushable()) { -+ return; -+ } -+ net.minecraft.world.scores.Team team = this.getTeam(); -+ if (team != null && team.getCollisionRule() == net.minecraft.world.scores.Team.CollisionRule.NEVER) { -+ return; -+ } -+ -+ int i = this.level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING); -+ if (i <= 0 && level.paperConfig().collisions.maxEntityCollisions <= 0) { -+ return; -+ } -+ // Paper end - don't run getEntities if we're not going to use its result - List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushableBy(this)); - - if (!list.isEmpty()) { -- int i = this.level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING); -+ // Paper - move up - int j; - - if (i > 0 && list.size() > i - 1 && this.random.nextInt(4) == 0) { diff --git a/patches/unapplied/server/0432-Don-t-allow-null-UUID-s-for-chat.patch b/patches/unapplied/server/0432-Don-t-allow-null-UUID-s-for-chat.patch deleted file mode 100644 index 9c92814826..0000000000 --- a/patches/unapplied/server/0432-Don-t-allow-null-UUID-s-for-chat.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Sun, 28 Jun 2020 19:36:55 -0400 -Subject: [PATCH] Don't allow null UUID's for chat - - -diff --git a/src/main/java/net/minecraft/network/chat/ChatSender.java b/src/main/java/net/minecraft/network/chat/ChatSender.java -index eb33c74d51f9b096ac39adf167fa09afdaa5e56b..d3d5487e9a4e95271a88c094058ec9d37a10d370 100644 ---- a/src/main/java/net/minecraft/network/chat/ChatSender.java -+++ b/src/main/java/net/minecraft/network/chat/ChatSender.java -@@ -8,6 +8,12 @@ import net.minecraft.world.entity.player.ProfilePublicKey; - public record ChatSender(UUID profileId, @Nullable ProfilePublicKey profilePublicKey) { - public static final ChatSender SYSTEM = new ChatSender(Util.NIL_UUID, (ProfilePublicKey)null); - -+ // Paper start -+ public ChatSender { -+ com.google.common.base.Preconditions.checkNotNull(profileId, "uuid cannot be null"); -+ } -+ // Paper end -+ - public boolean isSystem() { - return SYSTEM.equals(this); - } diff --git a/patches/unapplied/server/0592-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/unapplied/server/0592-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch deleted file mode 100644 index 2898008081..0000000000 --- a/patches/unapplied/server/0592-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> -Date: Fri, 19 Mar 2021 16:07:21 -0700 -Subject: [PATCH] Only set despawnTimer for Wandering Traders spawned by - MobSpawnerTrader - - -diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index fdefccfa07227f315259f636076e36a120c72917..7e9f2a128639c1b80c008f1203a4a41b783b1f73 100644 ---- a/src/main/java/net/minecraft/world/entity/EntityType.java -+++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -347,6 +347,12 @@ public class EntityType implements EntityTypeTest { - - @Nullable - public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { -+ // Paper start - add consumer to modify entity before spawn -+ return this.spawn(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, spawnReason, null); -+ } -+ @Nullable -+ public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason, @Nullable java.util.function.Consumer op) { -+ // Paper end - // Paper start - Call PreCreatureSpawnEvent - org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityType.getKey(this).getPath()); - if (type != null) { -@@ -362,6 +368,7 @@ public class EntityType implements EntityTypeTest { - } - // Paper end - T t0 = this.create(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1); -+ if (t0 != null && op != null) op.accept(t0); // Paper - - if (t0 != null) { - worldserver.addFreshEntityWithPassengers(t0, spawnReason); -diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -index e594cf4b8084b7448c29208a2070e766e391713d..d6c583d668abdc9302ccedba42b9b4e2f6180c56 100644 ---- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -@@ -59,7 +59,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill - - public WanderingTrader(EntityType type, Level world) { - super(type, world); -- this.setDespawnDelay(48000); // CraftBukkit - set default from MobSpawnerTrader -+ //this.setDespawnDelay(48000); // CraftBukkit - set default from MobSpawnerTrader // Paper - move back to MobSpawnerTrader - Vanilla behavior is that only traders spawned by it have this value set. - } - - @Override -diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -index fcde09e155727fe0b8b6acc79700fe4122fd22f0..daa7c4bd8a3f6c28f02b7117b061f0def29e3743 100644 ---- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -@@ -123,7 +123,7 @@ public class WanderingTraderSpawner implements CustomSpawner { - return false; - } - -- WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, (CompoundTag) null, (Component) null, (Player) null, blockposition2, MobSpawnType.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit -+ WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, (CompoundTag) null, (Component) null, (Player) null, blockposition2, MobSpawnType.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL, trader -> trader.setDespawnDelay(48000)); // CraftBukkit // Paper - set despawnTimer before spawn events called - - if (entityvillagertrader != null) { - for (int i = 0; i < 2; ++i) { diff --git a/patches/unapplied/server/0630-Move-range-check-for-block-placing-up.patch b/patches/unapplied/server/0630-Move-range-check-for-block-placing-up.patch deleted file mode 100644 index 582c587f8b..0000000000 --- a/patches/unapplied/server/0630-Move-range-check-for-block-placing-up.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nassim Jahnke -Date: Wed, 8 Jun 2022 10:52:18 +0200 -Subject: [PATCH] Move range check for block placing up - - -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 83a044061f77260a67023839b99915bd3abd8448..4296b7b0c2e0ec3f9737b93a436e7d425d0ee0af 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1830,6 +1830,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - ItemStack itemstack = this.player.getItemInHand(enumhand); - BlockHitResult movingobjectpositionblock = packet.getHitResult(); - Vec3 vec3d = movingobjectpositionblock.getLocation(); -+ // Paper start - improve distance check -+ if (!Double.isFinite(vec3d.x) || !Double.isFinite(vec3d.y) || !Double.isFinite(vec3d.z)) { -+ return; -+ } -+ // Paper end - BlockPos blockposition = movingobjectpositionblock.getBlockPos(); - Vec3 vec3d1 = Vec3.atCenterOf(blockposition); -