From 1a33343012120b5c6cc9f364dd78427d8b6027fd Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:21:44 -0700 Subject: [PATCH] some more patches --- ...for-CanPlaceOn-and-CanDestroy-NBT-v.patch} | 32 ++++++++--------- ...nt-Mob-AI-Rules-from-Loading-Chunks.patch} | 0 ...ning-from-loading-generating-chunks.patch} | 0 ...t-furnace-cook-speed-multiplier-API.patch} | 0 .../0259-Honor-EntityAgeable.ageLock.patch} | 2 +- ...le-connection-throttle-kick-message.patch} | 0 ...nt-chunk-loading-from-Fluid-Flowing.patch} | 0 .../0262-Hook-into-CB-plugin-rewrites.patch} | 8 ++--- .../0263-PreSpawnerSpawnEvent.patch} | 4 +-- ...64-Add-LivingEntity-getTargetEntity.patch} | 8 ++--- .../0265-Add-sun-related-API.patch} | 4 +-- ...rseException-in-Entity-and-TE-names.patch} | 2 +- .../0267-Turtle-API.patch} | 8 ++--- ...ator-target-events-and-improve-impl.patch} | 4 +-- ...ther-worlds-for-shooter-of-projectil.patch | 35 +++++++++++++++++++ .../0270-Add-more-Witch-API.patch} | 0 ...wned-for-Villager-Aggression-Config.patch} | 2 +- ...vent-players-from-moving-into-unloa.patch} | 20 +++++------ ...3-Reset-players-airTicks-on-respawn.patch} | 4 +-- ...after-profile-lookups-if-not-needed.patch} | 2 +- ...r-Thread-Pool-and-Thread-Priorities.patch} | 25 ++++++------- .../0276-Optimize-World-Time-Updates.patch} | 4 +-- ...tore-custom-InventoryHolder-support.patch} | 28 +++++++-------- .../0278-Use-Vanilla-Minecart-Speeds.patch} | 4 +-- ...0279-Fix-SpongeAbsortEvent-handling.patch} | 4 +-- ...-allow-digging-into-unloaded-chunks.patch} | 6 ++-- ...ult-permission-message-configurable.patch} | 4 +-- ...revent-rayTrace-from-loading-chunks.patch} | 0 ...-Large-Packets-disconnecting-client.patch} | 0 ...ntity-dismount-during-teleportation.patch} | 18 +++++----- .../0285-Add-more-Zombie-API.patch} | 0 .../0286-Book-Size-Limits.patch} | 4 +-- ...0287-Add-PlayerConnectionCloseEvent.patch} | 4 +-- ...revent-Enderman-from-loading-chunks.patch} | 0 ...replace-OfflinePlayer-getLastPlayed.patch} | 18 +++++----- ...ehicle-tracking-issue-on-disconnect.patch} | 4 +-- ...remove-from-being-called-on-Players.patch} | 4 +-- .../0292-BlockDestroyEvent.patch} | 6 ++-- .../0293-Async-command-map-building.patch} | 10 +++--- ...0294-Implement-Brigadier-Mojang-API.patch} | 24 ++++++------- ...ove-exact-choice-recipe-ingredients.patch} | 22 ++++++------ .../0296-Limit-Client-Sign-length-more.patch} | 8 ++--- ...ggleEvent-when-whitelist-is-toggled.patch} | 2 +- ...e-Oversized-Tile-Entities-in-chunks.patch} | 0 .../0299-Entity-getEntitySpawnReason.patch} | 28 +++++++-------- ...Manager-and-add-advanced-packet-sup.patch} | 0 .../0301-Fire-event-on-GS4-query.patch} | 0 ...02-Implement-PlayerPostRespawnEvent.patch} | 8 ++--- ...for-pickupDelay-breaks-picking-up-i.patch} | 6 ++-- .../0304-Server-Tick-Events.patch} | 12 +++---- ...305-PlayerDeathEvent-getItemsToKeep.patch} | 6 ++-- ...Optimize-Captured-TileEntity-Lookup.patch} | 4 +-- .../0307-Add-Heightmap-API.patch} | 4 +-- .../0308-Mob-Spawner-API-Enhancements.patch} | 12 +++---- ...-to-changed-postToMainThread-method.patch} | 2 +- ...-item-frames-are-modified-MC-123450.patch} | 4 +-- ...0311-Implement-CraftBlockSoundGroup.patch} | 4 +-- ...e-Keep-Spawn-Loaded-range-per-world.patch} | 22 ++++++------ ...13-Allow-Saving-of-Oversized-Chunks.patch} | 0 ...14-Expose-the-internal-current-tick.patch} | 4 +-- ...15-Fix-World-isChunkGenerated-calls.patch} | 6 ++-- ...te-location-if-we-failed-to-read-it.patch} | 0 ...l-Spawned-mobs-towards-natural-spaw.patch} | 0 ...urable-projectile-relative-velocity.patch} | 4 +-- .../0319-offset-item-frame-ticking.patch} | 2 +- ...ther-worlds-for-shooter-of-projectil.patch | 35 ------------------- 66 files changed, 249 insertions(+), 248 deletions(-) rename patches/{unapplied/server/0256-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch => server/0255-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch} (94%) rename patches/{unapplied/server/0257-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch => server/0256-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch} (100%) rename patches/{unapplied/server/0258-Prevent-mob-spawning-from-loading-generating-chunks.patch => server/0257-Prevent-mob-spawning-from-loading-generating-chunks.patch} (100%) rename patches/{unapplied/server/0259-Implement-furnace-cook-speed-multiplier-API.patch => server/0258-Implement-furnace-cook-speed-multiplier-API.patch} (100%) rename patches/{unapplied/server/0260-Honor-EntityAgeable.ageLock.patch => server/0259-Honor-EntityAgeable.ageLock.patch} (94%) rename patches/{unapplied/server/0261-Configurable-connection-throttle-kick-message.patch => server/0260-Configurable-connection-throttle-kick-message.patch} (100%) rename patches/{unapplied/server/0262-Prevent-chunk-loading-from-Fluid-Flowing.patch => server/0261-Prevent-chunk-loading-from-Fluid-Flowing.patch} (100%) rename patches/{unapplied/server/0263-Hook-into-CB-plugin-rewrites.patch => server/0262-Hook-into-CB-plugin-rewrites.patch} (97%) rename patches/{unapplied/server/0264-PreSpawnerSpawnEvent.patch => server/0263-PreSpawnerSpawnEvent.patch} (91%) rename patches/{unapplied/server/0265-Add-LivingEntity-getTargetEntity.patch => server/0264-Add-LivingEntity-getTargetEntity.patch} (94%) rename patches/{unapplied/server/0266-Add-sun-related-API.patch => server/0265-Add-sun-related-API.patch} (90%) rename patches/{unapplied/server/0267-Catch-JsonParseException-in-Entity-and-TE-names.patch => server/0266-Catch-JsonParseException-in-Entity-and-TE-names.patch} (98%) rename patches/{unapplied/server/0268-Turtle-API.patch => server/0267-Turtle-API.patch} (95%) rename patches/{unapplied/server/0269-Call-player-spectator-target-events-and-improve-impl.patch => server/0268-Call-player-spectator-target-events-and-improve-impl.patch} (93%) create mode 100644 patches/server/0269-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename patches/{unapplied/server/0271-Add-more-Witch-API.patch => server/0270-Add-more-Witch-API.patch} (100%) rename patches/{unapplied/server/0272-Check-Drowned-for-Villager-Aggression-Config.patch => server/0271-Check-Drowned-for-Villager-Aggression-Config.patch} (94%) rename patches/{unapplied/server/0273-Add-option-to-prevent-players-from-moving-into-unloa.patch => server/0272-Add-option-to-prevent-players-from-moving-into-unloa.patch} (85%) rename patches/{unapplied/server/0274-Reset-players-airTicks-on-respawn.patch => server/0273-Reset-players-airTicks-on-respawn.patch} (83%) rename patches/{unapplied/server/0275-Don-t-sleep-after-profile-lookups-if-not-needed.patch => server/0274-Don-t-sleep-after-profile-lookups-if-not-needed.patch} (94%) rename patches/{unapplied/server/0276-Improve-Server-Thread-Pool-and-Thread-Priorities.patch => server/0275-Improve-Server-Thread-Pool-and-Thread-Priorities.patch} (81%) rename patches/{unapplied/server/0277-Optimize-World-Time-Updates.patch => server/0276-Optimize-World-Time-Updates.patch} (94%) rename patches/{unapplied/server/0278-Restore-custom-InventoryHolder-support.patch => server/0277-Restore-custom-InventoryHolder-support.patch} (93%) rename patches/{unapplied/server/0279-Use-Vanilla-Minecart-Speeds.patch => server/0278-Use-Vanilla-Minecart-Speeds.patch} (86%) rename patches/{unapplied/server/0280-Fix-SpongeAbsortEvent-handling.patch => server/0279-Fix-SpongeAbsortEvent-handling.patch} (88%) rename patches/{unapplied/server/0281-Don-t-allow-digging-into-unloaded-chunks.patch => server/0280-Don-t-allow-digging-into-unloaded-chunks.patch} (95%) rename patches/{unapplied/server/0282-Make-the-default-permission-message-configurable.patch => server/0281-Make-the-default-permission-message-configurable.patch} (92%) rename patches/{unapplied/server/0283-Prevent-rayTrace-from-loading-chunks.patch => server/0282-Prevent-rayTrace-from-loading-chunks.patch} (100%) rename patches/{unapplied/server/0284-Handle-Large-Packets-disconnecting-client.patch => server/0283-Handle-Large-Packets-disconnecting-client.patch} (100%) rename patches/{unapplied/server/0285-force-entity-dismount-during-teleportation.patch => server/0284-force-entity-dismount-during-teleportation.patch} (85%) rename patches/{unapplied/server/0286-Add-more-Zombie-API.patch => server/0285-Add-more-Zombie-API.patch} (100%) rename patches/{unapplied/server/0287-Book-Size-Limits.patch => server/0286-Book-Size-Limits.patch} (94%) rename patches/{unapplied/server/0288-Add-PlayerConnectionCloseEvent.patch => server/0287-Add-PlayerConnectionCloseEvent.patch} (96%) rename patches/{unapplied/server/0289-Prevent-Enderman-from-loading-chunks.patch => server/0288-Prevent-Enderman-from-loading-chunks.patch} (100%) rename patches/{unapplied/server/0290-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch => server/0289-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch} (90%) rename patches/{unapplied/server/0291-Workaround-for-vehicle-tracking-issue-on-disconnect.patch => server/0290-Workaround-for-vehicle-tracking-issue-on-disconnect.patch} (85%) rename patches/{unapplied/server/0292-Block-Entity-remove-from-being-called-on-Players.patch => server/0291-Block-Entity-remove-from-being-called-on-Players.patch} (90%) rename patches/{unapplied/server/0293-BlockDestroyEvent.patch => server/0292-BlockDestroyEvent.patch} (91%) rename patches/{unapplied/server/0294-Async-command-map-building.patch => server/0293-Async-command-map-building.patch} (90%) rename patches/{unapplied/server/0295-Implement-Brigadier-Mojang-API.patch => server/0294-Implement-Brigadier-Mojang-API.patch} (92%) rename patches/{unapplied/server/0296-Improve-exact-choice-recipe-ingredients.patch => server/0295-Improve-exact-choice-recipe-ingredients.patch} (96%) rename patches/{unapplied/server/0297-Limit-Client-Sign-length-more.patch => server/0296-Limit-Client-Sign-length-more.patch} (89%) rename patches/{unapplied/server/0298-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch => server/0297-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch} (88%) rename patches/{unapplied/server/0299-Handle-Oversized-Tile-Entities-in-chunks.patch => server/0298-Handle-Oversized-Tile-Entities-in-chunks.patch} (100%) rename patches/{unapplied/server/0300-Entity-getEntitySpawnReason.patch => server/0299-Entity-getEntitySpawnReason.patch} (86%) rename patches/{unapplied/server/0301-Optimize-Network-Manager-and-add-advanced-packet-sup.patch => server/0300-Optimize-Network-Manager-and-add-advanced-packet-sup.patch} (100%) rename patches/{unapplied/server/0302-Fire-event-on-GS4-query.patch => server/0301-Fire-event-on-GS4-query.patch} (100%) rename patches/{unapplied/server/0303-Implement-PlayerPostRespawnEvent.patch => server/0302-Implement-PlayerPostRespawnEvent.patch} (86%) rename patches/{unapplied/server/0304-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch => server/0303-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch} (86%) rename patches/{unapplied/server/0305-Server-Tick-Events.patch => server/0304-Server-Tick-Events.patch} (77%) rename patches/{unapplied/server/0306-PlayerDeathEvent-getItemsToKeep.patch => server/0305-PlayerDeathEvent-getItemsToKeep.patch} (92%) rename patches/{unapplied/server/0307-Optimize-Captured-TileEntity-Lookup.patch => server/0306-Optimize-Captured-TileEntity-Lookup.patch} (89%) rename patches/{unapplied/server/0308-Add-Heightmap-API.patch => server/0307-Add-Heightmap-API.patch} (92%) rename patches/{unapplied/server/0309-Mob-Spawner-API-Enhancements.patch => server/0308-Mob-Spawner-API-Enhancements.patch} (92%) rename patches/{unapplied/server/0310-Fix-CB-call-to-changed-postToMainThread-method.patch => server/0309-Fix-CB-call-to-changed-postToMainThread-method.patch} (91%) rename patches/{unapplied/server/0311-Fix-sounds-when-item-frames-are-modified-MC-123450.patch => server/0310-Fix-sounds-when-item-frames-are-modified-MC-123450.patch} (85%) rename patches/{unapplied/server/0312-Implement-CraftBlockSoundGroup.patch => server/0311-Implement-CraftBlockSoundGroup.patch} (94%) rename patches/{unapplied/server/0313-Configurable-Keep-Spawn-Loaded-range-per-world.patch => server/0312-Configurable-Keep-Spawn-Loaded-range-per-world.patch} (92%) rename patches/{unapplied/server/0314-Allow-Saving-of-Oversized-Chunks.patch => server/0313-Allow-Saving-of-Oversized-Chunks.patch} (100%) rename patches/{unapplied/server/0315-Expose-the-internal-current-tick.patch => server/0314-Expose-the-internal-current-tick.patch} (83%) rename patches/{unapplied/server/0316-Fix-World-isChunkGenerated-calls.patch => server/0315-Fix-World-isChunkGenerated-calls.patch} (98%) rename patches/{unapplied/server/0317-Show-blockstate-location-if-we-failed-to-read-it.patch => server/0316-Show-blockstate-location-if-we-failed-to-read-it.patch} (100%) rename patches/{unapplied/server/0318-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch => server/0317-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch} (100%) rename patches/{unapplied/server/0319-Configurable-projectile-relative-velocity.patch => server/0318-Configurable-projectile-relative-velocity.patch} (93%) rename patches/{unapplied/server/0320-offset-item-frame-ticking.patch => server/0319-offset-item-frame-ticking.patch} (90%) delete mode 100644 patches/unapplied/server/0270-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch diff --git a/patches/unapplied/server/0256-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/patches/server/0255-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch similarity index 94% rename from patches/unapplied/server/0256-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch rename to patches/server/0255-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index bfabc2cd1e..74bb8cea6f 100644 --- a/patches/unapplied/server/0256-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/patches/server/0255-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f1298c6fd 100644 +index 4c66a0357c06e0b286e38624c874e33e45933fc9..4e1f436cbe47ba08c731be781fb372b20c497de6 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -84,6 +84,12 @@ import org.bukkit.persistence.PersistentDataContainer; +@@ -85,6 +85,12 @@ import org.bukkit.persistence.PersistentDataContainer; import static org.spigotmc.ValidateUtils.*; // Spigot end @@ -21,7 +21,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f /** * Children must include the following: * -@@ -272,6 +278,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -273,6 +279,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Specific(Specific.To.NBT) static final ItemMetaKey BLOCK_DATA = new ItemMetaKey("BlockStateTag"); static final ItemMetaKey BUKKIT_CUSTOM_TAG = new ItemMetaKey("PublicBukkitValues"); @@ -32,7 +32,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f // We store the raw original JSON representation of all text data. See SPIGOT-5063, SPIGOT-5656, SPIGOT-5304 private String displayName; -@@ -285,6 +295,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -286,6 +296,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private int hideFlag; private boolean unbreakable; private int damage; @@ -43,7 +43,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f private static final Set HANDLED_TAGS = Sets.newHashSet(); private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); -@@ -322,6 +336,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -323,6 +337,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.hideFlag = meta.hideFlag; this.unbreakable = meta.unbreakable; this.damage = meta.damage; @@ -59,7 +59,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f this.unhandledTags.putAll(meta.unhandledTags); this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw()); -@@ -385,6 +408,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -386,6 +409,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.persistentDataContainer.put(key, compound.get(key).copy()); } } @@ -91,7 +91,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f Set keys = tag.getAllKeys(); for (String key : keys) { -@@ -523,6 +571,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -524,6 +572,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.setDamage(damage); } @@ -126,7 +126,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f String internal = SerializableMeta.getString(map, "internal", true); if (internal != null) { ByteArrayInputStream buf = new ByteArrayInputStream(Base64.getDecoder().decode(internal)); -@@ -651,6 +727,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -652,6 +728,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (this.hasDamage()) { itemTag.putInt(CraftMetaItem.DAMAGE.NBT, this.damage); } @@ -150,7 +150,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f for (Map.Entry e : this.unhandledTags.entrySet()) { itemTag.put(e.getKey(), e.getValue()); -@@ -667,6 +760,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -668,6 +761,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -172,7 +172,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f ListTag createStringList(List list) { if (list == null) { return null; -@@ -750,7 +858,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -751,7 +859,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Overridden boolean isEmpty() { @@ -181,7 +181,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f } // Paper start -@@ -1182,7 +1290,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1183,7 +1291,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hideFlag == that.hideFlag) && (this.isUnbreakable() == that.isUnbreakable()) && (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage()) @@ -194,7 +194,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f } /** -@@ -1217,6 +1329,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1218,6 +1330,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { hash = 61 * hash + (this.hasDamage() ? this.damage : 0); hash = 61 * hash + (this.hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0); hash = 61 * hash + this.version; @@ -205,7 +205,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f return hash; } -@@ -1241,6 +1357,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1242,6 +1358,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.unbreakable = this.unbreakable; clone.damage = this.damage; clone.version = this.version; @@ -220,7 +220,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f return clone; } catch (CloneNotSupportedException e) { throw new Error(e); -@@ -1298,6 +1422,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1299,6 +1423,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { builder.put(CraftMetaItem.DAMAGE.BUKKIT, this.damage); } @@ -244,7 +244,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f final Map internalTags = new HashMap(this.unhandledTags); this.serializeInternal(internalTags); if (!internalTags.isEmpty()) { -@@ -1470,6 +1611,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1471,6 +1612,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaArmorStand.SHOW_ARMS.NBT, CraftMetaArmorStand.SMALL.NBT, CraftMetaArmorStand.MARKER.NBT, @@ -253,7 +253,7 @@ index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f // Paper end CraftMetaCompass.LODESTONE_DIMENSION.NBT, CraftMetaCompass.LODESTONE_POS.NBT, -@@ -1499,4 +1642,146 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1500,4 +1643,146 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } // Paper end diff --git a/patches/unapplied/server/0257-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/patches/server/0256-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch similarity index 100% rename from patches/unapplied/server/0257-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch rename to patches/server/0256-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch diff --git a/patches/unapplied/server/0258-Prevent-mob-spawning-from-loading-generating-chunks.patch b/patches/server/0257-Prevent-mob-spawning-from-loading-generating-chunks.patch similarity index 100% rename from patches/unapplied/server/0258-Prevent-mob-spawning-from-loading-generating-chunks.patch rename to patches/server/0257-Prevent-mob-spawning-from-loading-generating-chunks.patch diff --git a/patches/unapplied/server/0259-Implement-furnace-cook-speed-multiplier-API.patch b/patches/server/0258-Implement-furnace-cook-speed-multiplier-API.patch similarity index 100% rename from patches/unapplied/server/0259-Implement-furnace-cook-speed-multiplier-API.patch rename to patches/server/0258-Implement-furnace-cook-speed-multiplier-API.patch diff --git a/patches/unapplied/server/0260-Honor-EntityAgeable.ageLock.patch b/patches/server/0259-Honor-EntityAgeable.ageLock.patch similarity index 94% rename from patches/unapplied/server/0260-Honor-EntityAgeable.ageLock.patch rename to patches/server/0259-Honor-EntityAgeable.ageLock.patch index eb028448f8..c1404b2aa7 100644 --- a/patches/unapplied/server/0260-Honor-EntityAgeable.ageLock.patch +++ b/patches/server/0259-Honor-EntityAgeable.ageLock.patch @@ -17,7 +17,7 @@ index be5e603d505566feac61cc7e591d35ce483a92df..2061d7ae62c1335c87aa67fd0cc004c4 int k = j; diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -index c5944875bd94d9186729e95d0b731d9e68e7b99f..5c89d824ef43792c34c9f2df5851ba8af503cbd9 100644 +index 2700f7dc650dc19da75e9351f6d558d05be80dc5..5f2042d565974a5509aec8f744e091fe7c576c98 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java @@ -299,6 +299,7 @@ public class BeehiveBlockEntity extends BlockEntity { diff --git a/patches/unapplied/server/0261-Configurable-connection-throttle-kick-message.patch b/patches/server/0260-Configurable-connection-throttle-kick-message.patch similarity index 100% rename from patches/unapplied/server/0261-Configurable-connection-throttle-kick-message.patch rename to patches/server/0260-Configurable-connection-throttle-kick-message.patch diff --git a/patches/unapplied/server/0262-Prevent-chunk-loading-from-Fluid-Flowing.patch b/patches/server/0261-Prevent-chunk-loading-from-Fluid-Flowing.patch similarity index 100% rename from patches/unapplied/server/0262-Prevent-chunk-loading-from-Fluid-Flowing.patch rename to patches/server/0261-Prevent-chunk-loading-from-Fluid-Flowing.patch diff --git a/patches/unapplied/server/0263-Hook-into-CB-plugin-rewrites.patch b/patches/server/0262-Hook-into-CB-plugin-rewrites.patch similarity index 97% rename from patches/unapplied/server/0263-Hook-into-CB-plugin-rewrites.patch rename to patches/server/0262-Hook-into-CB-plugin-rewrites.patch index 6db828239e..4dec2033b4 100644 --- a/patches/unapplied/server/0263-Hook-into-CB-plugin-rewrites.patch +++ b/patches/server/0262-Hook-into-CB-plugin-rewrites.patch @@ -8,7 +8,7 @@ our own relocation. Also lets us rewrite NMS calls for when we're debugging in an IDE pre-relocate. diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -index 4b209818a20e76e9d857c4bb822f6b24ec8e9f09..12972cf5876da72cc5d097aeedb13c9addd98add 100644 +index afa93af41bf9b45dd7e49378b7fea088087993d5..128c9d81814ba1fb24895962e5f08495dbedb176 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java @@ -7,8 +7,10 @@ import java.io.InputStream; @@ -153,7 +153,7 @@ index 4b209818a20e76e9d857c4bb822f6b24ec8e9f09..12972cf5876da72cc5d097aeedb13c9a if ( owner.equals( "org/bukkit/block/Biome" ) ) { switch ( name ) -@@ -339,6 +437,11 @@ public class Commodore +@@ -342,6 +440,11 @@ public class Commodore } // Paper start - Rewrite plugins @@ -165,7 +165,7 @@ index 4b209818a20e76e9d857c4bb822f6b24ec8e9f09..12972cf5876da72cc5d097aeedb13c9a if ((owner.equals("org/bukkit/OfflinePlayer") || owner.equals("org/bukkit/entity/Player")) && name.equals("getPlayerProfile") && desc.equals("()Lorg/bukkit/profile/PlayerProfile;")) { super.visitMethodInsn(opcode, owner, name, "()Lcom/destroystokyo/paper/profile/PlayerProfile;", itf); return; -@@ -433,6 +536,13 @@ public class Commodore +@@ -436,6 +539,13 @@ public class Commodore @Override public void visitLdcInsn(Object value) { @@ -179,7 +179,7 @@ index 4b209818a20e76e9d857c4bb822f6b24ec8e9f09..12972cf5876da72cc5d097aeedb13c9a if ( value instanceof String && ( (String) value ).equals( "com.mysql.jdbc.Driver" ) ) { super.visitLdcInsn( "com.mysql.cj.jdbc.Driver" ); -@@ -445,6 +555,13 @@ public class Commodore +@@ -448,6 +558,13 @@ public class Commodore @Override public void visitInvokeDynamicInsn( String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments ) { diff --git a/patches/unapplied/server/0264-PreSpawnerSpawnEvent.patch b/patches/server/0263-PreSpawnerSpawnEvent.patch similarity index 91% rename from patches/unapplied/server/0264-PreSpawnerSpawnEvent.patch rename to patches/server/0263-PreSpawnerSpawnEvent.patch index f9634b126c..766060fe2a 100644 --- a/patches/unapplied/server/0264-PreSpawnerSpawnEvent.patch +++ b/patches/server/0263-PreSpawnerSpawnEvent.patch @@ -9,10 +9,10 @@ SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for spawners. diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index fc7719d12b5f6011aec2e41a36b4bacd77672b6d..a9be524edb03c51300bc45d424fcf87c7491a8c0 100644 +index 04cce4380e6e833b1d5e0a613eb0a167fdfe4e16..713608239cc7518d05b04d3dd79c3af0c358c64e 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -134,11 +134,11 @@ public abstract class BaseSpawner { +@@ -136,11 +136,11 @@ public abstract class BaseSpawner { org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key); if (type != null) { diff --git a/patches/unapplied/server/0265-Add-LivingEntity-getTargetEntity.patch b/patches/server/0264-Add-LivingEntity-getTargetEntity.patch similarity index 94% rename from patches/unapplied/server/0265-Add-LivingEntity-getTargetEntity.patch rename to patches/server/0264-Add-LivingEntity-getTargetEntity.patch index e004157b6d..4ca52cc4d0 100644 --- a/patches/unapplied/server/0265-Add-LivingEntity-getTargetEntity.patch +++ b/patches/server/0264-Add-LivingEntity-getTargetEntity.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 3c7dd373c557f3ceef0173e415d3d6c310fa9e95..5a638da349424a9d3bc5df87d81ba268b8052568 100644 +index d1b9726228cc0a7bdb1c570603b5d1b8a4d6debe..40b8b863c4662d8a6aa228763be167317232b99f 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable; @@ -16,7 +16,7 @@ index 3c7dd373c557f3ceef0173e415d3d6c310fa9e95..5a638da349424a9d3bc5df87d81ba268 import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; import net.minecraft.world.scores.PlayerTeam; -@@ -3889,6 +3890,38 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3891,6 +3892,38 @@ public abstract class LivingEntity extends Entity implements Attackable { return this.level().clip(raytrace); } @@ -56,7 +56,7 @@ index 3c7dd373c557f3ceef0173e415d3d6c310fa9e95..5a638da349424a9d3bc5df87d81ba268 public int getShieldBlockingDelay() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 540422f3148a92a25de8398c8616de307c85d0ae..9e15c5e2adfb46ffa3548b3a2eda225de4c44fb5 100644 +index 4c9b38fade398be72c5fc2799914df98d9170eaf..e8cc06162f97eef14c47f2e19a979c6b92aa3252 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -1,5 +1,6 @@ @@ -66,7 +66,7 @@ index 540422f3148a92a25de8398c8616de307c85d0ae..9e15c5e2adfb46ffa3548b3a2eda225d import com.google.common.base.Preconditions; import com.google.common.collect.Sets; import java.util.ArrayList; -@@ -226,6 +227,39 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -227,6 +228,39 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } return null; } diff --git a/patches/unapplied/server/0266-Add-sun-related-API.patch b/patches/server/0265-Add-sun-related-API.patch similarity index 90% rename from patches/unapplied/server/0266-Add-sun-related-API.patch rename to patches/server/0265-Add-sun-related-API.patch index 1afb4b7b61..637ba02804 100644 --- a/patches/unapplied/server/0266-Add-sun-related-API.patch +++ b/patches/server/0265-Add-sun-related-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Add sun related API public net.minecraft.world.entity.Mob isSunBurnTick()Z diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e8229f2004b3a729417e99897b641e5bde0fa781..c92b931e2a54122e7a7aeafc5f88faee59c5e0fb 100644 +index e886f72df8b5b334299236c26115bbc5f72ce9f1..c14f73d745ec34f0970b2e5aac9d68fc069fc1d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -695,6 +695,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -696,6 +696,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } diff --git a/patches/unapplied/server/0267-Catch-JsonParseException-in-Entity-and-TE-names.patch b/patches/server/0266-Catch-JsonParseException-in-Entity-and-TE-names.patch similarity index 98% rename from patches/unapplied/server/0267-Catch-JsonParseException-in-Entity-and-TE-names.patch rename to patches/server/0266-Catch-JsonParseException-in-Entity-and-TE-names.patch index fb1f62292e..a1a06c3116 100644 --- a/patches/unapplied/server/0267-Catch-JsonParseException-in-Entity-and-TE-names.patch +++ b/patches/server/0266-Catch-JsonParseException-in-Entity-and-TE-names.patch @@ -37,7 +37,7 @@ index e969a0acf06d9265fa75fc07bb637752df468c11..8240bb085b619f257f8c0a25775e0b15 + } } diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java -index 7f1efe0d9bc059a86166e8e3c5ef4ad23217f6a7..9c7b7434ccd64668eb5d7bb61d03a9cb4105ea6e 100644 +index 129f0e6108366dbba1bafb04e01e5e5e6489f577..ac0aeb53176069d0835b6b08c8d871edae846763 100644 --- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java +++ b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java @@ -72,7 +72,7 @@ public abstract class BaseCommandBlock implements CommandSource { diff --git a/patches/unapplied/server/0268-Turtle-API.patch b/patches/server/0267-Turtle-API.patch similarity index 95% rename from patches/unapplied/server/0268-Turtle-API.patch rename to patches/server/0267-Turtle-API.patch index 89bc808f04..fee89795f4 100644 --- a/patches/unapplied/server/0268-Turtle-API.patch +++ b/patches/server/0267-Turtle-API.patch @@ -12,7 +12,7 @@ public net.minecraft.world.entity.animal.Turtle isTravelling()Z public net.minecraft.world.entity.animal.Turtle setTravelling(Z)V diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java -index 60e291abb3ebdf8676c13a2138d8eb436d033fa2..d27e5f9dac4703b839ab8444f6b54bf54d58af86 100644 +index 9fc374c17f6b3ee4ab3c582d05e96321b772f2d6..7153e00a640abfeb134ff1dcb93f363b972a4233 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java @@ -14,7 +14,7 @@ public abstract class MoveToBlockGoal extends Goal { @@ -25,10 +25,10 @@ index 60e291abb3ebdf8676c13a2138d8eb436d033fa2..d27e5f9dac4703b839ab8444f6b54bf5 private final int searchRange; private final int verticalSearchRange; diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -index ed1f6e77d5fc9b6f5f52b1a10275783b514c162c..652a8150f7343050b6da6c01f4e73a755138d491 100644 +index 0dab0da65788720e56a568918de458ab7195ef5c..722e323d2ae3f4ac8aa3197fed79f7d926d5ccfa 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -@@ -496,14 +496,18 @@ public class Turtle extends Animal { +@@ -491,14 +491,18 @@ public class Turtle extends Animal { if (!this.turtle.isInWater() && this.isReachedTarget()) { if (this.turtle.layEggCounter < 1) { @@ -50,7 +50,7 @@ index ed1f6e77d5fc9b6f5f52b1a10275783b514c162c..652a8150f7343050b6da6c01f4e73a75 world.setBlock(blockposition1, iblockdata, 3); world.gameEvent(GameEvent.BLOCK_PLACE, blockposition1, GameEvent.Context.of(this.turtle, iblockdata)); -@@ -573,7 +577,7 @@ public class Turtle extends Animal { +@@ -568,7 +572,7 @@ public class Turtle extends Animal { @Override public boolean canUse() { diff --git a/patches/unapplied/server/0269-Call-player-spectator-target-events-and-improve-impl.patch b/patches/server/0268-Call-player-spectator-target-events-and-improve-impl.patch similarity index 93% rename from patches/unapplied/server/0269-Call-player-spectator-target-events-and-improve-impl.patch rename to patches/server/0268-Call-player-spectator-target-events-and-improve-impl.patch index 5e38e1c9f4..c5c24c8af7 100644 --- a/patches/unapplied/server/0269-Call-player-spectator-target-events-and-improve-impl.patch +++ b/patches/server/0268-Call-player-spectator-target-events-and-improve-impl.patch @@ -19,10 +19,10 @@ spectate the target entity. Co-authored-by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index de062ef7553a7edff3d0fa6f50a9987bb62b9e09..ac4bb5d84689a6e4f8f9b425cee5188436d0efce 100644 +index 7dae09967ae47ae2ef01d1072ad98f125d0b67e9..859358b6bdffb836acbb653fefbafa592b5704e6 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1983,6 +1983,21 @@ public class ServerPlayer extends Player { +@@ -2084,6 +2084,21 @@ public class ServerPlayer extends Player { this.camera = (Entity) (entity == null ? this : entity); if (entity1 != this.camera) { diff --git a/patches/server/0269-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/patches/server/0269-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch new file mode 100644 index 0000000000..f6e0c2c41d --- /dev/null +++ b/patches/server/0269-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Wed, 17 Oct 2018 19:17:27 -0400 +Subject: [PATCH] MC-50319: Check other worlds for shooter of projectiles + +Say a player shoots an arrow through a nether portal, the game +would lose the shooter for determining things such as Player Kills, +because the entity is in another world. + +If the projectile fails to find the shooter in the current world, check +other worlds. + +diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +index 01a2c6c3ee4e1500b6ee9986943f84dbe8663860..fec4897ffc07f71efb8725efea341ba2878a1462 100644 +--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java ++++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +@@ -67,6 +67,18 @@ public abstract class Projectile extends Entity implements TraceableEntity { + ServerLevel worldserver = (ServerLevel) world; + + this.cachedOwner = worldserver.getEntity(this.ownerUUID); ++ // Paper start - check all worlds ++ if (this.cachedOwner == null) { ++ for (final ServerLevel level : this.level().getServer().getAllLevels()) { ++ if (level == this.level()) continue; ++ final Entity entity = level.getEntity(this.ownerUUID); ++ if (entity != null) { ++ this.cachedOwner = entity; ++ break; ++ } ++ } ++ } ++ // Paper end + return this.cachedOwner; + } + } diff --git a/patches/unapplied/server/0271-Add-more-Witch-API.patch b/patches/server/0270-Add-more-Witch-API.patch similarity index 100% rename from patches/unapplied/server/0271-Add-more-Witch-API.patch rename to patches/server/0270-Add-more-Witch-API.patch diff --git a/patches/unapplied/server/0272-Check-Drowned-for-Villager-Aggression-Config.patch b/patches/server/0271-Check-Drowned-for-Villager-Aggression-Config.patch similarity index 94% rename from patches/unapplied/server/0272-Check-Drowned-for-Villager-Aggression-Config.patch rename to patches/server/0271-Check-Drowned-for-Villager-Aggression-Config.patch index 20eaf96a86..99463ffb07 100644 --- a/patches/unapplied/server/0272-Check-Drowned-for-Villager-Aggression-Config.patch +++ b/patches/server/0271-Check-Drowned-for-Villager-Aggression-Config.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Check Drowned for Villager Aggression Config diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java -index 3e4fde2736feb03af2116cd218358845cd8f99d8..991d728db2a3b64316fc2102cf3aee470327a62e 100644 +index ee2abc0c39a76a74c151ecc8660d2037f3db0636..485d14d71fb26e6e0d00a43da040bf63d696b66a 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java +++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java @@ -78,7 +78,7 @@ public class Drowned extends Zombie implements RangedAttackMob { diff --git a/patches/unapplied/server/0273-Add-option-to-prevent-players-from-moving-into-unloa.patch b/patches/server/0272-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 85% rename from patches/unapplied/server/0273-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to patches/server/0272-Add-option-to-prevent-players-from-moving-into-unloa.patch index f6fea97b7e..a74feb472f 100644 --- a/patches/unapplied/server/0273-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/patches/server/0272-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3e6430d5769afbe308703e61f7fb7474811fdf38..6b2a3d3af54af0699a2331cfa6b165d079e38caf 100644 +index 01ae910d5997981ddbe400a057bb83932e89cbc0..214fbc10dae71634fd377c61b774012771a5d9f8 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -466,9 +466,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -469,9 +469,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl double d0 = entity.getX(); double d1 = entity.getY(); double d2 = entity.getZ(); @@ -22,7 +22,7 @@ index 3e6430d5769afbe308703e61f7fb7474811fdf38..6b2a3d3af54af0699a2331cfa6b165d0 float f = Mth.wrapDegrees(packet.getYRot()); float f1 = Mth.wrapDegrees(packet.getXRot()); double d6 = d3 - this.vehicleFirstGoodX; -@@ -503,6 +503,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -506,6 +506,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } speed *= 2f; // TODO: Get the speed of the vehicle instead of the player @@ -39,7 +39,7 @@ index 3e6430d5769afbe308703e61f7fb7474811fdf38..6b2a3d3af54af0699a2331cfa6b165d0 if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { // CraftBukkit end ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8}); -@@ -1157,9 +1167,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1182,9 +1192,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.allowedPlayerTicks = 20; // CraftBukkit } else { this.awaitingTeleportTime = this.tickCount; @@ -52,10 +52,10 @@ index 3e6430d5769afbe308703e61f7fb7474811fdf38..6b2a3d3af54af0699a2331cfa6b165d0 float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot())); float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot())); -@@ -1214,6 +1224,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - } else { - speed = this.player.getAbilities().walkingSpeed * 10f; - } +@@ -1240,6 +1250,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl + } else { + speed = this.player.getAbilities().walkingSpeed * 10f; + } + // Paper start - Prevent moving into unloaded chunks + if (this.player.level().paperConfig().chunks.preventMovingIntoUnloadedChunks && (this.player.getX() != toX || this.player.getZ() != toZ) && !worldserver.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position())))) { + this.internalTeleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot(), Collections.emptySet()); @@ -63,5 +63,5 @@ index 3e6430d5769afbe308703e61f7fb7474811fdf38..6b2a3d3af54af0699a2331cfa6b165d0 + } + // Paper end - if (!this.player.isChangingDimension() && (!this.player.level().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) { - float f2 = this.player.isFallFlying() ? 300.0F : 100.0F; + if (!this.player.isChangingDimension() && (!this.player.level().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) { + float f2 = this.player.isFallFlying() ? 300.0F : 100.0F; diff --git a/patches/unapplied/server/0274-Reset-players-airTicks-on-respawn.patch b/patches/server/0273-Reset-players-airTicks-on-respawn.patch similarity index 83% rename from patches/unapplied/server/0274-Reset-players-airTicks-on-respawn.patch rename to patches/server/0273-Reset-players-airTicks-on-respawn.patch index 34f4de0100..e59d27a986 100644 --- a/patches/unapplied/server/0274-Reset-players-airTicks-on-respawn.patch +++ b/patches/server/0273-Reset-players-airTicks-on-respawn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index ac4bb5d84689a6e4f8f9b425cee5188436d0efce..42898f986d317d44d88c39b56e4655366d5a5a1b 100644 +index 859358b6bdffb836acbb653fefbafa592b5704e6..6e025c8fdb14e6dcb178055d51efd11112247808 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2458,6 +2458,7 @@ public class ServerPlayer extends Player { +@@ -2559,6 +2559,7 @@ public class ServerPlayer extends Player { this.setHealth(this.getMaxHealth()); this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset diff --git a/patches/unapplied/server/0275-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/patches/server/0274-Don-t-sleep-after-profile-lookups-if-not-needed.patch similarity index 94% rename from patches/unapplied/server/0275-Don-t-sleep-after-profile-lookups-if-not-needed.patch rename to patches/server/0274-Don-t-sleep-after-profile-lookups-if-not-needed.patch index 48b4bba2b0..e419d107b0 100644 --- a/patches/unapplied/server/0275-Don-t-sleep-after-profile-lookups-if-not-needed.patch +++ b/patches/server/0274-Don-t-sleep-after-profile-lookups-if-not-needed.patch @@ -7,7 +7,7 @@ Mojang was sleeping even if we had no more requests to go after the current one finished, resulting in 100ms lost per profile lookup diff --git a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java -index da26c2e6c5ff88b50606e94cfbff5725da37ac7f..f3e8552e651faf6f50ca1cb66415c8d4484a7f27 100644 +index b87546f0061458b2b919a1fe00dde1f4eea6cb3e..498623aa5da5fb861615c602019784d66a84e3a0 100644 --- a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java +++ b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java @@ -44,6 +44,7 @@ public class YggdrasilGameProfileRepository implements GameProfileRepository { diff --git a/patches/unapplied/server/0276-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/patches/server/0275-Improve-Server-Thread-Pool-and-Thread-Priorities.patch similarity index 81% rename from patches/unapplied/server/0276-Improve-Server-Thread-Pool-and-Thread-Priorities.patch rename to patches/server/0275-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index 3a987f71db..808442406d 100644 --- a/patches/unapplied/server/0276-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/patches/server/0275-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -35,19 +35,19 @@ index 0000000000000000000000000000000000000000..b60f59cf5cc8eb84a6055b7861857dec + } +} diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java -index 30237ca94a36197ce21369bdcc7bb1dfafe02680..5e9401f0c2de0743aca9237ee8c4dfba586cfdb9 100644 +index aa52b271bd556a29f774fde375b713d0d187521b..8188febd6f1039a31619b42af23df18afd2e985c 100644 --- a/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java -@@ -81,7 +81,7 @@ public class Util { +@@ -86,7 +86,7 @@ public class Util { private static final int DEFAULT_MAX_THREADS = 255; + private static final int DEFAULT_SAFE_FILE_OPERATION_RETRIES = 10; private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads"; - private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1); - private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main"); + private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main", -1); // Paper - add -1 priority + private static final ExecutorService IO_POOL = makeIoExecutor("IO-Worker-", false); + private static final ExecutorService DOWNLOAD_POOL = makeIoExecutor("Download-", true); // Paper start - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread - public static final ExecutorService PROFILE_EXECUTOR = Executors.newFixedThreadPool(2, new java.util.concurrent.ThreadFactory() { - -@@ -145,14 +145,18 @@ public class Util { +@@ -152,15 +152,18 @@ public class Util { return FILENAME_DATE_TIME_FORMATTER.format(ZonedDateTime.now()); } @@ -62,15 +62,16 @@ index 30237ca94a36197ce21369bdcc7bb1dfafe02680..5e9401f0c2de0743aca9237ee8c4dfba if (i <= 0) { executorService = MoreExecutors.newDirectExecutorService(); } else { -- executorService = new ForkJoinPool(i, (forkJoinPool) -> { -- ForkJoinWorkerThread forkJoinWorkerThread = new ForkJoinWorkerThread(forkJoinPool) { -+ executorService = new java.util.concurrent.ThreadPoolExecutor(i, i,0L, TimeUnit.MILLISECONDS, new java.util.concurrent.LinkedBlockingQueue(), target -> new io.papermc.paper.util.ServerWorkerThread(target, s, priorityModifier)); +- AtomicInteger atomicInteger = new AtomicInteger(1); +- executorService = new ForkJoinPool(i, (pool) -> { +- ForkJoinWorkerThread forkJoinWorkerThread = new ForkJoinWorkerThread(pool) { ++ executorService = new java.util.concurrent.ThreadPoolExecutor(i, i,0L, TimeUnit.MILLISECONDS, new java.util.concurrent.LinkedBlockingQueue<>(), target -> new io.papermc.paper.util.ServerWorkerThread(target, s, priorityModifier)); + } + /* @Override protected void onTermination(Throwable throwable) { if (throwable != null) { -@@ -168,6 +172,7 @@ public class Util { +@@ -176,6 +179,7 @@ public class Util { return forkJoinWorkerThread; }, Util::onThreadException, true); } @@ -79,10 +80,10 @@ index 30237ca94a36197ce21369bdcc7bb1dfafe02680..5e9401f0c2de0743aca9237ee8c4dfba return executorService; } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 88c1c7d0dd8efddcde6d8d81cb89b09c2f6fee2a..9326b35d57d9157f968aac9428dce6462d86da0f 100644 +index a2daac80fcbe51b7b68ab01416f052d01267f3fe..0090f920f0e0460c5880f0661d29fdc95530abf2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -306,6 +306,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { MinecraftServer.LOGGER.error("Uncaught exception in server thread", throwable); }); diff --git a/patches/unapplied/server/0277-Optimize-World-Time-Updates.patch b/patches/server/0276-Optimize-World-Time-Updates.patch similarity index 94% rename from patches/unapplied/server/0277-Optimize-World-Time-Updates.patch rename to patches/server/0276-Optimize-World-Time-Updates.patch index 5511612b32..ecbd2a3648 100644 --- a/patches/unapplied/server/0277-Optimize-World-Time-Updates.patch +++ b/patches/server/0276-Optimize-World-Time-Updates.patch @@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet object for every player unless they have per-player time enabled. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9326b35d57d9157f968aac9428dce6462d86da0f..85ca00396d1f9f845f8f833d0896266b55a1b84d 100644 +index 0090f920f0e0460c5880f0661d29fdc95530abf2..ec0d9a7221d61a38aabfbb270a122f1c3ceeed23 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1373,12 +1373,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop items; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java -index 7a7f3f53aef601f124d474d9890e23d87dd96900..54e61b9b058bee2167461aaaf828ed7a00949c29 100644 +index 7db801cc18945ce203d7ea30dc517dd65183f6d6..e97166d3008cae7897519eaaf56b39c927661098 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java -@@ -28,7 +28,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat +@@ -29,7 +29,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat @Override public Inventory createInventory(InventoryHolder holder, InventoryType type) { @@ -265,7 +265,7 @@ index 7a7f3f53aef601f124d474d9890e23d87dd96900..54e61b9b058bee2167461aaaf828ed7a } // Paper start -@@ -39,7 +39,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat +@@ -40,7 +40,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat ((RandomizableContainerBlockEntity) te).setCustomName(io.papermc.paper.adventure.PaperAdventure.asVanilla(title)); } @@ -274,7 +274,7 @@ index 7a7f3f53aef601f124d474d9890e23d87dd96900..54e61b9b058bee2167461aaaf828ed7a } // Paper end -@@ -50,10 +50,18 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat +@@ -51,10 +51,18 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat ((RandomizableContainerBlockEntity) te).setCustomName(CraftChatMessage.fromStringOrNull(title)); } @@ -294,7 +294,7 @@ index 7a7f3f53aef601f124d474d9890e23d87dd96900..54e61b9b058bee2167461aaaf828ed7a return new CraftInventory(tileEntity); } -@@ -70,7 +78,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat +@@ -71,7 +79,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { Container tileEntity = getTileEntity(); ((AbstractFurnaceBlockEntity) tileEntity).setCustomName(io.papermc.paper.adventure.PaperAdventure.asVanilla(title)); @@ -303,7 +303,7 @@ index 7a7f3f53aef601f124d474d9890e23d87dd96900..54e61b9b058bee2167461aaaf828ed7a } // Paper end -@@ -78,11 +86,19 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat +@@ -79,11 +87,19 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) { Container tileEntity = this.getTileEntity(); ((AbstractFurnaceBlockEntity) tileEntity).setCustomName(CraftChatMessage.fromStringOrNull(title)); @@ -324,7 +324,7 @@ index 7a7f3f53aef601f124d474d9890e23d87dd96900..54e61b9b058bee2167461aaaf828ed7a return new CraftInventoryFurnace((AbstractFurnaceBlockEntity) tileEntity); } } -@@ -102,7 +118,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat +@@ -103,7 +119,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat if (tileEntity instanceof BrewingStandBlockEntity) { ((BrewingStandBlockEntity) tileEntity).setCustomName(io.papermc.paper.adventure.PaperAdventure.asVanilla(title)); } @@ -333,7 +333,7 @@ index 7a7f3f53aef601f124d474d9890e23d87dd96900..54e61b9b058bee2167461aaaf828ed7a } // Paper end -@@ -113,11 +129,19 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat +@@ -114,11 +130,19 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat if (tileEntity instanceof BrewingStandBlockEntity) { ((BrewingStandBlockEntity) tileEntity).setCustomName(CraftChatMessage.fromStringOrNull(title)); } diff --git a/patches/unapplied/server/0279-Use-Vanilla-Minecart-Speeds.patch b/patches/server/0278-Use-Vanilla-Minecart-Speeds.patch similarity index 86% rename from patches/unapplied/server/0279-Use-Vanilla-Minecart-Speeds.patch rename to patches/server/0278-Use-Vanilla-Minecart-Speeds.patch index 85566a9815..2d3cb9fe91 100644 --- a/patches/unapplied/server/0279-Use-Vanilla-Minecart-Speeds.patch +++ b/patches/server/0278-Use-Vanilla-Minecart-Speeds.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use Vanilla Minecart Speeds CraftBukkit changed the values on flying speed, restore back to vanilla diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -index ceedb9e76bab57a7d04a05cc6fd2ee4005cbf203..8bea12248bf3ae95c629578386292732d0b74630 100644 +index e390735d411d815dcc4591da58db7017452acf31..b09c4e2a36f653ff6aa0e2c0bc927a8fd7e41ae0 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -@@ -108,9 +108,9 @@ public abstract class AbstractMinecart extends Entity { +@@ -101,9 +101,9 @@ public abstract class AbstractMinecart extends VehicleEntity { private double derailedX = 0.5; private double derailedY = 0.5; private double derailedZ = 0.5; diff --git a/patches/unapplied/server/0280-Fix-SpongeAbsortEvent-handling.patch b/patches/server/0279-Fix-SpongeAbsortEvent-handling.patch similarity index 88% rename from patches/unapplied/server/0280-Fix-SpongeAbsortEvent-handling.patch rename to patches/server/0279-Fix-SpongeAbsortEvent-handling.patch index 019425b6f9..271eb63fd6 100644 --- a/patches/unapplied/server/0280-Fix-SpongeAbsortEvent-handling.patch +++ b/patches/server/0279-Fix-SpongeAbsortEvent-handling.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix SpongeAbsortEvent handling Only process drops when the block is actually going to be removed diff --git a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java -index d2c2adb0484985897db5f4fdc9b88f0e4b2c3235..d810f6bf9a8a354e5b8994e51ec3672428277dde 100644 +index 1238317d3e6d968525a10c5480a7d44d56abb071..c4667bea0708d12e228ec2a4c84fcee7e48ca08c 100644 --- a/src/main/java/net/minecraft/world/level/block/SpongeBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SpongeBlock.java -@@ -127,7 +127,11 @@ public class SpongeBlock extends Block { +@@ -134,7 +134,11 @@ public class SpongeBlock extends Block { } else if (iblockdata.is(Blocks.KELP) || iblockdata.is(Blocks.KELP_PLANT) || iblockdata.is(Blocks.SEAGRASS) || iblockdata.is(Blocks.TALL_SEAGRASS)) { BlockEntity tileentity = iblockdata.hasBlockEntity() ? world.getBlockEntity(blockposition1) : null; diff --git a/patches/unapplied/server/0281-Don-t-allow-digging-into-unloaded-chunks.patch b/patches/server/0280-Don-t-allow-digging-into-unloaded-chunks.patch similarity index 95% rename from patches/unapplied/server/0281-Don-t-allow-digging-into-unloaded-chunks.patch rename to patches/server/0280-Don-t-allow-digging-into-unloaded-chunks.patch index 1740416fd3..f645f83592 100644 --- a/patches/unapplied/server/0281-Don-t-allow-digging-into-unloaded-chunks.patch +++ b/patches/server/0280-Don-t-allow-digging-into-unloaded-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow digging into unloaded chunks diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 5f79367fda576300c59774d69089f8f1c4408f8a..c15d2b8862139a6f083547794617d8bd6c462287 100644 +index e3b7441d875b55ffce295c948f3dc867be09e042..79020edc9fac79e8b186d0f57f956d2189d3dc8e 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -119,8 +119,8 @@ public class ServerPlayerGameMode { @@ -59,10 +59,10 @@ index 5f79367fda576300c59774d69089f8f1c4408f8a..c15d2b8862139a6f083547794617d8bd this.level.destroyBlockProgress(this.player.getId(), pos, -1); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6b2a3d3af54af0699a2331cfa6b165d079e38caf..52b386b608fab59fe930885c0951f9674a257d69 100644 +index 214fbc10dae71634fd377c61b774012771a5d9f8..69db503d6259946d079ff828a80cae7e362aa5b4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1562,6 +1562,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1589,6 +1589,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl case START_DESTROY_BLOCK: case ABORT_DESTROY_BLOCK: case STOP_DESTROY_BLOCK: diff --git a/patches/unapplied/server/0282-Make-the-default-permission-message-configurable.patch b/patches/server/0281-Make-the-default-permission-message-configurable.patch similarity index 92% rename from patches/unapplied/server/0282-Make-the-default-permission-message-configurable.patch rename to patches/server/0281-Make-the-default-permission-message-configurable.patch index e8ddfd0bb7..6a9b8408bb 100644 --- a/patches/unapplied/server/0282-Make-the-default-permission-message-configurable.patch +++ b/patches/server/0281-Make-the-default-permission-message-configurable.patch @@ -18,10 +18,10 @@ index 0dd48e4098191c8b6e29945d62bc473e9f3a1e77..ae51993e0de706cb62c96795ca9de766 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5c39a02cb9db3d6c45b5cfe845a9be79cf7a1574..58ac20547480173f0b4cd4015fe0fb38d2d211ff 100644 +index b0de5cfd60a61fcea681f95dabbdc16beeb4242d..6f1e2ce0187460f78f7c0d8855f1f8f5cf897089 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2771,6 +2771,16 @@ public final class CraftServer implements Server { +@@ -2803,6 +2803,16 @@ public final class CraftServer implements Server { return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions; } diff --git a/patches/unapplied/server/0283-Prevent-rayTrace-from-loading-chunks.patch b/patches/server/0282-Prevent-rayTrace-from-loading-chunks.patch similarity index 100% rename from patches/unapplied/server/0283-Prevent-rayTrace-from-loading-chunks.patch rename to patches/server/0282-Prevent-rayTrace-from-loading-chunks.patch diff --git a/patches/unapplied/server/0284-Handle-Large-Packets-disconnecting-client.patch b/patches/server/0283-Handle-Large-Packets-disconnecting-client.patch similarity index 100% rename from patches/unapplied/server/0284-Handle-Large-Packets-disconnecting-client.patch rename to patches/server/0283-Handle-Large-Packets-disconnecting-client.patch diff --git a/patches/unapplied/server/0285-force-entity-dismount-during-teleportation.patch b/patches/server/0284-force-entity-dismount-during-teleportation.patch similarity index 85% rename from patches/unapplied/server/0285-force-entity-dismount-during-teleportation.patch rename to patches/server/0284-force-entity-dismount-during-teleportation.patch index 6bae99a69a..7b6588ede2 100644 --- a/patches/unapplied/server/0285-force-entity-dismount-during-teleportation.patch +++ b/patches/server/0284-force-entity-dismount-during-teleportation.patch @@ -20,10 +20,10 @@ this is going to be the best soultion all around. Improvements/suggestions welcome! diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index d8528c84c9cc1724b5100276ba624cf8627dc6ce..26b2ad3cda2a8b8166ec8eef520ab46ff9076e0f 100644 +index c8e0d0126c1a6eaded7c4a37f2da8ce1bf9bfadd..760bb3bfa47ee1e4c6a6add7ab823a24ffd9e15e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2576,11 +2576,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2605,11 +2605,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } public void removeVehicle() { @@ -41,7 +41,7 @@ index d8528c84c9cc1724b5100276ba624cf8627dc6ce..26b2ad3cda2a8b8166ec8eef520ab46f } } -@@ -2611,7 +2616,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2640,7 +2645,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } } @@ -53,7 +53,7 @@ index d8528c84c9cc1724b5100276ba624cf8627dc6ce..26b2ad3cda2a8b8166ec8eef520ab46f if (entity.getVehicle() == this) { throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); } else { -@@ -2621,7 +2629,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2650,7 +2658,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { VehicleExitEvent event = new VehicleExitEvent( (Vehicle) this.getBukkitEntity(), @@ -62,7 +62,7 @@ index d8528c84c9cc1724b5100276ba624cf8627dc6ce..26b2ad3cda2a8b8166ec8eef520ab46f ); // Suppress during worldgen if (this.valid) { -@@ -2635,7 +2643,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2664,7 +2672,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } // CraftBukkit end // Spigot start @@ -72,10 +72,10 @@ index d8528c84c9cc1724b5100276ba624cf8627dc6ce..26b2ad3cda2a8b8166ec8eef520ab46f if (this.valid) { Bukkit.getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 5a638da349424a9d3bc5df87d81ba268b8052568..072f1f4e342141a02e6f94849432f116ba2e0e5c 100644 +index 40b8b863c4662d8a6aa228763be167317232b99f..d0482485b13346ac84bb52db30879519f7129091 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3469,9 +3469,15 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3471,9 +3471,15 @@ public abstract class LivingEntity extends Entity implements Attackable { @Override public void stopRiding() { @@ -93,10 +93,10 @@ index 5a638da349424a9d3bc5df87d81ba268b8052568..072f1f4e342141a02e6f94849432f116 this.dismountVehicle(entity); } diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index c2935b00737418749fc8c20624a1f6792ba7d071..cc6a9e9566d6f9bf453f3d6fba132c886248bf1c 100644 +index 0d8261e15a1a66df17727788c387dca8fbe2ae84..110c751dc108dbdc2fd9fdd25ca07df7acc723e5 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1154,7 +1154,13 @@ public abstract class Player extends LivingEntity { +@@ -1149,7 +1149,13 @@ public abstract class Player extends LivingEntity { @Override public void removeVehicle() { diff --git a/patches/unapplied/server/0286-Add-more-Zombie-API.patch b/patches/server/0285-Add-more-Zombie-API.patch similarity index 100% rename from patches/unapplied/server/0286-Add-more-Zombie-API.patch rename to patches/server/0285-Add-more-Zombie-API.patch diff --git a/patches/unapplied/server/0287-Book-Size-Limits.patch b/patches/server/0286-Book-Size-Limits.patch similarity index 94% rename from patches/unapplied/server/0287-Book-Size-Limits.patch rename to patches/server/0286-Book-Size-Limits.patch index 7e8f4afb62..1b5ccba615 100644 --- a/patches/unapplied/server/0287-Book-Size-Limits.patch +++ b/patches/server/0286-Book-Size-Limits.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits Puts some limits on the size of books. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 52b386b608fab59fe930885c0951f9674a257d69..78b902277521e2e6b33c971f61d27193ab2fc4f8 100644 +index 69db503d6259946d079ff828a80cae7e362aa5b4..addd60c07b59934095cfcc55024d6c8646a768ea 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1024,6 +1024,45 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1029,6 +1029,45 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleEditBook(ServerboundEditBookPacket packet) { diff --git a/patches/unapplied/server/0288-Add-PlayerConnectionCloseEvent.patch b/patches/server/0287-Add-PlayerConnectionCloseEvent.patch similarity index 96% rename from patches/unapplied/server/0288-Add-PlayerConnectionCloseEvent.patch rename to patches/server/0287-Add-PlayerConnectionCloseEvent.patch index 368ce0b6b1..9998c22dff 100644 --- a/patches/unapplied/server/0288-Add-PlayerConnectionCloseEvent.patch +++ b/patches/server/0287-Add-PlayerConnectionCloseEvent.patch @@ -69,10 +69,10 @@ index 6fcbf8205e1852d5193a42bfe1154f62ab01e7ad..25881c890c643ce90bdcda6b094d912b } } diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 03ff64ad395455f21f4ca30faae17fc6a1dc0501..673652231a65e9441ee882c86656b86a86547488 100644 +index 96ae1fd95956f5e5a1542dcce3fbd9d4b83d49ba..615fb00e50f3c434809f8e1b201d457b9beae8fd 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -58,7 +58,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -60,7 +60,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @Nullable String requestedUsername; @Nullable diff --git a/patches/unapplied/server/0289-Prevent-Enderman-from-loading-chunks.patch b/patches/server/0288-Prevent-Enderman-from-loading-chunks.patch similarity index 100% rename from patches/unapplied/server/0289-Prevent-Enderman-from-loading-chunks.patch rename to patches/server/0288-Prevent-Enderman-from-loading-chunks.patch diff --git a/patches/unapplied/server/0290-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/patches/server/0289-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch similarity index 90% rename from patches/unapplied/server/0290-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch rename to patches/server/0289-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 040fb843cb..8681918ef8 100644 --- a/patches/unapplied/server/0290-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/patches/server/0289-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -16,10 +16,10 @@ intent to remove) and replace it with two new methods, clearly named and documented as to their purpose. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 42898f986d317d44d88c39b56e4655366d5a5a1b..32ab4a254b04d8d66c62660c7ad9489ea8ecf7f2 100644 +index 6e025c8fdb14e6dcb178055d51efd11112247808..268567dab735619171c2cdfd566790527c07e64d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -241,6 +241,7 @@ public class ServerPlayer extends Player { +@@ -248,6 +248,7 @@ public class ServerPlayer extends Player { private int containerCounter; public boolean wonGame; private int containerUpdateDelay; // Paper @@ -28,10 +28,10 @@ index 42898f986d317d44d88c39b56e4655366d5a5a1b..32ab4a254b04d8d66c62660c7ad9489e public boolean queueHealthUpdatePacket = false; public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 3cd1563480d40ff358dce52891ba4bdc8d119888..1619a0573c6996e0f5494bfab6788ba96c08a6d3 100644 +index b76024a8dce1ef79f6cbff7403daffd214d7b850..807b649ed6e5ddd4887bf9b5a028b02a58a75348 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -181,6 +181,7 @@ public abstract class PlayerList { +@@ -179,6 +179,7 @@ public abstract class PlayerList { public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie clientData) { player.isRealPlayer = true; // Paper @@ -106,10 +106,10 @@ index e8490a58dd4d9bc39a5bb2f9fc109526e031b971..5f590575f95eff8bf0cdcafde7dee0e3 public Location getLastDeathLocation() { if (this.getData().contains("LastDeathLocation", 10)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 938f0cc12e7a6569a8d3585a9f58f6490fd387a0..43fb53bfef71912695266eda459d7fa2d972cd1c 100644 +index 06e6db108a40ff7e59fbfe1895dae7dbc3a3f3ab..268814e3de4ee19c9e248080d77b20a7c2773bb0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -195,6 +195,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -196,6 +196,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit @@ -117,7 +117,7 @@ index 938f0cc12e7a6569a8d3585a9f58f6490fd387a0..43fb53bfef71912695266eda459d7fa2 // Paper end public CraftPlayer(CraftServer server, ServerPlayer entity) { -@@ -1954,6 +1955,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1961,6 +1962,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index 938f0cc12e7a6569a8d3585a9f58f6490fd387a0..43fb53bfef71912695266eda459d7fa2 public void readExtraData(CompoundTag nbttagcompound) { this.hasPlayedBefore = true; if (nbttagcompound.contains("bukkit")) { -@@ -1976,6 +1989,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1983,6 +1996,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(CompoundTag nbttagcompound) { @@ -145,7 +145,7 @@ index 938f0cc12e7a6569a8d3585a9f58f6490fd387a0..43fb53bfef71912695266eda459d7fa2 if (!nbttagcompound.contains("bukkit")) { nbttagcompound.put("bukkit", new CompoundTag()); } -@@ -1990,6 +2005,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1997,6 +2012,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.putLong("firstPlayed", this.getFirstPlayed()); data.putLong("lastPlayed", System.currentTimeMillis()); data.putString("lastKnownName", handle.getScoreboardName()); diff --git a/patches/unapplied/server/0291-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/patches/server/0290-Workaround-for-vehicle-tracking-issue-on-disconnect.patch similarity index 85% rename from patches/unapplied/server/0291-Workaround-for-vehicle-tracking-issue-on-disconnect.patch rename to patches/server/0290-Workaround-for-vehicle-tracking-issue-on-disconnect.patch index 50c1c3d109..cc30e56825 100644 --- a/patches/unapplied/server/0291-Workaround-for-vehicle-tracking-issue-on-disconnect.patch +++ b/patches/server/0290-Workaround-for-vehicle-tracking-issue-on-disconnect.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 32ab4a254b04d8d66c62660c7ad9489ea8ecf7f2..a38eb9dfa24388508eddad3d51953441f3c2c69c 100644 +index 268567dab735619171c2cdfd566790527c07e64d..c46326b7c761057f2d61542e088278553d694d7c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1647,6 +1647,13 @@ public class ServerPlayer extends Player { +@@ -1748,6 +1748,13 @@ public class ServerPlayer extends Player { public void disconnect() { this.disconnected = true; this.ejectPassengers(); diff --git a/patches/unapplied/server/0292-Block-Entity-remove-from-being-called-on-Players.patch b/patches/server/0291-Block-Entity-remove-from-being-called-on-Players.patch similarity index 90% rename from patches/unapplied/server/0292-Block-Entity-remove-from-being-called-on-Players.patch rename to patches/server/0291-Block-Entity-remove-from-being-called-on-Players.patch index 2926292a14..ad6af8b81f 100644 --- a/patches/unapplied/server/0292-Block-Entity-remove-from-being-called-on-Players.patch +++ b/patches/server/0291-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 43fb53bfef71912695266eda459d7fa2d972cd1c..8341d66dd5cad3cebdd95cfbc995cc3e8d43d934 100644 +index 268814e3de4ee19c9e248080d77b20a7c2773bb0..abbbd559ee0301e261419a4e1c2c082174a91881 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2894,6 +2894,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2909,6 +2909,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetAttackStrengthTicker(); } diff --git a/patches/unapplied/server/0293-BlockDestroyEvent.patch b/patches/server/0292-BlockDestroyEvent.patch similarity index 91% rename from patches/unapplied/server/0293-BlockDestroyEvent.patch rename to patches/server/0292-BlockDestroyEvent.patch index 234cac1cf6..245647388e 100644 --- a/patches/unapplied/server/0293-BlockDestroyEvent.patch +++ b/patches/server/0292-BlockDestroyEvent.patch @@ -11,10 +11,10 @@ floating in the air. This can replace many uses of BlockPhysicsEvent diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index baee74186c6349efb8e5e9ff087a114c08c7ae72..3f6d9b7c91a14dedeee11968e80de26adeccb510 100644 +index eec83b6c00fee271fdeb12bd8b812439d1dc4d3b..ec12d394df2c240994b614d1252b220c836d6c89 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -30,6 +30,7 @@ import net.minecraft.nbt.CompoundTag; +@@ -31,6 +31,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.Packet; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; @@ -22,7 +22,7 @@ index baee74186c6349efb8e5e9ff087a114c08c7ae72..3f6d9b7c91a14dedeee11968e80de26a import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.FullChunkStatus; import net.minecraft.server.level.ServerLevel; -@@ -666,8 +667,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -669,8 +670,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return false; } else { FluidState fluid = this.getFluidState(pos); diff --git a/patches/unapplied/server/0294-Async-command-map-building.patch b/patches/server/0293-Async-command-map-building.patch similarity index 90% rename from patches/unapplied/server/0294-Async-command-map-building.patch rename to patches/server/0293-Async-command-map-building.patch index b75ae1d63c..5a91f40a4e 100644 --- a/patches/unapplied/server/0294-Async-command-map-building.patch +++ b/patches/server/0293-Async-command-map-building.patch @@ -9,10 +9,10 @@ commands if the server is restarting. Using the default async pool caused issues due to the shutdown logic generally being much later. diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index e63632f09d608371aaeaf09a6dac57c1d8a719d4..bbf4db5faf4694e78e01f4e74e277b46a02f7afd 100644 +index 5a1accff1a7dc2ab40224ec0952a287cd6099aee..2a88cf008c98284954108f2362f46ac14c84200a 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -404,6 +404,24 @@ public class Commands { +@@ -458,6 +458,24 @@ public class Commands { if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot // CraftBukkit start // Register Vanilla commands into builtRoot as before @@ -37,7 +37,7 @@ index e63632f09d608371aaeaf09a6dac57c1d8a719d4..bbf4db5faf4694e78e01f4e74e277b46 Map, CommandNode> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues RootCommandNode vanillaRoot = new RootCommandNode(); -@@ -421,7 +439,14 @@ public class Commands { +@@ -475,7 +493,14 @@ public class Commands { for (CommandNode node : rootcommandnode.getChildren()) { bukkit.add(node.getName()); } @@ -53,10 +53,10 @@ index e63632f09d608371aaeaf09a6dac57c1d8a719d4..bbf4db5faf4694e78e01f4e74e277b46 event.getPlayer().getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 85ca00396d1f9f845f8f833d0896266b55a1b84d..c0918bcfa78782c54a548267c2363f1edd197412 100644 +index ec0d9a7221d61a38aabfbb270a122f1c3ceeed23..ca50e8240c62323c5a0e34aec91e6684a92189c4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -880,6 +880,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, SharedSuggestionProvider { ++public class CommandSourceStack implements ExecutionCommandSource, SharedSuggestionProvider, com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource { // Paper public static final SimpleCommandExceptionType ERROR_NOT_PLAYER = new SimpleCommandExceptionType(Component.translatable("permissions.requires.player")); public static final SimpleCommandExceptionType ERROR_NOT_ENTITY = new SimpleCommandExceptionType(Component.translatable("permissions.requires.entity")); -@@ -176,6 +176,26 @@ public class CommandSourceStack implements SharedSuggestionProvider { +@@ -170,6 +170,26 @@ public class CommandSourceStack implements ExecutionCommandSource { runSync(player, bukkit, rootcommandnode); }); -@@ -447,6 +448,7 @@ public class Commands { +@@ -501,6 +502,7 @@ public class Commands { private void runSync(ServerPlayer player, Collection bukkit, RootCommandNode rootcommandnode) { // Paper end - Async command map building @@ -118,7 +118,7 @@ index bbf4db5faf4694e78e01f4e74e277b46a02f7afd..148cfe9eac43cafee016d58a1344a97a PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit)); event.getPlayer().getServer().getPluginManager().callEvent(event); -@@ -465,6 +467,11 @@ public class Commands { +@@ -519,6 +521,11 @@ public class Commands { while (iterator.hasNext()) { CommandNode commandnode2 = (CommandNode) iterator.next(); @@ -131,10 +131,10 @@ index bbf4db5faf4694e78e01f4e74e277b46a02f7afd..148cfe9eac43cafee016d58a1344a97a if (commandnode2.canUse(source)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 78b902277521e2e6b33c971f61d27193ab2fc4f8..892a06c76e5e77b43d592c325fcbf32f9d107181 100644 +index addd60c07b59934095cfcc55024d6c8646a768ea..1a70fe69e6627534aaed691cc1bc0eb98c075707 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -740,8 +740,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -743,8 +743,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl ParseResults parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack()); this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { @@ -149,7 +149,7 @@ index 78b902277521e2e6b33c971f61d27193ab2fc4f8..892a06c76e5e77b43d592c325fcbf32f }); }); } -@@ -756,7 +760,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -759,7 +763,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl builder.suggest(completion.suggestion(), PaperAdventure.asVanilla(completion.tooltip())); } }); diff --git a/patches/unapplied/server/0296-Improve-exact-choice-recipe-ingredients.patch b/patches/server/0295-Improve-exact-choice-recipe-ingredients.patch similarity index 96% rename from patches/unapplied/server/0296-Improve-exact-choice-recipe-ingredients.patch rename to patches/server/0295-Improve-exact-choice-recipe-ingredients.patch index 47a51d830f..93069f3ed6 100644 --- a/patches/unapplied/server/0296-Improve-exact-choice-recipe-ingredients.patch +++ b/patches/server/0295-Improve-exact-choice-recipe-ingredients.patch @@ -296,7 +296,7 @@ index 5cc5f67284ad01c9154876252450552ed37f24bf..26b236a764177ac16d53f5cbaf83d3e2 } } diff --git a/src/main/java/net/minecraft/world/item/crafting/AbstractCookingRecipe.java b/src/main/java/net/minecraft/world/item/crafting/AbstractCookingRecipe.java -index c864809c7d656cf8e3f1080c2c57aefd0a417240..760a429137350d8ae100e77273318f3ba1ccfcc5 100644 +index ff48b0de1bdf693e01ea04bc1606c5f80d4c401c..43cff6d2fca55192a0a8d9051a0728327c5dcf4b 100644 --- a/src/main/java/net/minecraft/world/item/crafting/AbstractCookingRecipe.java +++ b/src/main/java/net/minecraft/world/item/crafting/AbstractCookingRecipe.java @@ -6,7 +6,7 @@ import net.minecraft.world.Container; @@ -317,10 +317,10 @@ index c864809c7d656cf8e3f1080c2c57aefd0a417240..760a429137350d8ae100e77273318f3b @Override diff --git a/src/main/java/net/minecraft/world/item/crafting/Recipe.java b/src/main/java/net/minecraft/world/item/crafting/Recipe.java -index 75ae978b577b6b2399e1476328114e94abd7d6c4..80387cd1bee2bd4c024073cee74222828f9f2c17 100644 +index 8b631e457f783e55b7c37dd915b699912a9c5b49..e2d6c8ed586ef429cc712139e501df696ed10f6e 100644 --- a/src/main/java/net/minecraft/world/item/crafting/Recipe.java +++ b/src/main/java/net/minecraft/world/item/crafting/Recipe.java -@@ -65,4 +65,10 @@ public interface Recipe { +@@ -69,4 +69,10 @@ public interface Recipe { } org.bukkit.inventory.Recipe toBukkitRecipe(org.bukkit.NamespacedKey id); // CraftBukkit @@ -332,28 +332,28 @@ index 75ae978b577b6b2399e1476328114e94abd7d6c4..80387cd1bee2bd4c024073cee7422282 + // Paper end } diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java -index 4430c1161c3316566158ab7286e21495edb38991..17bef91546fa85d401b263c3a69fbf464f290eca 100644 +index 201897bbde809699b53617e09703f5b22bbbe938..d772cf80fa3831e1c79d601ea09a073da089e2c5 100644 --- a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java +++ b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java -@@ -26,7 +26,7 @@ import org.bukkit.craftbukkit.inventory.CraftShapedRecipe; +@@ -17,7 +17,7 @@ import org.bukkit.craftbukkit.inventory.CraftShapedRecipe; import org.bukkit.inventory.RecipeChoice; // CraftBukkit end -public class ShapedRecipe implements CraftingRecipe { +public class ShapedRecipe extends io.papermc.paper.inventory.recipe.RecipeBookExactChoiceRecipe implements CraftingRecipe { // Paper - improve exact recipe choices - final int width; - final int height; -@@ -44,6 +44,7 @@ public class ShapedRecipe implements CraftingRecipe { - this.recipeItems = ingredients; + final ShapedRecipePattern pattern; + final ItemStack result; +@@ -31,6 +31,7 @@ public class ShapedRecipe implements CraftingRecipe { + this.pattern = raw; this.result = result; this.showNotification = showNotification; + this.checkExactIngredients(); // Paper - improve exact recipe choices } - public ShapedRecipe(String group, CraftingBookCategory category, int width, int height, NonNullList ingredients, ItemStack result) { + public ShapedRecipe(String group, CraftingBookCategory category, ShapedRecipePattern raw, ItemStack result) { diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java -index 7f78490ebf459595460ce656b9b9227e5d6b8de6..38f7d1ece27ec1a3deda21fb6a6f0e788c8ed718 100644 +index 870e07140d835feaa55808101722d4547d5021d0..27b0a79f7a7c47047216aae42944bac2a2151181 100644 --- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java +++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java @@ -20,7 +20,7 @@ import org.bukkit.craftbukkit.inventory.CraftRecipe; diff --git a/patches/unapplied/server/0297-Limit-Client-Sign-length-more.patch b/patches/server/0296-Limit-Client-Sign-length-more.patch similarity index 89% rename from patches/unapplied/server/0297-Limit-Client-Sign-length-more.patch rename to patches/server/0296-Limit-Client-Sign-length-more.patch index 20c34a9a2c..a257dbd462 100644 --- a/patches/unapplied/server/0297-Limit-Client-Sign-length-more.patch +++ b/patches/server/0296-Limit-Client-Sign-length-more.patch @@ -22,18 +22,18 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 892a06c76e5e77b43d592c325fcbf32f9d107181..93b1e0b287d195181cb2253b3490ed537efa6b8e 100644 +index 1a70fe69e6627534aaed691cc1bc0eb98c075707..9b7902fa7ba79ff44b215647f580ea1834b1aa74 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -288,6 +288,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - private final MessageSignatureCache messageSignatureCache; +@@ -291,6 +291,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl + private final MessageSignatureCache messageSignatureCache = MessageSignatureCache.createDefault(); private final FutureChain chatMessageChain; private boolean waitingForSwitchToConfig; + private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie clientData) { super(server, connection, clientData, player); // CraftBukkit -@@ -3052,7 +3053,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3060,7 +3061,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleSignUpdate(ServerboundSignUpdatePacket packet) { diff --git a/patches/unapplied/server/0298-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/patches/server/0297-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 88% rename from patches/unapplied/server/0298-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to patches/server/0297-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch index 76a6eca58f..50e12a75df 100644 --- a/patches/unapplied/server/0298-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch +++ b/patches/server/0297-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 1619a0573c6996e0f5494bfab6788ba96c08a6d3..72dc59f2081e517587d66d03d9b5910caf0e1c17 100644 +index 807b649ed6e5ddd4887bf9b5a028b02a58a75348..59fcb123cb1a49cca4072a62aa304e7382a07ccb 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -1151,6 +1151,7 @@ public abstract class PlayerList { diff --git a/patches/unapplied/server/0299-Handle-Oversized-Tile-Entities-in-chunks.patch b/patches/server/0298-Handle-Oversized-Tile-Entities-in-chunks.patch similarity index 100% rename from patches/unapplied/server/0299-Handle-Oversized-Tile-Entities-in-chunks.patch rename to patches/server/0298-Handle-Oversized-Tile-Entities-in-chunks.patch diff --git a/patches/unapplied/server/0300-Entity-getEntitySpawnReason.patch b/patches/server/0299-Entity-getEntitySpawnReason.patch similarity index 86% rename from patches/unapplied/server/0300-Entity-getEntitySpawnReason.patch rename to patches/server/0299-Entity-getEntitySpawnReason.patch index 87cba99cd3..91b8724130 100644 --- a/patches/unapplied/server/0300-Entity-getEntitySpawnReason.patch +++ b/patches/server/0299-Entity-getEntitySpawnReason.patch @@ -22,10 +22,10 @@ index 2eddeb8d5239bbfeefbf4d3bd363f1ad083299b6..a7c89cdf20cb63792c76de81c1ff9f2c }); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index c9f22e24223c409a7a3aec668f02a59ed5102524..47a1fb476e3825f489fc217ef83fd273b52676a1 100644 +index 08a1fdd0b6fb688897a7813e8c298265afedf02b..a26138470065a720045e3079e5e96d6c4fa765ce 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1431,6 +1431,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1450,6 +1450,7 @@ public class ServerLevel extends Level implements WorldGenLevel { return true; } // Paper end @@ -34,10 +34,10 @@ index c9f22e24223c409a7a3aec668f02a59ed5102524..47a1fb476e3825f489fc217ef83fd273 // Paper start if (DEBUG_ENTITIES) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 72dc59f2081e517587d66d03d9b5910caf0e1c17..e06748a8550ffff34ea4e070e143348397d4d438 100644 +index 59fcb123cb1a49cca4072a62aa304e7382a07ccb..f7e0364b4f5cf73d36f26ad169c93259b727082c 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -225,6 +225,11 @@ public abstract class PlayerList { +@@ -223,6 +223,11 @@ public abstract class PlayerList { worldserver1 = worldserver; } @@ -49,7 +49,7 @@ index 72dc59f2081e517587d66d03d9b5910caf0e1c17..e06748a8550ffff34ea4e070e1433483 player.setServerLevel(worldserver1); String s1 = connection.getLoggableAddress(this.server.logIPs()); -@@ -356,7 +361,7 @@ public abstract class PlayerList { +@@ -354,7 +359,7 @@ public abstract class PlayerList { // CraftBukkit start ServerLevel finalWorldServer = worldserver1; Entity entity = EntityType.loadEntityRecursive(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> { @@ -59,10 +59,10 @@ index 72dc59f2081e517587d66d03d9b5910caf0e1c17..e06748a8550ffff34ea4e070e1433483 }); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 26b2ad3cda2a8b8166ec8eef520ab46ff9076e0f..bf046bea5fdff67f362c401f1ddbfa9d2863a9d7 100644 +index 760bb3bfa47ee1e4c6a6add7ab823a24ffd9e15e..75effaa34f06d85ee4e26d9a598acc85c94e9767 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -234,6 +234,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -235,6 +235,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } } // Paper end @@ -70,9 +70,9 @@ index 26b2ad3cda2a8b8166ec8eef520ab46ff9076e0f..bf046bea5fdff67f362c401f1ddbfa9d public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper private CraftEntity bukkitEntity; -@@ -2189,6 +2190,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2212,6 +2213,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } - nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ())); + nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ())); } + if (spawnReason != null) { + nbt.putString("Paper.SpawnReason", spawnReason.name()); @@ -80,7 +80,7 @@ index 26b2ad3cda2a8b8166ec8eef520ab46ff9076e0f..bf046bea5fdff67f362c401f1ddbfa9d // Save entity's from mob spawner status if (spawnedViaMobSpawner) { nbt.putBoolean("Paper.FromMobSpawner", true); -@@ -2335,6 +2339,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2358,6 +2362,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status @@ -108,10 +108,10 @@ index 26b2ad3cda2a8b8166ec8eef520ab46ff9076e0f..bf046bea5fdff67f362c401f1ddbfa9d } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index a9be524edb03c51300bc45d424fcf87c7491a8c0..a08c2dee792da1a54005f0a65a9eefabc7bc7c60 100644 +index 713608239cc7518d05b04d3dd79c3af0c358c64e..231674f1483ad71630ac71ba92efc50f94a5659b 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -187,6 +187,7 @@ public abstract class BaseSpawner { +@@ -189,6 +189,7 @@ public abstract class BaseSpawner { } entity.spawnedViaMobSpawner = true; // Paper @@ -133,10 +133,10 @@ index faad948f089575e4988d989790cc1dd13f8a79cd..ee11a52e82091911aa3a196bcc1f7ab8 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index f1df0a172e7e1589b9a6af6fab87ce0251c5a557..e1f75dfcb22918d953d35d345280c61301688ac7 100644 +index 93363aabee8bafeb1bc1d0d5a94e80b647175509..b06c338ee9205d1f4d562571aba83c83f9abd20b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1323,5 +1323,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1367,5 +1367,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public boolean fromMobSpawner() { return getHandle().spawnedViaMobSpawner; } diff --git a/patches/unapplied/server/0301-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/patches/server/0300-Optimize-Network-Manager-and-add-advanced-packet-sup.patch similarity index 100% rename from patches/unapplied/server/0301-Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to patches/server/0300-Optimize-Network-Manager-and-add-advanced-packet-sup.patch diff --git a/patches/unapplied/server/0302-Fire-event-on-GS4-query.patch b/patches/server/0301-Fire-event-on-GS4-query.patch similarity index 100% rename from patches/unapplied/server/0302-Fire-event-on-GS4-query.patch rename to patches/server/0301-Fire-event-on-GS4-query.patch diff --git a/patches/unapplied/server/0303-Implement-PlayerPostRespawnEvent.patch b/patches/server/0302-Implement-PlayerPostRespawnEvent.patch similarity index 86% rename from patches/unapplied/server/0303-Implement-PlayerPostRespawnEvent.patch rename to patches/server/0302-Implement-PlayerPostRespawnEvent.patch index 486e4b79d3..1d84434683 100644 --- a/patches/unapplied/server/0303-Implement-PlayerPostRespawnEvent.patch +++ b/patches/server/0302-Implement-PlayerPostRespawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index e06748a8550ffff34ea4e070e143348397d4d438..7321e5b9905cf5afb684a9d2d39048f43c245504 100644 +index f7e0364b4f5cf73d36f26ad169c93259b727082c..ee1b40ef92e343e829040b8df5a2db67846f2982 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -753,9 +753,14 @@ public abstract class PlayerList { +@@ -751,9 +751,14 @@ public abstract class PlayerList { boolean flag2 = false; @@ -24,7 +24,7 @@ index e06748a8550ffff34ea4e070e143348397d4d438..7321e5b9905cf5afb684a9d2d39048f4 ServerLevel worldserver1 = this.server.getLevel(entityplayer.getRespawnDimension()); if (worldserver1 != null) { Optional optional; -@@ -807,6 +812,7 @@ public abstract class PlayerList { +@@ -805,6 +810,7 @@ public abstract class PlayerList { location = respawnEvent.getRespawnLocation(); if (!flag) entityplayer.reset(); // SPIGOT-4785 @@ -32,7 +32,7 @@ index e06748a8550ffff34ea4e070e143348397d4d438..7321e5b9905cf5afb684a9d2d39048f4 } else { location.setWorld(worldserver.getWorld()); } -@@ -865,6 +871,13 @@ public abstract class PlayerList { +@@ -863,6 +869,13 @@ public abstract class PlayerList { if (entityplayer.connection.isDisconnected()) { this.save(entityplayer); } diff --git a/patches/unapplied/server/0304-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/patches/server/0303-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch similarity index 86% rename from patches/unapplied/server/0304-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to patches/server/0303-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch index aaeef4e981..a43c825a0e 100644 --- a/patches/unapplied/server/0304-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch +++ b/patches/server/0303-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch @@ -6,10 +6,10 @@ Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items vanilla checks for == 0 diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 5744d726c4e7a970db5c1c3764d530d839d95597..2edc55f09b79ac75788a0ded8b3d2a6800674470 100644 +index 18c9c7c2b0605bee2936fbb084108dd9791f7ebe..314ba941c72a50b479cb634f3337ded3e63a7622 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -122,6 +122,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -140,6 +140,7 @@ public class ItemEntity extends Entity implements TraceableEntity { // CraftBukkit start - Use wall time for pickup and despawn timers int elapsedTicks = MinecraftServer.currentTick - this.lastTick; if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks; @@ -17,7 +17,7 @@ index 5744d726c4e7a970db5c1c3764d530d839d95597..2edc55f09b79ac75788a0ded8b3d2a68 if (this.age != -32768) this.age += elapsedTicks; this.lastTick = MinecraftServer.currentTick; // CraftBukkit end -@@ -208,6 +209,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -226,6 +227,7 @@ public class ItemEntity extends Entity implements TraceableEntity { // CraftBukkit start - Use wall time for pickup and despawn timers int elapsedTicks = MinecraftServer.currentTick - this.lastTick; if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks; diff --git a/patches/unapplied/server/0305-Server-Tick-Events.patch b/patches/server/0304-Server-Tick-Events.patch similarity index 77% rename from patches/unapplied/server/0305-Server-Tick-Events.patch rename to patches/server/0304-Server-Tick-Events.patch index 5e7e353183..278551b8fc 100644 --- a/patches/unapplied/server/0305-Server-Tick-Events.patch +++ b/patches/server/0304-Server-Tick-Events.patch @@ -6,18 +6,18 @@ Subject: [PATCH] Server Tick Events Fires event at start and end of a server tick diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c0918bcfa78782c54a548267c2363f1edd197412..fb2851e94c178f49ee8046176b196c63254907e7 100644 +index ca50e8240c62323c5a0e34aec91e6684a92189c4..9f0f73cca985ec3f55a7e83471c2aba8420c91e7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1286,6 +1286,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop -Date: Wed, 17 Oct 2018 19:17:27 -0400 -Subject: [PATCH] MC-50319: Check other worlds for shooter of projectiles - -Say a player shoots an arrow through a nether portal, the game -would lose the shooter for determining things such as Player Kills, -because the entity is in another world. - -If the projectile fails to find the shooter in the current world, check -other worlds. - -diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index f49dd279ba9e8970f116f956466feb072c4f8420..e5da57b35cd82ee7b4e844cfe74289a71d38779a 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -60,6 +60,18 @@ public abstract class Projectile extends Entity implements TraceableEntity { - return this.cachedOwner; - } else if (this.ownerUUID != null && this.level() instanceof ServerLevel) { - this.cachedOwner = ((ServerLevel) this.level()).getEntity(this.ownerUUID); -+ // Paper start - check all worlds -+ if (this.cachedOwner == null) { -+ for (final ServerLevel level : this.level().getServer().getAllLevels()) { -+ if (level == this.level()) continue; -+ final Entity entity = level.getEntity(this.ownerUUID); -+ if (entity != null) { -+ this.cachedOwner = entity; -+ break; -+ } -+ } -+ } -+ // Paper end - return this.cachedOwner; - } else { - return null;