From 2055809b1e491fac60d298e7ea045c0cf4871fcb Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 13 Jun 2024 10:30:39 -0700 Subject: [PATCH] 117 --- .../0063-Add-exception-reporting-event.patch} | 45 +++++++----------- ...reboards-for-non-players-by-default.patch} | 8 ++-- ...orking-with-arrows-stuck-in-living-.patch} | 6 +-- .../0066-Chunk-Save-Reattempt.patch} | 2 +- .../0067-Complete-resource-pack-API.patch} | 10 ++-- ...ding-permissions.yml-before-plugins.patch} | 6 +-- ...low-Reloading-of-Custom-Permissions.patch} | 4 +- .../0070-Remove-Metadata-on-reload.patch} | 4 +- ...71-Handle-Item-Meta-Inconsistencies.patch} | 46 +++++++++---------- ...rable-Non-Player-Arrow-Despawn-Rate.patch} | 4 +- .../0073-Add-World-Util-Methods.patch} | 4 +- ...-Custom-replacement-for-eaten-items.patch} | 8 ++-- ...h-absorb-values-and-repair-bad-data.patch} | 16 +++---- ...76-Use-a-Shared-Random-for-Entities.patch} | 10 ++-- ...e-spawn-chances-for-skeleton-horses.patch} | 4 +- ...kPhysicsEvent-if-a-plugin-has-a-lis.patch} | 12 ++--- ...ntity-AddTo-RemoveFrom-World-Events.patch} | 6 +-- ...0-Configurable-Chunk-Inhabited-Time.patch} | 4 +- .../0081-EntityPathfindEvent.patch} | 0 ...gionFileCache-and-make-configurable.patch} | 2 +- ...-Do-not-load-chunks-for-Pathfinding.patch} | 0 ...084-Add-PlayerUseUnknownEntityEvent.patch} | 8 ++-- ...urable-random-tick-rates-for-blocks.patch} | 0 ...-BlockPlaceEvent-triggering-physics.patch} | 4 +- .../0087-Optimize-DataBits.patch} | 0 ...illa-per-world-scoreboard-coloring-.patch} | 0 .../0089-Configurable-Player-Collision.patch} | 12 ++--- ...nt-to-allow-plugins-to-handle-clien.patch} | 6 +-- .../0091-Configurable-RCON-IP-address.patch} | 6 +-- ...tyRegainHealthEvent-isFastRegen-API.patch} | 6 +-- ...to-configure-frosted_ice-properties.patch} | 2 +- ...possibility-for-getServer-singleton.patch} | 10 ++-- ...-scoreboard-teams-to-scoreboard.dat.patch} | 0 ...ble-API-and-replenishable-lootables.patch} | 14 +++--- ...em-property-for-disabling-watchdoge.patch} | 0 .../0098-Async-GameProfileCache-saving.patch} | 8 ++-- ...-Optional-TNT-doesn-t-move-in-water.patch} | 10 ++-- ...-redstone-torch-rapid-clock-removal.patch} | 4 +- .../0101-Add-server-name-parameter.patch} | 2 +- .../0102-Fix-global-sound-handling.patch} | 22 ++++----- ...locking-on-Network-Manager-creation.patch} | 0 ...-profiles-that-have-no-UUID-and-no-.patch} | 0 ...etting-for-proxy-online-mode-status.patch} | 8 ++-- ...timise-BlockState-s-hashCode-equals.patch} | 0 ...nfigurable-packet-in-spam-threshold.patch} | 4 +- ...8-Configurable-flying-kick-messages.patch} | 6 +-- .../0109-Add-EntityZapEvent.patch} | 8 ++-- ...entity-nbt-data-from-falling-blocks.patch} | 4 +- ...11-Cache-user-authenticator-threads.patch} | 12 ++--- ...-Allow-Reloading-of-Command-Aliases.patch} | 4 +- ...-Add-source-to-PlayerExpChangeEvent.patch} | 10 ++-- .../0114-Add-ProjectileCollideEvent.patch} | 6 +-- ...ent-Pathfinding-out-of-World-Border.patch} | 0 ...ze-Level.hasChunkAt-BlockPosition-Z.patch} | 4 +- ...Bound-Treasure-Maps-to-World-Border.patch} | 14 +++--- 55 files changed, 190 insertions(+), 205 deletions(-) rename patches/{unapplied/server/0064-Add-exception-reporting-event.patch => server/0063-Add-exception-reporting-event.patch} (85%) rename patches/{unapplied/server/0065-Disable-Scoreboards-for-non-players-by-default.patch => server/0064-Disable-Scoreboards-for-non-players-by-default.patch} (85%) rename patches/{unapplied/server/0066-Add-methods-for-working-with-arrows-stuck-in-living-.patch => server/0065-Add-methods-for-working-with-arrows-stuck-in-living-.patch} (90%) rename patches/{unapplied/server/0067-Chunk-Save-Reattempt.patch => server/0066-Chunk-Save-Reattempt.patch} (96%) rename patches/{unapplied/server/0068-Complete-resource-pack-API.patch => server/0067-Complete-resource-pack-API.patch} (87%) rename patches/{unapplied/server/0069-Default-loading-permissions.yml-before-plugins.patch => server/0068-Default-loading-permissions.yml-before-plugins.patch} (89%) rename patches/{unapplied/server/0070-Allow-Reloading-of-Custom-Permissions.patch => server/0069-Allow-Reloading-of-Custom-Permissions.patch} (90%) rename patches/{unapplied/server/0071-Remove-Metadata-on-reload.patch => server/0070-Remove-Metadata-on-reload.patch} (88%) rename patches/{unapplied/server/0072-Handle-Item-Meta-Inconsistencies.patch => server/0071-Handle-Item-Meta-Inconsistencies.patch} (90%) rename patches/{unapplied/server/0073-Configurable-Non-Player-Arrow-Despawn-Rate.patch => server/0072-Configurable-Non-Player-Arrow-Despawn-Rate.patch} (89%) rename patches/{unapplied/server/0074-Add-World-Util-Methods.patch => server/0073-Add-World-Util-Methods.patch} (91%) rename patches/{unapplied/server/0075-Custom-replacement-for-eaten-items.patch => server/0074-Custom-replacement-for-eaten-items.patch} (90%) rename patches/{unapplied/server/0076-handle-NaN-health-absorb-values-and-repair-bad-data.patch => server/0075-handle-NaN-health-absorb-values-and-repair-bad-data.patch} (81%) rename patches/{unapplied/server/0077-Use-a-Shared-Random-for-Entities.patch => server/0076-Use-a-Shared-Random-for-Entities.patch} (92%) rename patches/{unapplied/server/0078-Configurable-spawn-chances-for-skeleton-horses.patch => server/0077-Configurable-spawn-chances-for-skeleton-horses.patch} (90%) rename patches/{unapplied/server/0079-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch => server/0078-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch} (90%) rename patches/{unapplied/server/0080-Entity-AddTo-RemoveFrom-World-Events.patch => server/0079-Entity-AddTo-RemoveFrom-World-Events.patch} (84%) rename patches/{unapplied/server/0081-Configurable-Chunk-Inhabited-Time.patch => server/0080-Configurable-Chunk-Inhabited-Time.patch} (88%) rename patches/{unapplied/server/0082-EntityPathfindEvent.patch => server/0081-EntityPathfindEvent.patch} (100%) rename patches/{unapplied/server/0083-Sanitise-RegionFileCache-and-make-configurable.patch => server/0082-Sanitise-RegionFileCache-and-make-configurable.patch} (93%) rename patches/{unapplied/server/0084-Do-not-load-chunks-for-Pathfinding.patch => server/0083-Do-not-load-chunks-for-Pathfinding.patch} (100%) rename patches/{unapplied/server/0085-Add-PlayerUseUnknownEntityEvent.patch => server/0084-Add-PlayerUseUnknownEntityEvent.patch} (92%) rename patches/{unapplied/server/0086-Configurable-random-tick-rates-for-blocks.patch => server/0085-Configurable-random-tick-rates-for-blocks.patch} (100%) rename patches/{unapplied/server/0087-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch => server/0086-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch} (82%) rename patches/{unapplied/server/0088-Optimize-DataBits.patch => server/0087-Optimize-DataBits.patch} (100%) rename patches/{unapplied/server/0089-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch => server/0088-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch} (100%) rename patches/{unapplied/server/0090-Configurable-Player-Collision.patch => server/0089-Configurable-Player-Collision.patch} (93%) rename patches/{unapplied/server/0091-Add-handshake-event-to-allow-plugins-to-handle-clien.patch => server/0090-Add-handshake-event-to-allow-plugins-to-handle-clien.patch} (94%) rename patches/{unapplied/server/0092-Configurable-RCON-IP-address.patch => server/0091-Configurable-RCON-IP-address.patch} (92%) rename patches/{unapplied/server/0093-EntityRegainHealthEvent-isFastRegen-API.patch => server/0092-EntityRegainHealthEvent-isFastRegen-API.patch} (90%) rename patches/{unapplied/server/0094-Add-ability-to-configure-frosted_ice-properties.patch => server/0093-Add-ability-to-configure-frosted_ice-properties.patch} (95%) rename patches/{unapplied/server/0095-remove-null-possibility-for-getServer-singleton.patch => server/0094-remove-null-possibility-for-getServer-singleton.patch} (83%) rename patches/{unapplied/server/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch => server/0095-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch} (100%) rename patches/{unapplied/server/0097-LootTable-API-and-replenishable-lootables.patch => server/0096-LootTable-API-and-replenishable-lootables.patch} (98%) rename patches/{unapplied/server/0098-System-property-for-disabling-watchdoge.patch => server/0097-System-property-for-disabling-watchdoge.patch} (100%) rename patches/{unapplied/server/0099-Async-GameProfileCache-saving.patch => server/0098-Async-GameProfileCache-saving.patch} (92%) rename patches/{unapplied/server/0100-Optional-TNT-doesn-t-move-in-water.patch => server/0099-Optional-TNT-doesn-t-move-in-water.patch} (87%) rename patches/{unapplied/server/0101-Faster-redstone-torch-rapid-clock-removal.patch => server/0100-Faster-redstone-torch-rapid-clock-removal.patch} (96%) rename patches/{unapplied/server/0102-Add-server-name-parameter.patch => server/0101-Add-server-name-parameter.patch} (90%) rename patches/{unapplied/server/0103-Fix-global-sound-handling.patch => server/0102-Fix-global-sound-handling.patch} (91%) rename patches/{unapplied/server/0104-Avoid-blocking-on-Network-Manager-creation.patch => server/0103-Avoid-blocking-on-Network-Manager-creation.patch} (100%) rename patches/{unapplied/server/0105-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch => server/0104-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch} (100%) rename patches/{unapplied/server/0106-Add-setting-for-proxy-online-mode-status.patch => server/0105-Add-setting-for-proxy-online-mode-status.patch} (93%) rename patches/{unapplied/server/0107-Optimise-BlockState-s-hashCode-equals.patch => server/0106-Optimise-BlockState-s-hashCode-equals.patch} (100%) rename patches/{unapplied/server/0108-Configurable-packet-in-spam-threshold.patch => server/0107-Configurable-packet-in-spam-threshold.patch} (91%) rename patches/{unapplied/server/0109-Configurable-flying-kick-messages.patch => server/0108-Configurable-flying-kick-messages.patch} (86%) rename patches/{unapplied/server/0110-Add-EntityZapEvent.patch => server/0109-Add-EntityZapEvent.patch} (90%) rename patches/{unapplied/server/0111-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch => server/0110-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch} (86%) rename patches/{unapplied/server/0112-Cache-user-authenticator-threads.patch => server/0111-Cache-user-authenticator-threads.patch} (89%) rename patches/{unapplied/server/0113-Allow-Reloading-of-Command-Aliases.patch => server/0112-Allow-Reloading-of-Command-Aliases.patch} (90%) rename patches/{unapplied/server/0114-Add-source-to-PlayerExpChangeEvent.patch => server/0113-Add-source-to-PlayerExpChangeEvent.patch} (84%) rename patches/{unapplied/server/0115-Add-ProjectileCollideEvent.patch => server/0114-Add-ProjectileCollideEvent.patch} (91%) rename patches/{unapplied/server/0116-Prevent-Pathfinding-out-of-World-Border.patch => server/0115-Prevent-Pathfinding-out-of-World-Border.patch} (100%) rename patches/{unapplied/server/0117-Optimize-Level.hasChunkAt-BlockPosition-Z.patch => server/0116-Optimize-Level.hasChunkAt-BlockPosition-Z.patch} (87%) rename patches/{unapplied/server/0118-Bound-Treasure-Maps-to-World-Border.patch => server/0117-Bound-Treasure-Maps-to-World-Border.patch} (75%) diff --git a/patches/unapplied/server/0064-Add-exception-reporting-event.patch b/patches/server/0063-Add-exception-reporting-event.patch similarity index 85% rename from patches/unapplied/server/0064-Add-exception-reporting-event.patch rename to patches/server/0063-Add-exception-reporting-event.patch index b0a4afc624..a0c3f05e20 100644 --- a/patches/unapplied/server/0064-Add-exception-reporting-event.patch +++ b/patches/server/0063-Add-exception-reporting-event.patch @@ -91,10 +91,10 @@ index 8183c26b4a5ad169a53702b8c45fd05cda934e80..36dec6cd78a0990ba3c09a4a748c259e } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 03fec2504579acb0a8ba835939e0067f3649ab6a..2eb2fbe57a33701770baefea5dc727684f2779ec 100644 +index 68436413645e0e33f22cdee0ea101ca01b343d75..4f5ff6849e0ea7a4f2491e0dbede7699554239dc 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -728,6 +728,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -733,6 +733,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper start - Prevent block entity and entity crashes final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ()); MinecraftServer.LOGGER.error(msg, throwable); @@ -123,39 +123,26 @@ index 6a80479554f0c860a8dd6baa1a6506858fca83e3..6324689f52363f19501143c1649f0885 } 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 c4ff77ed93e17ed816e0325eb5bdfcdb444be4a4..60a1828d179c29514813143e3c8e93b08afe9849 100644 +index 329f2210b73a75fc91a5ba06a1ed7f66c5aa2680..791b7d3a606fddfe21b51258e9732b14381200f5 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -1,6 +1,7 @@ - package net.minecraft.world.level.chunk; +@@ -565,8 +565,13 @@ public class LevelChunk extends ChunkAccess { + BlockState iblockdata = this.getBlockState(blockposition); - import com.google.common.collect.ImmutableList; -+import com.destroystokyo.paper.exception.ServerInternalException; - import com.google.common.collect.Maps; - import com.google.common.collect.UnmodifiableIterator; - import com.mojang.logging.LogUtils; -@@ -574,10 +575,16 @@ public class LevelChunk extends ChunkAccess { - - // CraftBukkit start - } else { -- System.out.println("Attempted to place a tile entity (" + blockEntity + ") at " + blockEntity.getBlockPos().getX() + "," + blockEntity.getBlockPos().getY() + "," + blockEntity.getBlockPos().getZ() -- + " (" + this.getBlockState(blockposition) + ") where there was no entity tile!"); -- System.out.println("Chunk coordinates: " + (this.chunkPos.x * 16) + "," + (this.chunkPos.z * 16)); -- new Exception().printStackTrace(); + if (!iblockdata.hasBlockEntity()) { +- LevelChunk.LOGGER.warn("Trying to set block entity {} at position {}, but state {} does not allow it", new Object[]{blockEntity, blockposition, iblockdata}); +- new Exception().printStackTrace(); // CraftBukkit + // Paper start - ServerExceptionEvent -+ ServerInternalException e = new ServerInternalException( -+ "Attempted to place a tile entity (" + blockEntity + ") at " + blockEntity.getBlockPos().getX() + "," -+ + blockEntity.getBlockPos().getY() + "," + blockEntity.getBlockPos().getZ() -+ + " (" + getBlockState(blockposition) + ") where there was no entity tile!\n" + -+ "Chunk coordinates: " + (this.chunkPos.x * 16) + "," + (this.chunkPos.z * 16) + -+ "\nWorld: " + level.getLevel().dimension().location()); ++ com.destroystokyo.paper.exception.ServerInternalException e = new com.destroystokyo.paper.exception.ServerInternalException( ++ "Trying to set block entity %s at position %s, but state %s does not allow it".formatted(blockEntity, blockposition, iblockdata) ++ ); + e.printStackTrace(); -+ ServerInternalException.reportInternalException(e); ++ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(e); + // Paper end - ServerExceptionEvent - // CraftBukkit end - } - } -@@ -1064,6 +1071,7 @@ public class LevelChunk extends ChunkAccess { + } else { + BlockState iblockdata1 = blockEntity.getBlockState(); + +@@ -1076,6 +1081,7 @@ public class LevelChunk extends ChunkAccess { // Paper start - Prevent block entity and entity crashes final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ()); net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable); diff --git a/patches/unapplied/server/0065-Disable-Scoreboards-for-non-players-by-default.patch b/patches/server/0064-Disable-Scoreboards-for-non-players-by-default.patch similarity index 85% rename from patches/unapplied/server/0065-Disable-Scoreboards-for-non-players-by-default.patch rename to patches/server/0064-Disable-Scoreboards-for-non-players-by-default.patch index 47e4b6b719..f5ec7c80b1 100644 --- a/patches/unapplied/server/0065-Disable-Scoreboards-for-non-players-by-default.patch +++ b/patches/server/0064-Disable-Scoreboards-for-non-players-by-default.patch @@ -11,10 +11,10 @@ So avoid looking up scoreboards and short circuit to the "not on a team" logic which is most likely to be true. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index fb3f9082b16f5ec420ddc1f5a0e81b8130a71e4f..66ba606ccbff3a578a090d5170f3ff866ecf99af 100644 +index fafccc1c98cbc630dc71db623184a62f08618b03..b5c03b3495f5eb5ac6b054d4ca986a6a597c713c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2836,6 +2836,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2934,6 +2934,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @Nullable public PlayerTeam getTeam() { @@ -23,10 +23,10 @@ index fb3f9082b16f5ec420ddc1f5a0e81b8130a71e4f..66ba606ccbff3a578a090d5170f3ff86 } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index ddf4a7bc19ba358364ea4517ce941e63ec4d26a0..878a8b7e1b0551d7b749cacce7ae63bc5349b5f3 100644 +index fe52b8c57f652fcd49a2282f7a8f1041909b35cf..f8b771a10b9bf123b55b8f3097bb8c6da607c413 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -873,6 +873,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -847,6 +847,7 @@ public abstract class LivingEntity extends Entity implements Attackable { String s = nbt.getString("Team"); Scoreboard scoreboard = this.level().getScoreboard(); PlayerTeam scoreboardteam = scoreboard.getPlayerTeam(s); diff --git a/patches/unapplied/server/0066-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/patches/server/0065-Add-methods-for-working-with-arrows-stuck-in-living-.patch similarity index 90% rename from patches/unapplied/server/0066-Add-methods-for-working-with-arrows-stuck-in-living-.patch rename to patches/server/0065-Add-methods-for-working-with-arrows-stuck-in-living-.patch index aa48fe9119..ddf3e716bc 100644 --- a/patches/unapplied/server/0066-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/patches/server/0065-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -7,10 +7,10 @@ Upstream added methods for this, original methods are now deprecated diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index c6b41aea86dd6c18b25754fa1ffe4d8ab1dd0f75..4a2f49be0af5d88e0fe5dd8af00b77dd0da2f208 100644 +index e6c68fd9a5fcd374cd7feca081189c9ba9225743..c36e4c1802e304853320576e0521dbc53cd25425 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -282,10 +282,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -283,10 +283,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } @Override @@ -41,7 +41,7 @@ index c6b41aea86dd6c18b25754fa1ffe4d8ab1dd0f75..4a2f49be0af5d88e0fe5dd8af00b77dd @Override public void damage(double amount) { -@@ -800,4 +819,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -802,4 +821,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { this.getHandle().persistentInvisibility = invisible; this.getHandle().setSharedFlag(5, invisible); } diff --git a/patches/unapplied/server/0067-Chunk-Save-Reattempt.patch b/patches/server/0066-Chunk-Save-Reattempt.patch similarity index 96% rename from patches/unapplied/server/0067-Chunk-Save-Reattempt.patch rename to patches/server/0066-Chunk-Save-Reattempt.patch index 7a39e17bad..0347b2117c 100644 --- a/patches/unapplied/server/0067-Chunk-Save-Reattempt.patch +++ b/patches/server/0066-Chunk-Save-Reattempt.patch @@ -19,7 +19,7 @@ index b24e8255ab18eb5b2e4968aa62aa3d72ef33f0eb..12b7d50f49a2184aaf220a4a50a137b2 } } 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 a2879ffb7ec01f7e47e912fc70d9df09527ef902..0697a34875fb807e39f4aae16788fe2455b8138f 100644 +index 4091d4d68b58bdefb2fdac1815e351d4f7c8a523..b7d0a48f38f0d8ae586012bb4e9a9faec21103c2 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 @@ -134,6 +134,11 @@ public class RegionFileStorage implements AutoCloseable { diff --git a/patches/unapplied/server/0068-Complete-resource-pack-API.patch b/patches/server/0067-Complete-resource-pack-API.patch similarity index 87% rename from patches/unapplied/server/0068-Complete-resource-pack-API.patch rename to patches/server/0067-Complete-resource-pack-API.patch index 3dabd39055..3e377d04c1 100644 --- a/patches/unapplied/server/0068-Complete-resource-pack-API.patch +++ b/patches/server/0067-Complete-resource-pack-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 26b8a69a528db8a836b138a2a223c385508ce2c4..5f5d8ae29ff702eacc72341fae074a05d977e7cd 100644 +index 94008b8a1f2dafdb9efa1fec6096d3eb632b9a5e..d2061ea6f670edd33be2460eef0b489e88857690 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -201,7 +201,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -202,7 +202,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack callback.packEventReceived(packet.id(), net.kyori.adventure.resource.ResourcePackStatus.valueOf(packet.action().name()), this.getCraftPlayer()); } // Paper end @@ -22,10 +22,10 @@ index 26b8a69a528db8a836b138a2a223c385508ce2c4..5f5d8ae29ff702eacc72341fae074a05 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f4b4e115a1f39524c2bd307c0e1aaf3c140df7c6..d6fafe977809a549e7076254d2dc6a4870af8530 100644 +index ecb17cffbec7d2630602b265660f7b9b3f317906..409607c68a1205094ae82e5384e8c13654e492da 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -206,6 +206,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -208,6 +208,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private double healthScale = 20; private CraftWorldBorder clientWorldBorder = null; private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener(); @@ -33,7 +33,7 @@ index f4b4e115a1f39524c2bd307c0e1aaf3c140df7c6..d6fafe977809a549e7076254d2dc6a48 public CraftPlayer(CraftServer server, ServerPlayer entity) { super(server, entity); -@@ -2080,6 +2081,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2093,6 +2094,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper end - adventure diff --git a/patches/unapplied/server/0069-Default-loading-permissions.yml-before-plugins.patch b/patches/server/0068-Default-loading-permissions.yml-before-plugins.patch similarity index 89% rename from patches/unapplied/server/0069-Default-loading-permissions.yml-before-plugins.patch rename to patches/server/0068-Default-loading-permissions.yml-before-plugins.patch index 19fdcb4869..a91fdb27be 100644 --- a/patches/unapplied/server/0069-Default-loading-permissions.yml-before-plugins.patch +++ b/patches/server/0068-Default-loading-permissions.yml-before-plugins.patch @@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe A config option has been added for those who depend on the previous behavior, but I don't expect that. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 65502d719c5e87dc6e24662fcc8ba1d0bde0b78d..df0b643e9665d967d1fcd4556a3a23135b4c577f 100644 +index fd31d0e76d1a953b128e777b1bc27e24b1e03ed7..bce780f491ee12dcd23a4ea5dd3ce6e8f92e6267 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -476,6 +476,7 @@ public final class CraftServer implements Server { +@@ -479,6 +479,7 @@ public final class CraftServer implements Server { if (type == PluginLoadOrder.STARTUP) { this.helpMap.clear(); this.helpMap.initializeGeneralTopics(); @@ -27,7 +27,7 @@ index 65502d719c5e87dc6e24662fcc8ba1d0bde0b78d..df0b643e9665d967d1fcd4556a3a2313 } Plugin[] plugins = this.pluginManager.getPlugins(); -@@ -495,7 +496,7 @@ public final class CraftServer implements Server { +@@ -498,7 +499,7 @@ public final class CraftServer implements Server { this.commandMap.registerServerAliases(); DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); diff --git a/patches/unapplied/server/0070-Allow-Reloading-of-Custom-Permissions.patch b/patches/server/0069-Allow-Reloading-of-Custom-Permissions.patch similarity index 90% rename from patches/unapplied/server/0070-Allow-Reloading-of-Custom-Permissions.patch rename to patches/server/0069-Allow-Reloading-of-Custom-Permissions.patch index a25d16f5e5..296e4348f3 100644 --- a/patches/unapplied/server/0070-Allow-Reloading-of-Custom-Permissions.patch +++ b/patches/server/0069-Allow-Reloading-of-Custom-Permissions.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index df0b643e9665d967d1fcd4556a3a23135b4c577f..f8818be7a36cfd0066f6ffebf493ff8ccab4112e 100644 +index bce780f491ee12dcd23a4ea5dd3ce6e8f92e6267..f8d2850c35e1b41c1844773c4b0452c17bd72f19 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2777,5 +2777,23 @@ public final class CraftServer implements Server { +@@ -2785,5 +2785,23 @@ public final class CraftServer implements Server { } return this.adventure$audiences; } diff --git a/patches/unapplied/server/0071-Remove-Metadata-on-reload.patch b/patches/server/0070-Remove-Metadata-on-reload.patch similarity index 88% rename from patches/unapplied/server/0071-Remove-Metadata-on-reload.patch rename to patches/server/0070-Remove-Metadata-on-reload.patch index 0160eaaf55..deda8cd6e0 100644 --- a/patches/unapplied/server/0071-Remove-Metadata-on-reload.patch +++ b/patches/server/0070-Remove-Metadata-on-reload.patch @@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive This will remove metadata on reload so it does not crash everything if a plugin uses it. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f8818be7a36cfd0066f6ffebf493ff8ccab4112e..3683d2e692a092afba12b12e6e70f6b104aa89f0 100644 +index f8d2850c35e1b41c1844773c4b0452c17bd72f19..502e7f4e168b7f9c6a0f68695f36b8d44cce218e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -990,8 +990,16 @@ public final class CraftServer implements Server { +@@ -993,8 +993,16 @@ public final class CraftServer implements Server { world.spigotConfig.init(); // Spigot } diff --git a/patches/unapplied/server/0072-Handle-Item-Meta-Inconsistencies.patch b/patches/server/0071-Handle-Item-Meta-Inconsistencies.patch similarity index 90% rename from patches/unapplied/server/0072-Handle-Item-Meta-Inconsistencies.patch rename to patches/server/0071-Handle-Item-Meta-Inconsistencies.patch index 4c8d58d154..c7ad83198c 100644 --- a/patches/unapplied/server/0072-Handle-Item-Meta-Inconsistencies.patch +++ b/patches/server/0071-Handle-Item-Meta-Inconsistencies.patch @@ -18,10 +18,10 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java b/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java -index b49eb019cce58049c2b3a0e80e3d08998b16f7ea..af18de11dd55938b6091f5ab183bd3fe4e8df152 100644 +index a4f8cb2c9dc464e94483f5574cddab85ef407048..8ac485d82c2d2b32f4d54e02c18c2cb2c3df4fa4 100644 --- a/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java +++ b/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java -@@ -27,15 +27,27 @@ import net.minecraft.tags.TagKey; +@@ -26,12 +26,25 @@ import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.item.component.TooltipProvider; @@ -35,29 +35,27 @@ index b49eb019cce58049c2b3a0e80e3d08998b16f7ea..af18de11dd55938b6091f5ab183bd3fe + private static final java.util.Comparator> ENCHANTMENT_ORDER = java.util.Comparator.comparing(Holder::getRegisteredName); + public static final ItemEnchantments EMPTY = new ItemEnchantments(new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), true); + // Paper end - public static final int MAX_LEVEL = 255; private static final Codec LEVEL_CODEC = Codec.intRange(0, 255); -- private static final Codec>> LEVELS_CODEC = Codec.unboundedMap( -+ private static final Codec>> LEVELS_CODEC = Codec.unboundedMap( // Paper - BuiltInRegistries.ENCHANTMENT.holderByNameCodec(), LEVEL_CODEC - ) +- private static final Codec>> LEVELS_CODEC = Codec.unboundedMap(Enchantment.CODEC, LEVEL_CODEC) - .xmap(Object2IntOpenHashMap::new, Function.identity()); -+ // Paper start - sort enchantments ++ private static final Codec>> LEVELS_CODEC = Codec.unboundedMap( ++ Enchantment.CODEC, LEVEL_CODEC ++ )// Paper start - sort enchantments + .xmap(m -> { + final Object2IntAVLTreeMap> map = new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER); + map.putAll(m); + return map; + }, Function.identity()); -+ // Paper end - sort enchantments ++ // Paper end - sort enchantments private static final Codec FULL_CODEC = RecordCodecBuilder.create( instance -> instance.group( LEVELS_CODEC.fieldOf("levels").forGetter(component -> component.enchantments), -@@ -45,16 +57,16 @@ public class ItemEnchantments implements TooltipProvider { +@@ -41,16 +54,16 @@ public class ItemEnchantments implements TooltipProvider { ); public static final Codec CODEC = Codec.withAlternative(FULL_CODEC, LEVELS_CODEC, map -> new ItemEnchantments(map, true)); public static final StreamCodec STREAM_CODEC = StreamCodec.composite( -- ByteBufCodecs.map(Object2IntOpenHashMap::new, ByteBufCodecs.holderRegistry(Registries.ENCHANTMENT), ByteBufCodecs.VAR_INT), -+ ByteBufCodecs.map((v) -> new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), ByteBufCodecs.holderRegistry(Registries.ENCHANTMENT), ByteBufCodecs.VAR_INT), // Paper +- ByteBufCodecs.map(Object2IntOpenHashMap::new, Enchantment.STREAM_CODEC, ByteBufCodecs.VAR_INT), ++ ByteBufCodecs.map((v) -> new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), Enchantment.STREAM_CODEC, ByteBufCodecs.VAR_INT), component -> component.enchantments, ByteBufCodecs.BOOL, component -> component.showInTooltip, @@ -72,7 +70,7 @@ index b49eb019cce58049c2b3a0e80e3d08998b16f7ea..af18de11dd55938b6091f5ab183bd3fe this.enchantments = enchantments; this.showInTooltip = showInTooltip; -@@ -145,7 +157,7 @@ public class ItemEnchantments implements TooltipProvider { +@@ -141,7 +154,7 @@ public class ItemEnchantments implements TooltipProvider { } public static class Mutable { @@ -82,7 +80,7 @@ index b49eb019cce58049c2b3a0e80e3d08998b16f7ea..af18de11dd55938b6091f5ab183bd3fe public Mutable(ItemEnchantments enchantmentsComponent) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index f44502a51c9fb393746e866e1a93ae9cedc2b656..dac1ff1387462b0125140a37d134d51c5e023bf5 100644 +index c557a54f15943e07d272c3ad41ca4f90c4dc82ac..f3f567bf61e655862fbeea4be87241d6f7f15785 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -191,16 +191,13 @@ public final class CraftItemStack extends ItemStack { @@ -102,7 +100,7 @@ index f44502a51c9fb393746e866e1a93ae9cedc2b656..dac1ff1387462b0125140a37d134d51c + this.setItemMeta(itemMeta); } - ItemEnchantments.Mutable listCopy = new ItemEnchantments.Mutable(list); -- listCopy.set(CraftEnchantment.bukkitToMinecraft(ench), level); +- listCopy.set(CraftEnchantment.bukkitToMinecraftHolder(ench), level); - this.handle.set(DataComponents.ENCHANTMENTS, listCopy.toImmutable()); + // Paper end } @@ -135,7 +133,7 @@ index f44502a51c9fb393746e866e1a93ae9cedc2b656..dac1ff1387462b0125140a37d134d51c } - - ItemEnchantments.Mutable listCopy = new ItemEnchantments.Mutable(list); -- listCopy.set(CraftEnchantment.bukkitToMinecraft(ench), -1); // Negative to remove +- listCopy.set(CraftEnchantment.bukkitToMinecraftHolder(ench), -1); // Negative to remove - this.handle.set(DataComponents.ENCHANTMENTS, listCopy.toImmutable()); + // Paper end @@ -151,7 +149,7 @@ index f44502a51c9fb393746e866e1a93ae9cedc2b656..dac1ff1387462b0125140a37d134d51c static Map getEnchantments(net.minecraft.world.item.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d02419f4a00e8 100644 +index 7381f0dac6dd0ec716e3b3475bbf8f5aae049e28..d04af9ea23c2fd62febce4b8d4b3fd49df542095 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; @@ -170,7 +168,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241 import java.util.EnumSet; import java.util.HashMap; import java.util.Iterator; -@@ -241,7 +243,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -248,7 +250,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private List lore; // null and empty are two different states internally private Integer customModelData; private Map blockData; @@ -179,7 +177,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241 private Multimap attributeModifiers; private int repairCost; private int hideFlag; -@@ -281,7 +283,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -289,7 +291,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.blockData = meta.blockData; if (meta.enchantments != null) { @@ -188,7 +186,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241 } if (meta.hasAttributeModifiers()) { -@@ -418,8 +420,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -432,8 +434,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -199,7 +197,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241 tag.entrySet().forEach((entry) -> { Holder id = entry.getKey(); -@@ -678,13 +680,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -697,13 +699,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return modifiers; } @@ -215,7 +213,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241 for (Map.Entry entry : ench.entrySet()) { Enchantment enchantment = CraftEnchantment.stringToBukkit(entry.getKey().toString()); if ((enchantment != null) && (entry.getValue() instanceof Integer)) { -@@ -1003,14 +1005,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1026,14 +1028,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Map getEnchants() { @@ -232,7 +230,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -1591,7 +1593,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1631,7 +1633,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.customModelData = this.customModelData; clone.blockData = this.blockData; if (this.enchantments != null) { @@ -241,7 +239,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241 } if (this.hasAttributeModifiers()) { clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); -@@ -1918,4 +1920,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1966,4 +1968,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return (result != null) ? result : Optional.empty(); } diff --git a/patches/unapplied/server/0073-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/patches/server/0072-Configurable-Non-Player-Arrow-Despawn-Rate.patch similarity index 89% rename from patches/unapplied/server/0073-Configurable-Non-Player-Arrow-Despawn-Rate.patch rename to patches/server/0072-Configurable-Non-Player-Arrow-Despawn-Rate.patch index e9a2a02b12..35928fa7bc 100644 --- a/patches/unapplied/server/0073-Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/patches/server/0072-Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate Can set a much shorter despawn rate for arrows that players can not pick up. 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 94f6b097a2c29fd00d6a670c5bb35fb4ade23d2e..efcfbcb3dc352c9015cc9121dc8d98e8deed8bfd 100644 +index 65ad1166d3cc85bfe65170c55fd0b4300efcb9a3..686237a21eccb43ee9f0b659915c141d6ad49f28 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -332,7 +332,7 @@ public abstract class AbstractArrow extends Projectile { +@@ -349,7 +349,7 @@ public abstract class AbstractArrow extends Projectile { protected void tickDespawn() { ++this.life; diff --git a/patches/unapplied/server/0074-Add-World-Util-Methods.patch b/patches/server/0073-Add-World-Util-Methods.patch similarity index 91% rename from patches/unapplied/server/0074-Add-World-Util-Methods.patch rename to patches/server/0073-Add-World-Util-Methods.patch index ddac3fe2dc..163fce5769 100644 --- a/patches/unapplied/server/0074-Add-World-Util-Methods.patch +++ b/patches/server/0073-Add-World-Util-Methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 2eb2fbe57a33701770baefea5dc727684f2779ec..8ba4395670304647d62987952c6339d394140af6 100644 +index 4f5ff6849e0ea7a4f2491e0dbede7699554239dc..eae1d6eedeed09b3f49913c2bb205b80442bbfe3 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -340,6 +340,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -341,6 +341,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return chunk == null ? null : chunk.getFluidState(blockposition); } diff --git a/patches/unapplied/server/0075-Custom-replacement-for-eaten-items.patch b/patches/server/0074-Custom-replacement-for-eaten-items.patch similarity index 90% rename from patches/unapplied/server/0075-Custom-replacement-for-eaten-items.patch rename to patches/server/0074-Custom-replacement-for-eaten-items.patch index 374c70131a..7e68f3e59e 100644 --- a/patches/unapplied/server/0075-Custom-replacement-for-eaten-items.patch +++ b/patches/server/0074-Custom-replacement-for-eaten-items.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 878a8b7e1b0551d7b749cacce7ae63bc5349b5f3..1a8316cb8cfb5efe19b68eb93fef317c6774325d 100644 +index f8b771a10b9bf123b55b8f3097bb8c6da607c413..d63d72d5cafdcdf3e8d8f5e837bf7aeb0ce18c74 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3802,10 +3802,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3830,10 +3830,11 @@ public abstract class LivingEntity extends Entity implements Attackable { this.triggerItemUseEffects(this.useItem, 16); // CraftBukkit start - fire PlayerItemConsumeEvent ItemStack itemstack; @@ -21,7 +21,7 @@ index 878a8b7e1b0551d7b749cacce7ae63bc5349b5f3..1a8316cb8cfb5efe19b68eb93fef317c this.level().getCraftServer().getPluginManager().callEvent(event); if (event.isCancelled()) { -@@ -3819,6 +3820,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3847,6 +3848,12 @@ public abstract class LivingEntity extends Entity implements Attackable { } else { itemstack = this.useItem.finishUsingItem(this.level(), this); } @@ -34,7 +34,7 @@ index 878a8b7e1b0551d7b749cacce7ae63bc5349b5f3..1a8316cb8cfb5efe19b68eb93fef317c // CraftBukkit end if (itemstack != this.useItem) { -@@ -3826,6 +3833,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3854,6 +3861,11 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.stopUsingItem(); diff --git a/patches/unapplied/server/0076-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/patches/server/0075-handle-NaN-health-absorb-values-and-repair-bad-data.patch similarity index 81% rename from patches/unapplied/server/0076-handle-NaN-health-absorb-values-and-repair-bad-data.patch rename to patches/server/0075-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 5cc6d356e5..99a70f2c4a 100644 --- a/patches/unapplied/server/0076-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/patches/server/0075-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -5,10 +5,10 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 1a8316cb8cfb5efe19b68eb93fef317c6774325d..b59f48771aaad9429bd7078c6ecddf4f46d08cef 100644 +index d63d72d5cafdcdf3e8d8f5e837bf7aeb0ce18c74..ac0d3cc8c8a13921576a12fd7fb444980ce5b085 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -833,7 +833,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -807,7 +807,13 @@ public abstract class LivingEntity extends Entity implements Attackable { @Override public void readAdditionalSaveData(CompoundTag nbt) { @@ -20,10 +20,10 @@ index 1a8316cb8cfb5efe19b68eb93fef317c6774325d..b59f48771aaad9429bd7078c6ecddf4f + } + this.internalSetAbsorptionAmount(absorptionAmount); + // Paper end - Check for NaN - if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) { - this.getAttributes().load(nbt.getList("Attributes", 10)); + if (nbt.contains("attributes", 9) && this.level() != null && !this.level().isClientSide) { + this.getAttributes().load(nbt.getList("attributes", 10)); } -@@ -1365,6 +1371,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1341,6 +1347,10 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void setHealth(float health) { @@ -34,7 +34,7 @@ index 1a8316cb8cfb5efe19b68eb93fef317c6774325d..b59f48771aaad9429bd7078c6ecddf4f // CraftBukkit start - Handle scaled health if (this instanceof ServerPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity(); -@@ -3637,7 +3647,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3660,7 +3670,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } public final void setAbsorptionAmount(float absorptionAmount) { @@ -44,10 +44,10 @@ index 1a8316cb8cfb5efe19b68eb93fef317c6774325d..b59f48771aaad9429bd7078c6ecddf4f protected void internalSetAbsorptionAmount(float absorptionAmount) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d6fafe977809a549e7076254d2dc6a4870af8530..93e537aa401bc17f2a34da4f0119026ee34e2c1f 100644 +index 409607c68a1205094ae82e5384e8c13654e492da..b6c5636f21bfbade1dc9d048579e513f43642eb6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2324,6 +2324,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2337,6 +2337,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { diff --git a/patches/unapplied/server/0077-Use-a-Shared-Random-for-Entities.patch b/patches/server/0076-Use-a-Shared-Random-for-Entities.patch similarity index 92% rename from patches/unapplied/server/0077-Use-a-Shared-Random-for-Entities.patch rename to patches/server/0076-Use-a-Shared-Random-for-Entities.patch index 62162b7089..7dc5fb2538 100644 --- a/patches/unapplied/server/0077-Use-a-Shared-Random-for-Entities.patch +++ b/patches/server/0076-Use-a-Shared-Random-for-Entities.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 66ba606ccbff3a578a090d5170f3ff866ecf99af..2fcdd61e9669904756aa33b1ff8ab7160ea5e371 100644 +index b5c03b3495f5eb5ac6b054d4ca986a6a597c713c..ea25e9ab6c1d54e834a05951d2369d6e2e3a3fb3 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -169,6 +169,79 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -175,6 +175,79 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } @@ -89,7 +89,7 @@ index 66ba606ccbff3a578a090d5170f3ff866ecf99af..2fcdd61e9669904756aa33b1ff8ab716 private CraftEntity bukkitEntity; public CraftEntity getBukkitEntity() { -@@ -364,7 +437,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -370,7 +443,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.bb = Entity.INITIAL_AABB; this.stuckSpeedMultiplier = Vec3.ZERO; this.nextStep = 1.0F; @@ -99,10 +99,10 @@ index 66ba606ccbff3a578a090d5170f3ff866ecf99af..2fcdd61e9669904756aa33b1ff8ab716 this.fluidHeight = new Object2DoubleArrayMap(2); this.fluidOnEyes = new HashSet(); diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java -index a98c7d9bf8dbaf9df51551fe66f7927798e9670f..43b4ea96c5c4a6234e5b83d41db9b85c1fe27b8f 100644 +index 97d5bc9bab95c21afb3b95d2a7eb7df0b64698ed..42f4e544fe7fbc342f15eacb5e38d40849e3c419 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Squid.java +++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java -@@ -42,7 +42,7 @@ public class Squid extends WaterAnimal { +@@ -41,7 +41,7 @@ public class Squid extends WaterAnimal { public Squid(EntityType type, Level world) { super(type, world); diff --git a/patches/unapplied/server/0078-Configurable-spawn-chances-for-skeleton-horses.patch b/patches/server/0077-Configurable-spawn-chances-for-skeleton-horses.patch similarity index 90% rename from patches/unapplied/server/0078-Configurable-spawn-chances-for-skeleton-horses.patch rename to patches/server/0077-Configurable-spawn-chances-for-skeleton-horses.patch index ea9b957f2c..7e876a2d49 100644 --- a/patches/unapplied/server/0078-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/patches/server/0077-Configurable-spawn-chances-for-skeleton-horses.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 53e69115a2186c0124d3d8c83f6ca0aecc68c324..001cbed05de94cadd4862c38c414b5e039bff818 100644 +index d0788c4223891117c042aa4243e6804b4ed33aea..df60bfc7555326f079082199b940b0c4b4248cfc 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -620,7 +620,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -621,7 +621,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (this.isRainingAt(blockposition)) { DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition); diff --git a/patches/unapplied/server/0079-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/patches/server/0078-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch similarity index 90% rename from patches/unapplied/server/0079-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch rename to patches/server/0078-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index fdc15db781..70d7c34607 100644 --- a/patches/unapplied/server/0079-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/patches/server/0078-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener Saves on some object allocation and processing when no plugin listens to this diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0b2588dc70b295026fc2050797a1d7ef9e5b8dca..c572182a0d3553a85e974c23db5b1e9873a53bc3 100644 +index 5c82bf57575bbe8bea8d39bead51c6860ac86e37..4fd88b63ae6e6aa3265f72f4f0ae1b1895b70be9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1517,6 +1517,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { String s = String.valueOf(worldserver); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 001cbed05de94cadd4862c38c414b5e039bff818..5b44a9e0b6d87e7caba54cb4e972099c1602393b 100644 +index df60bfc7555326f079082199b940b0c4b4248cfc..35bcdbfd7f17c4e2260c199e9848c4d361b61944 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -226,6 +226,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -227,6 +227,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // CraftBukkit start public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; @@ -30,10 +30,10 @@ index 001cbed05de94cadd4862c38c414b5e039bff818..5b44a9e0b6d87e7caba54cb4e972099c public LevelChunk getChunkIfLoaded(int x, int z) { return this.chunkSource.getChunk(x, z, false); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 8ba4395670304647d62987952c6339d394140af6..33c9001970fe01bedd72f6ba4388b43ed9707fc8 100644 +index eae1d6eedeed09b3f49913c2bb205b80442bbfe3..622ecc1aeb9140d5c0d181fa472d123c42e5c5f4 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -490,7 +490,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -491,7 +491,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit start iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam CraftWorld world = ((ServerLevel) this).getWorld(); diff --git a/patches/unapplied/server/0080-Entity-AddTo-RemoveFrom-World-Events.patch b/patches/server/0079-Entity-AddTo-RemoveFrom-World-Events.patch similarity index 84% rename from patches/unapplied/server/0080-Entity-AddTo-RemoveFrom-World-Events.patch rename to patches/server/0079-Entity-AddTo-RemoveFrom-World-Events.patch index 701980a603..9a833e6f86 100644 --- a/patches/unapplied/server/0080-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/patches/server/0079-Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 5b44a9e0b6d87e7caba54cb4e972099c1602393b..2e4567e34369e6a9138aa064adf64b9895e21277 100644 +index 35bcdbfd7f17c4e2260c199e9848c4d361b61944..43dbcfb5900b301950be68db48487af2a95748a3 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2185,6 +2185,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2153,6 +2153,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.setOrigin(entity.getOriginVector().toLocation(getWorld())); } // Paper end - Entity origin API @@ -16,7 +16,7 @@ index 5b44a9e0b6d87e7caba54cb4e972099c1602393b..2e4567e34369e6a9138aa064adf64b98 } public void onTrackingEnd(Entity entity) { -@@ -2255,6 +2256,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2223,6 +2224,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } // CraftBukkit end diff --git a/patches/unapplied/server/0081-Configurable-Chunk-Inhabited-Time.patch b/patches/server/0080-Configurable-Chunk-Inhabited-Time.patch similarity index 88% rename from patches/unapplied/server/0081-Configurable-Chunk-Inhabited-Time.patch rename to patches/server/0080-Configurable-Chunk-Inhabited-Time.patch index 5c8f105ea5..5dd9319b35 100644 --- a/patches/unapplied/server/0081-Configurable-Chunk-Inhabited-Time.patch +++ b/patches/server/0080-Configurable-Chunk-Inhabited-Time.patch @@ -11,10 +11,10 @@ For people who want all chunks to be treated equally, you can chose a fixed valu This allows to fine-tune vanilla gameplay. 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 60a1828d179c29514813143e3c8e93b08afe9849..963d86e7505e4d9c3854d35d9b59aed3369e8a57 100644 +index 791b7d3a606fddfe21b51258e9732b14381200f5..00f6ef5ffe33d6d45b5356e215324cbe0eadfda4 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -272,6 +272,13 @@ public class LevelChunk extends ChunkAccess { +@@ -271,6 +271,13 @@ public class LevelChunk extends ChunkAccess { return new ChunkAccess.TicksToSave(this.blockTicks, this.fluidTicks); } diff --git a/patches/unapplied/server/0082-EntityPathfindEvent.patch b/patches/server/0081-EntityPathfindEvent.patch similarity index 100% rename from patches/unapplied/server/0082-EntityPathfindEvent.patch rename to patches/server/0081-EntityPathfindEvent.patch diff --git a/patches/unapplied/server/0083-Sanitise-RegionFileCache-and-make-configurable.patch b/patches/server/0082-Sanitise-RegionFileCache-and-make-configurable.patch similarity index 93% rename from patches/unapplied/server/0083-Sanitise-RegionFileCache-and-make-configurable.patch rename to patches/server/0082-Sanitise-RegionFileCache-and-make-configurable.patch index eeb14ca415..8116e8a235 100644 --- a/patches/unapplied/server/0083-Sanitise-RegionFileCache-and-make-configurable.patch +++ b/patches/server/0082-Sanitise-RegionFileCache-and-make-configurable.patch @@ -11,7 +11,7 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap). The maximum size of the RegionFileCache is also made configurable. 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 0697a34875fb807e39f4aae16788fe2455b8138f..9748b798f55ee0cbfdce1a2b2c48700623ef17a5 100644 +index b7d0a48f38f0d8ae586012bb4e9a9faec21103c2..7d4aa3d375bde32e0d2606346202929d481acad0 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 @@ -39,7 +39,7 @@ public class RegionFileStorage implements AutoCloseable { diff --git a/patches/unapplied/server/0084-Do-not-load-chunks-for-Pathfinding.patch b/patches/server/0083-Do-not-load-chunks-for-Pathfinding.patch similarity index 100% rename from patches/unapplied/server/0084-Do-not-load-chunks-for-Pathfinding.patch rename to patches/server/0083-Do-not-load-chunks-for-Pathfinding.patch diff --git a/patches/unapplied/server/0085-Add-PlayerUseUnknownEntityEvent.patch b/patches/server/0084-Add-PlayerUseUnknownEntityEvent.patch similarity index 92% rename from patches/unapplied/server/0085-Add-PlayerUseUnknownEntityEvent.patch rename to patches/server/0084-Add-PlayerUseUnknownEntityEvent.patch index 8a7921ae97..30123a34c9 100644 --- a/patches/unapplied/server/0085-Add-PlayerUseUnknownEntityEvent.patch +++ b/patches/server/0084-Add-PlayerUseUnknownEntityEvent.patch @@ -28,10 +28,10 @@ index 1e9c68cd1868d083e6a790d56006dd4aa432010a..8a0ee9564fc36a2badf1357f7e6c47b5 + // Paper end - PlayerUseUnknownEntityEvent } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ad598e57feb2d9db1b71cb3a432df22212aab9b3..555623fa4176c9ac4534cc7c5174d45f7c321ba1 100644 +index f9050a1d255780d5131200e8b31bd91154907af6..fc196fc89502b8006dba0f15380d866882f934ce 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2476,7 +2476,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2493,7 +2493,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl }); } } @@ -59,10 +59,10 @@ index ad598e57feb2d9db1b71cb3a432df22212aab9b3..555623fa4176c9ac4534cc7c5174d45f @Override diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 4c59520355a21249d2a3132dbaae97fd4e17c86b..76be4e52f7e140cf1951ae8be8a468e2bb7df20e 100644 +index 968c5588659990d1e29252413881cf6dd867b984..09b6cfd22673d338c5d16162bafeac2ae0b3074a 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1853,4 +1853,13 @@ public class CraftEventFactory { +@@ -1859,4 +1859,13 @@ public class CraftEventFactory { Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause)); } diff --git a/patches/unapplied/server/0086-Configurable-random-tick-rates-for-blocks.patch b/patches/server/0085-Configurable-random-tick-rates-for-blocks.patch similarity index 100% rename from patches/unapplied/server/0086-Configurable-random-tick-rates-for-blocks.patch rename to patches/server/0085-Configurable-random-tick-rates-for-blocks.patch diff --git a/patches/unapplied/server/0087-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/patches/server/0086-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch similarity index 82% rename from patches/unapplied/server/0087-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch rename to patches/server/0086-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index 0e30285466..dd26a7381c 100644 --- a/patches/unapplied/server/0087-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/patches/server/0086-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 2e4567e34369e6a9138aa064adf64b9895e21277..57c13407fd20bcdd17642b0e6078f10082aea87b 100644 +index 43dbcfb5900b301950be68db48487af2a95748a3..2d27b92b02611d883a84a694280364d3a7ddcb09 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1391,6 +1391,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1389,6 +1389,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public void updateNeighborsAt(BlockPos pos, Block sourceBlock) { diff --git a/patches/unapplied/server/0088-Optimize-DataBits.patch b/patches/server/0087-Optimize-DataBits.patch similarity index 100% rename from patches/unapplied/server/0088-Optimize-DataBits.patch rename to patches/server/0087-Optimize-DataBits.patch diff --git a/patches/unapplied/server/0089-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/patches/server/0088-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch similarity index 100% rename from patches/unapplied/server/0089-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch rename to patches/server/0088-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch diff --git a/patches/unapplied/server/0090-Configurable-Player-Collision.patch b/patches/server/0089-Configurable-Player-Collision.patch similarity index 93% rename from patches/unapplied/server/0090-Configurable-Player-Collision.patch rename to patches/server/0089-Configurable-Player-Collision.patch index 5d58f29509..e6bf7fd1ae 100644 --- a/patches/unapplied/server/0090-Configurable-Player-Collision.patch +++ b/patches/server/0089-Configurable-Player-Collision.patch @@ -18,10 +18,10 @@ index 9a1a961eabd4362c171da78c6be82c867f3696a4..1d0c473442b5c72245c356054440323e ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buf, this.playerPrefix); ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buf, this.playerSuffix); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c572182a0d3553a85e974c23db5b1e9873a53bc3..17c1175d8a937b085d475095e3d48f30ee89dcc0 100644 +index 4fd88b63ae6e6aa3265f72f4f0ae1b1895b70be9..8f0a0384d12b738553a6bec02e3b9438671715a9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -633,6 +633,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop registryManager, PlayerDataStorage saveHandler, int maxPlayers) { this.cserver = server.server = new CraftServer((DedicatedServer) server, this); -@@ -397,6 +398,13 @@ public abstract class PlayerList { +@@ -390,6 +391,13 @@ public abstract class PlayerList { player.initInventoryMenu(); // CraftBukkit - Moved from above, added world @@ -68,7 +68,7 @@ index abb769cbbed17a82ee86a6c99e61a375045d9937..3fb300026e627313c65ea23b9c0a9f57 PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); } -@@ -519,6 +527,16 @@ public abstract class PlayerList { +@@ -512,6 +520,16 @@ public abstract class PlayerList { entityplayer.doTick(); // SPIGOT-924 // CraftBukkit end @@ -85,7 +85,7 @@ index abb769cbbed17a82ee86a6c99e61a375045d9937..3fb300026e627313c65ea23b9c0a9f57 this.save(entityplayer); if (entityplayer.isPassenger()) { Entity entity = entityplayer.getRootVehicle(); -@@ -1160,6 +1178,13 @@ public abstract class PlayerList { +@@ -1129,6 +1147,13 @@ public abstract class PlayerList { } // CraftBukkit end diff --git a/patches/unapplied/server/0091-Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/patches/server/0090-Add-handshake-event-to-allow-plugins-to-handle-clien.patch similarity index 94% rename from patches/unapplied/server/0091-Add-handshake-event-to-allow-plugins-to-handle-clien.patch rename to patches/server/0090-Add-handshake-event-to-allow-plugins-to-handle-clien.patch index 87920d8d8c..33ef52f088 100644 --- a/patches/unapplied/server/0091-Add-handshake-event-to-allow-plugins-to-handle-clien.patch +++ b/patches/server/0090-Add-handshake-event-to-allow-plugins-to-handle-clien.patch @@ -6,11 +6,11 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index 3634740acd1ca7c13956c56508db5892fd00edc9..9214fb6b8e21ff6aee8be0691f1fe6e41c901ba3 100644 +index 64e3d3626a30d4dfe15ed1f7cb3f0480ece5edce..7ae4279768b70a4fdc8f4438898871a17c8fe402 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -@@ -120,9 +120,43 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL - this.connection.disconnect(ichatmutablecomponent); +@@ -121,9 +121,43 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL + this.connection.disconnect((Component) ichatmutablecomponent); } else { this.connection.setupInboundProtocol(LoginProtocols.SERVERBOUND, new ServerLoginPacketListenerImpl(this.server, this.connection, transfer)); + // Paper start - PlayerHandshakeEvent diff --git a/patches/unapplied/server/0092-Configurable-RCON-IP-address.patch b/patches/server/0091-Configurable-RCON-IP-address.patch similarity index 92% rename from patches/unapplied/server/0092-Configurable-RCON-IP-address.patch rename to patches/server/0091-Configurable-RCON-IP-address.patch index 5f1a673a18..96c8df2d2c 100644 --- a/patches/unapplied/server/0092-Configurable-RCON-IP-address.patch +++ b/patches/server/0091-Configurable-RCON-IP-address.patch @@ -9,10 +9,10 @@ For servers with multiple IP's, ability to bind to a specific interface. public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String; diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -index 946b9b9283ca345d711d40cc2cd04039fec5c77b..502e5386ec4306de93148266f60810ec52ae5ab2 100644 +index 36a0a8b5f85edad4dcfcdc75c4db2aa69261eae6..eb27ef574445e1311b763d84aa1b37128baa75f7 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -@@ -109,6 +109,8 @@ public class DedicatedServerProperties extends Settings implements ServerInfo, CommandSource, AutoCloseable { + public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements ServerInfo, ChunkIOErrorReporter, CommandSource, AutoCloseable { + private static MinecraftServer SERVER; // Paper public static final Logger LOGGER = LogUtils.getLogger(); public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper public static final String VANILLA_BRAND = "vanilla"; -@@ -324,6 +325,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { -@@ -2526,9 +2528,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop transaction = new java.util.ArrayList(); private int maxStack = MAX_STACK; diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java -index 025e57993b85402c48db29d65ea3ceaf277ff27a..e0aec3b3e04d603dc208029554f981c6b9e6b43e 100644 +index 42f8e2d961f83c3e9ce384158b9dfc4014eb0a5f..4cdf3b54187ebcb1f5ddfa6114386127a2846f01 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java -@@ -209,7 +209,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain +@@ -217,7 +217,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain @Nullable @Override public AbstractContainerMenu createMenu(int syncId, Inventory playerInventory, Player player) { @@ -627,7 +627,7 @@ index 025e57993b85402c48db29d65ea3ceaf277ff27a..e0aec3b3e04d603dc208029554f981c6 return null; } else { this.unpackLootTable(playerInventory.player); -@@ -257,6 +257,14 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain +@@ -265,6 +265,14 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain this.level().gameEvent((Holder) GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.Context.of((Entity) player)); } @@ -643,7 +643,7 @@ index 025e57993b85402c48db29d65ea3ceaf277ff27a..e0aec3b3e04d603dc208029554f981c6 public List transaction = new java.util.ArrayList(); private int maxStack = MAX_STACK; diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java -index dbde2402fd46b0d06e8efeb90be6fb98d7ae7798..d976a6e3a79a01392a5033b05864d82782a30916 100644 +index 3ee99193de5deb6a38d6ded561fe8f2fbf711327..ccc7367ab2740bea0f2b907223a0920b11665092 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java @@ -62,22 +62,26 @@ public interface ContainerEntity extends Container, MenuProvider { @@ -663,7 +663,7 @@ index dbde2402fd46b0d06e8efeb90be6fb98d7ae7798..d976a6e3a79a01392a5033b05864d827 default void readChestVehicleSaveData(CompoundTag nbt, HolderLookup.Provider registriesLookup) { this.clearItemStacks(); if (nbt.contains("LootTable", 8)) { - this.setLootTable(ResourceKey.create(Registries.LOOT_TABLE, new ResourceLocation(nbt.getString("LootTable")))); + this.setLootTable(ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.parse(nbt.getString("LootTable")))); + // Paper start - LootTable API + if (this.getLootTable() != null) { + this.lootableData().loadNbt(nbt); diff --git a/patches/unapplied/server/0098-System-property-for-disabling-watchdoge.patch b/patches/server/0097-System-property-for-disabling-watchdoge.patch similarity index 100% rename from patches/unapplied/server/0098-System-property-for-disabling-watchdoge.patch rename to patches/server/0097-System-property-for-disabling-watchdoge.patch diff --git a/patches/unapplied/server/0099-Async-GameProfileCache-saving.patch b/patches/server/0098-Async-GameProfileCache-saving.patch similarity index 92% rename from patches/unapplied/server/0099-Async-GameProfileCache-saving.patch rename to patches/server/0098-Async-GameProfileCache-saving.patch index 24c92ad83f..fae04396e8 100644 --- a/patches/unapplied/server/0099-Async-GameProfileCache-saving.patch +++ b/patches/server/0098-Async-GameProfileCache-saving.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Async GameProfileCache saving diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index be0bb759dafa149f7c4bc560dcbf51dfd45b4dd8..fca7340f5b0dbbf072a752e7e7b589dbaeb17d50 100644 +index fa55700e61d10cc071e55dfe43b48aee2113cd44..56d51073eb0cd902fa2c1e790201f74d120b149f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -992,7 +992,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions diff --git a/patches/unapplied/server/0102-Add-server-name-parameter.patch b/patches/server/0101-Add-server-name-parameter.patch similarity index 90% rename from patches/unapplied/server/0102-Add-server-name-parameter.patch rename to patches/server/0101-Add-server-name-parameter.patch index b371d8db4d..74018176e7 100644 --- a/patches/unapplied/server/0102-Add-server-name-parameter.patch +++ b/patches/server/0101-Add-server-name-parameter.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index ce4671b24c7471efb3f6a1ae87d96c67881642f6..04a12fc412693c689c2048e4d568225b10ccf17b 100644 +index 9dc72b01092783c436bc1fa8ce29ff7cdaa39b19..9515a6f72b54bc8926f10182143b2aa9b684a341 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -168,6 +168,14 @@ public class Main { diff --git a/patches/unapplied/server/0103-Fix-global-sound-handling.patch b/patches/server/0102-Fix-global-sound-handling.patch similarity index 91% rename from patches/unapplied/server/0103-Fix-global-sound-handling.patch rename to patches/server/0102-Fix-global-sound-handling.patch index 81efd49063..d975a405a4 100644 --- a/patches/unapplied/server/0103-Fix-global-sound-handling.patch +++ b/patches/server/0102-Fix-global-sound-handling.patch @@ -11,10 +11,10 @@ Co-authored-by: lexikiq Co-authored-by: Aikar diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 57c13407fd20bcdd17642b0e6078f10082aea87b..0a7dec5ff89c94503908ad011fe7da8dd8256685 100644 +index 2d27b92b02611d883a84a694280364d3a7ddcb09..7c835a9328b1ba8426663ed3e9575fcd35a0f748 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1324,7 +1324,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1322,7 +1322,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public void levelEvent(@Nullable Player player, int eventId, BlockPos pos, int data) { @@ -24,10 +24,10 @@ index 57c13407fd20bcdd17642b0e6078f10082aea87b..0a7dec5ff89c94503908ad011fe7da8d public int getLogicalHeight() { diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index 53ff70fff0d12a151d13481a3226f72af57cce3e..993ccde9e6ee769ce51cdfa4ff06cfe1bd27bbb0 100644 +index 7432becf1c9a378a62e116153aebad4960c0c7bd..dba973ba5088d253aa67f5577663cccda7f4edd1 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -@@ -679,11 +679,12 @@ public class EnderDragon extends Mob implements Enemy { +@@ -696,11 +696,12 @@ public class EnderDragon extends Mob implements Enemy { // CraftBukkit start - Use relative location for far away sounds // this.level().globalLevelEvent(1028, this.blockPosition(), 0); int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16; @@ -43,7 +43,7 @@ index 53ff70fff0d12a151d13481a3226f72af57cce3e..993ccde9e6ee769ce51cdfa4ff06cfe1 double deltaLength = Math.sqrt(distanceSquared); double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance; 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 ff04f392163c2f7b1015ce379706d19a5f655f5c..b0ac85dc3c67d2e4d70dfb09d4e8fc349aba14d2 100644 +index d288bc209a0b0fdf2d73197a8e7d179e8e8c31e7..3ee24382ef3614ff0c5d5cdc614a41286ba4af5e 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 @@ -278,11 +278,12 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -62,10 +62,10 @@ index ff04f392163c2f7b1015ce379706d19a5f655f5c..b0ac85dc3c67d2e4d70dfb09d4e8fc34 double deltaLength = Math.sqrt(distanceSquared); double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance; diff --git a/src/main/java/net/minecraft/world/item/EnderEyeItem.java b/src/main/java/net/minecraft/world/item/EnderEyeItem.java -index 6df874ac5091896be5edddd362c11958c0ad815b..37cfb9694dc06f693b7b54f20bc31dfd9f95c76c 100644 +index 0224a0e901f9430ef06c30432a7988149a67037d..391579b515c5a07066f82b33c4f9ef8ee1d05530 100644 --- a/src/main/java/net/minecraft/world/item/EnderEyeItem.java +++ b/src/main/java/net/minecraft/world/item/EnderEyeItem.java -@@ -65,11 +65,12 @@ public class EnderEyeItem extends Item { +@@ -67,11 +67,12 @@ public class EnderEyeItem extends Item { // world.b(1038, blockposition1.c(1, 0, 1), 0); int viewDistance = world.getCraftServer().getViewDistance() * 16; BlockPos soundPos = blockposition1.offset(1, 0, 1); @@ -81,12 +81,12 @@ index 6df874ac5091896be5edddd362c11958c0ad815b..37cfb9694dc06f693b7b54f20bc31dfd double deltaLength = Math.sqrt(distanceSquared); double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance; diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 95fc5fc293eb7d77868fa0a37beb792ee0620fcd..edcab2dd4070703101ed9bef86f320093be6c1cb 100644 +index 4abb586f964e342425c7cf0384ab8bf8cdedaea3..008be3aad044d20be14da3a9e96933d265104587 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -1262,4 +1262,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { - - private ExplosionInteraction() {} +@@ -1277,4 +1277,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { + return this.id; + } } + // Paper start - respect global sound events gamerule + public List getPlayersForGlobalSoundGamerule() { diff --git a/patches/unapplied/server/0104-Avoid-blocking-on-Network-Manager-creation.patch b/patches/server/0103-Avoid-blocking-on-Network-Manager-creation.patch similarity index 100% rename from patches/unapplied/server/0104-Avoid-blocking-on-Network-Manager-creation.patch rename to patches/server/0103-Avoid-blocking-on-Network-Manager-creation.patch diff --git a/patches/unapplied/server/0105-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch b/patches/server/0104-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch similarity index 100% rename from patches/unapplied/server/0105-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch rename to patches/server/0104-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch diff --git a/patches/unapplied/server/0106-Add-setting-for-proxy-online-mode-status.patch b/patches/server/0105-Add-setting-for-proxy-online-mode-status.patch similarity index 93% rename from patches/unapplied/server/0106-Add-setting-for-proxy-online-mode-status.patch rename to patches/server/0105-Add-setting-for-proxy-online-mode-status.patch index 5b510603c2..015bfd3442 100644 --- a/patches/unapplied/server/0106-Add-setting-for-proxy-online-mode-status.patch +++ b/patches/server/0105-Add-setting-for-proxy-online-mode-status.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add setting for proxy online mode status TODO: Add isProxyOnlineMode check to Metrics diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 14e5378ee40aeca85ce9cad87eb4574faef83448..2d877bf61cf0a7829278e6af096f5401edfe1981 100644 +index c1f41dcf49c75c3d69485c0e1ec821205438ed1e..c466ec011d059b9960606ef2ee51ea3a3a65f8d0 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -589,7 +589,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -593,7 +593,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface public boolean enforceSecureProfile() { DedicatedServerProperties dedicatedserverproperties = this.getProperties(); @@ -60,10 +60,10 @@ index a0b0614ac7d2009db5c6c10ab4a5f09dd447c635..653856d0b8dcf2baf4cc77a276f17c8c } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3683d2e692a092afba12b12e6e70f6b104aa89f0..3c4a90d1936fe2331564dfb4eda8459499230c0c 100644 +index 502e7f4e168b7f9c6a0f68695f36b8d44cce218e..451f2861d601c551845a0676bddcfb60e0a84cf3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1875,7 +1875,7 @@ public final class CraftServer implements Server { +@@ -1878,7 +1878,7 @@ public final class CraftServer implements Server { if (result == null) { GameProfile profile = null; // Only fetch an online UUID in online mode diff --git a/patches/unapplied/server/0107-Optimise-BlockState-s-hashCode-equals.patch b/patches/server/0106-Optimise-BlockState-s-hashCode-equals.patch similarity index 100% rename from patches/unapplied/server/0107-Optimise-BlockState-s-hashCode-equals.patch rename to patches/server/0106-Optimise-BlockState-s-hashCode-equals.patch diff --git a/patches/unapplied/server/0108-Configurable-packet-in-spam-threshold.patch b/patches/server/0107-Configurable-packet-in-spam-threshold.patch similarity index 91% rename from patches/unapplied/server/0108-Configurable-packet-in-spam-threshold.patch rename to patches/server/0107-Configurable-packet-in-spam-threshold.patch index 8f086734c2..a41c0dcfcd 100644 --- a/patches/unapplied/server/0108-Configurable-packet-in-spam-threshold.patch +++ b/patches/server/0107-Configurable-packet-in-spam-threshold.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable packet in spam threshold diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 555623fa4176c9ac4534cc7c5174d45f7c321ba1..c25c9e2a20243083b7ca928e1d4d5c3a562b7b11 100644 +index fc196fc89502b8006dba0f15380d866882f934ce..c90717ede7331188197d67b72192addb8dd7dc0b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1522,13 +1522,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1534,13 +1534,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl // Spigot start - limit place/interactions private int limitedPackets; private long lastLimitedPacket = -1; diff --git a/patches/unapplied/server/0109-Configurable-flying-kick-messages.patch b/patches/server/0108-Configurable-flying-kick-messages.patch similarity index 86% rename from patches/unapplied/server/0109-Configurable-flying-kick-messages.patch rename to patches/server/0108-Configurable-flying-kick-messages.patch index 5cc2a061cc..59f2733181 100644 --- a/patches/unapplied/server/0109-Configurable-flying-kick-messages.patch +++ b/patches/server/0108-Configurable-flying-kick-messages.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Configurable flying kick messages diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c25c9e2a20243083b7ca928e1d4d5c3a562b7b11..b4b775687ec47c0deeced7fbf1316e0766797d0d 100644 +index c90717ede7331188197d67b72192addb8dd7dc0b..be42d98848e79eca79fed0ee42a1b25b50347226 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -346,7 +346,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger() && !this.player.isDeadOrDying()) { if (++this.aboveGroundTickCount > this.getMaximumFlyingTicks(this.player)) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString()); -- this.disconnect(Component.translatable("multiplayer.disconnect.flying")); +- this.disconnect((Component) Component.translatable("multiplayer.disconnect.flying")); + this.disconnect(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.flyingPlayer); // Paper - use configurable kick message return; } @@ -21,7 +21,7 @@ index c25c9e2a20243083b7ca928e1d4d5c3a562b7b11..b4b775687ec47c0deeced7fbf1316e07 if (this.clientVehicleIsFloating && this.lastVehicle.getControllingPassenger() == this.player) { if (++this.aboveGroundVehicleTickCount > this.getMaximumFlyingTicks(this.lastVehicle)) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString()); -- this.disconnect(Component.translatable("multiplayer.disconnect.flying")); +- this.disconnect((Component) Component.translatable("multiplayer.disconnect.flying")); + this.disconnect(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.flyingVehicle); // Paper - use configurable kick message return; } diff --git a/patches/unapplied/server/0110-Add-EntityZapEvent.patch b/patches/server/0109-Add-EntityZapEvent.patch similarity index 90% rename from patches/unapplied/server/0110-Add-EntityZapEvent.patch rename to patches/server/0109-Add-EntityZapEvent.patch index 3d8af4f823..9ab32961e6 100644 --- a/patches/unapplied/server/0110-Add-EntityZapEvent.patch +++ b/patches/server/0109-Add-EntityZapEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityZapEvent 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 7d1386f2f4d4b5dcf63b6b4e678568b6744a99b5..0da329781f0afd4ec4a731889b892afe7e399d21 100644 +index 63c10be6eacd7108b8b4795d76bf624e0614440a..243eb1e54293c763a06febff551c051398d43535 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -844,10 +844,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -846,10 +846,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @Override public void thunderHit(ServerLevel world, LightningBolt lightning) { if (world.getDifficulty() != Difficulty.PEACEFUL) { @@ -28,10 +28,10 @@ index 7d1386f2f4d4b5dcf63b6b4e678568b6744a99b5..0da329781f0afd4ec4a731889b892afe entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null); entitywitch.setNoAi(this.isNoAi()); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 76be4e52f7e140cf1951ae8be8a468e2bb7df20e..df530fc847b9a302c8981caa32401a8eb3e927b3 100644 +index 09b6cfd22673d338c5d16162bafeac2ae0b3074a..72eb4ddf05e43dd2da6bfdc6987a9218fcf1171a 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1195,6 +1195,14 @@ public class CraftEventFactory { +@@ -1196,6 +1196,14 @@ public class CraftEventFactory { return !event.isCancelled(); } diff --git a/patches/unapplied/server/0111-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch b/patches/server/0110-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch similarity index 86% rename from patches/unapplied/server/0111-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch rename to patches/server/0110-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch index c961e57817..00673bc0e7 100644 --- a/patches/unapplied/server/0111-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch +++ b/patches/server/0110-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Filter bad block entity nbt data from falling blocks 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 37dfd08621d402a339f36bb70f1b39de010e8669..cc00bf81de902cfc587bcf6f18e861fd4339c91e 100644 +index c3a16691e8a843c02e0aea6469822cd8869ad593..01ac7bb0ef8ab13e7c4b5b56b768b7c0a642b300 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -335,7 +335,7 @@ public class FallingBlockEntity extends Entity { +@@ -340,7 +340,7 @@ public class FallingBlockEntity extends Entity { this.dropItem = nbt.getBoolean("DropItem"); } diff --git a/patches/unapplied/server/0112-Cache-user-authenticator-threads.patch b/patches/server/0111-Cache-user-authenticator-threads.patch similarity index 89% rename from patches/unapplied/server/0112-Cache-user-authenticator-threads.patch rename to patches/server/0111-Cache-user-authenticator-threads.patch index af62d4792e..27f8fcc1fd 100644 --- a/patches/unapplied/server/0112-Cache-user-authenticator-threads.patch +++ b/patches/server/0111-Cache-user-authenticator-threads.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cache user authenticator threads diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 7beda9a16addb2dbcd4bdc45e58b343e91323af5..d342d569eb93707bc683c3373ea88ae6b885a476 100644 +index 851e4bdf1739736fd193786a6541ffb341525dcb..6b490eb5b14cb2d3174aff79d1144c87665c7d38 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -69,6 +69,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -71,6 +71,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, // CraftBukkit end private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0); static final Logger LOGGER = LogUtils.getLogger(); @@ -16,7 +16,7 @@ index 7beda9a16addb2dbcd4bdc45e58b343e91323af5..d342d569eb93707bc683c3373ea88ae6 private static final int MAX_TICKS_BEFORE_LOGIN = 600; private final byte[] challenge; final MinecraftServer server; -@@ -167,7 +168,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -169,7 +170,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge, true)); } else { // CraftBukkit start @@ -26,7 +26,7 @@ index 7beda9a16addb2dbcd4bdc45e58b343e91323af5..d342d569eb93707bc683c3373ea88ae6 @Override public void run() { -@@ -182,10 +184,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -184,10 +186,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, ServerLoginPacketListenerImpl.this.server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.requestedUsername, ex); } } @@ -39,7 +39,7 @@ index 7beda9a16addb2dbcd4bdc45e58b343e91323af5..d342d569eb93707bc683c3373ea88ae6 // CraftBukkit end } -@@ -264,7 +264,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -266,7 +266,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, throw new IllegalStateException("Protocol error", cryptographyexception); } @@ -49,7 +49,7 @@ index 7beda9a16addb2dbcd4bdc45e58b343e91323af5..d342d569eb93707bc683c3373ea88ae6 public void run() { String s1 = (String) Objects.requireNonNull(ServerLoginPacketListenerImpl.this.requestedUsername, "Player name not initialized"); -@@ -312,10 +313,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -314,10 +315,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, return ServerLoginPacketListenerImpl.this.server.getPreventProxyConnections() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null; } diff --git a/patches/unapplied/server/0113-Allow-Reloading-of-Command-Aliases.patch b/patches/server/0112-Allow-Reloading-of-Command-Aliases.patch similarity index 90% rename from patches/unapplied/server/0113-Allow-Reloading-of-Command-Aliases.patch rename to patches/server/0112-Allow-Reloading-of-Command-Aliases.patch index 82664b6a0b..96763d0e3f 100644 --- a/patches/unapplied/server/0113-Allow-Reloading-of-Command-Aliases.patch +++ b/patches/server/0112-Allow-Reloading-of-Command-Aliases.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3c4a90d1936fe2331564dfb4eda8459499230c0c..52dc0049d596287a089bd5397cdfd2c99c711f2a 100644 +index 451f2861d601c551845a0676bddcfb60e0a84cf3..a387fa6ce162531497788e0bbcec3c5ffdfa4c68 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2803,5 +2803,24 @@ public final class CraftServer implements Server { +@@ -2811,5 +2811,24 @@ public final class CraftServer implements Server { DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); } diff --git a/patches/unapplied/server/0114-Add-source-to-PlayerExpChangeEvent.patch b/patches/server/0113-Add-source-to-PlayerExpChangeEvent.patch similarity index 84% rename from patches/unapplied/server/0114-Add-source-to-PlayerExpChangeEvent.patch rename to patches/server/0113-Add-source-to-PlayerExpChangeEvent.patch index 8c791741bd..e51c621f01 100644 --- a/patches/unapplied/server/0114-Add-source-to-PlayerExpChangeEvent.patch +++ b/patches/server/0113-Add-source-to-PlayerExpChangeEvent.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index 9f392edc63ebcf48df1fdd5bbc4521c67ded4b24..b919ae8602f54f6ec8c9c743f3e852cd4c00e97f 100644 +index 56402312e44d12c859e2c4b39902d31b7cfd1573..25a45e680f9fdea90f43d59de87a3a500f4ee8c0 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -@@ -261,7 +261,7 @@ public class ExperienceOrb extends Entity { - int i = this.repairPlayerItems(player, this.value); +@@ -264,7 +264,7 @@ public class ExperienceOrb extends Entity { + int i = this.repairPlayerItems(entityplayer, this.value); if (i > 0) { - player.giveExperiencePoints(CraftEventFactory.callPlayerExpChangeEvent(player, i).getAmount()); // CraftBukkit - this.value -> event.getAmount() @@ -18,10 +18,10 @@ index 9f392edc63ebcf48df1fdd5bbc4521c67ded4b24..b919ae8602f54f6ec8c9c743f3e852cd --this.count; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index df530fc847b9a302c8981caa32401a8eb3e927b3..022c1b2e895af65fdf91710d836a4feba1edd0a5 100644 +index 72eb4ddf05e43dd2da6bfdc6987a9218fcf1171a..81fb6a8499f57ed1931bcd562ead20e27bdfa99b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1148,6 +1148,17 @@ public class CraftEventFactory { +@@ -1149,6 +1149,17 @@ public class CraftEventFactory { return event; } diff --git a/patches/unapplied/server/0115-Add-ProjectileCollideEvent.patch b/patches/server/0114-Add-ProjectileCollideEvent.patch similarity index 91% rename from patches/unapplied/server/0115-Add-ProjectileCollideEvent.patch rename to patches/server/0114-Add-ProjectileCollideEvent.patch index ac05d08cbe..1ed4bcc563 100644 --- a/patches/unapplied/server/0115-Add-ProjectileCollideEvent.patch +++ b/patches/server/0114-Add-ProjectileCollideEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add ProjectileCollideEvent Deprecated now and replaced with ProjectileHitEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 022c1b2e895af65fdf91710d836a4feba1edd0a5..a49abc180f76cb7aeb6eda86998acd00e9d3fdee 100644 +index 81fb6a8499f57ed1931bcd562ead20e27bdfa99b..000a95dfd5c83b84fcd973a388a705d9470a4fe0 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1292,6 +1292,17 @@ public class CraftEventFactory { +@@ -1293,6 +1293,17 @@ public class CraftEventFactory { return CraftItemStack.asNMSCopy(bitem); } @@ -27,7 +27,7 @@ index 022c1b2e895af65fdf91710d836a4feba1edd0a5..a49abc180f76cb7aeb6eda86998acd00 public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) { Projectile bukkitEntity = (Projectile) entity.getBukkitEntity(); ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity); -@@ -1316,8 +1327,15 @@ public class CraftEventFactory { +@@ -1317,8 +1328,15 @@ public class CraftEventFactory { if (position.getType() == HitResult.Type.ENTITY) { hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity(); } diff --git a/patches/unapplied/server/0116-Prevent-Pathfinding-out-of-World-Border.patch b/patches/server/0115-Prevent-Pathfinding-out-of-World-Border.patch similarity index 100% rename from patches/unapplied/server/0116-Prevent-Pathfinding-out-of-World-Border.patch rename to patches/server/0115-Prevent-Pathfinding-out-of-World-Border.patch diff --git a/patches/unapplied/server/0117-Optimize-Level.hasChunkAt-BlockPosition-Z.patch b/patches/server/0116-Optimize-Level.hasChunkAt-BlockPosition-Z.patch similarity index 87% rename from patches/unapplied/server/0117-Optimize-Level.hasChunkAt-BlockPosition-Z.patch rename to patches/server/0116-Optimize-Level.hasChunkAt-BlockPosition-Z.patch index e4bdedfa83..ee46f05dc0 100644 --- a/patches/unapplied/server/0117-Optimize-Level.hasChunkAt-BlockPosition-Z.patch +++ b/patches/server/0116-Optimize-Level.hasChunkAt-BlockPosition-Z.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize Level.hasChunkAt(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index edcab2dd4070703101ed9bef86f320093be6c1cb..004dd17181a49df5c2255a9eeca03f5a354920aa 100644 +index 008be3aad044d20be14da3a9e96933d265104587..03b0720c6ebf1a876d56d18a941e0a06ed26dbf0 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -341,6 +341,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -342,6 +342,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return chunk == null ? null : chunk.getFluidState(blockposition); } diff --git a/patches/unapplied/server/0118-Bound-Treasure-Maps-to-World-Border.patch b/patches/server/0117-Bound-Treasure-Maps-to-World-Border.patch similarity index 75% rename from patches/unapplied/server/0118-Bound-Treasure-Maps-to-World-Border.patch rename to patches/server/0117-Bound-Treasure-Maps-to-World-Border.patch index 507479d986..b4596cd20b 100644 --- a/patches/unapplied/server/0118-Bound-Treasure-Maps-to-World-Border.patch +++ b/patches/server/0117-Bound-Treasure-Maps-to-World-Border.patch @@ -11,11 +11,11 @@ that is outside happens to be closer, but unreachable, yet another reachable one is in border that would of been missed. diff --git a/src/main/java/net/minecraft/world/level/border/WorldBorder.java b/src/main/java/net/minecraft/world/level/border/WorldBorder.java -index c34873ec974eeffbc4f66dab4584c696cbe10967..580eb275942570da9e68287ca75da886ba1248c0 100644 +index a3ba3a09378e3bd0517464130ad2c702b0b0165d..3442e33a1146318228c4727a2a5afde685f69bf7 100644 --- a/src/main/java/net/minecraft/world/level/border/WorldBorder.java +++ b/src/main/java/net/minecraft/world/level/border/WorldBorder.java -@@ -37,6 +37,18 @@ public class WorldBorder { - return (double) (pos.getX() + 1) > this.getMinX() && (double) pos.getX() < this.getMaxX() && (double) (pos.getZ() + 1) > this.getMinZ() && (double) pos.getZ() < this.getMaxZ(); +@@ -46,6 +46,18 @@ public class WorldBorder { + return this.isWithinBounds((double) chunkPos.getMinBlockX(), (double) chunkPos.getMinBlockZ()) && this.isWithinBounds((double) chunkPos.getMaxBlockX(), (double) chunkPos.getMaxBlockZ()); } + // Paper start - Bound treasure maps to world border @@ -30,14 +30,14 @@ index c34873ec974eeffbc4f66dab4584c696cbe10967..580eb275942570da9e68287ca75da886 + } + // Paper end - Bound treasure maps to world border + - public boolean isWithinBounds(ChunkPos pos) { - return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ(); + public boolean isWithinBounds(AABB box) { + return this.isWithinBounds(box.minX, box.minZ, box.maxX - 9.999999747378752E-6D, box.maxZ - 9.999999747378752E-6D); } 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 28bc3447ff5ddc066a9a743d5bfa7ca69598cd51..7cdb59cd2f2ffe1195d21519ef97dae0e430285b 100644 +index a53fa9bebdd46939a710e46466ca9a350ecefb27..0a779632c9d11496fcfc147870fba2699d9cc274 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -@@ -223,6 +223,7 @@ public abstract class ChunkGenerator { +@@ -222,6 +222,7 @@ public abstract class ChunkGenerator { while (iterator.hasNext()) { ChunkPos chunkcoordintpair = (ChunkPos) iterator.next();