diff --git a/build-data/dev-imports.txt b/build-data/dev-imports.txt index b818b96e2..286aeeaaa 100644 --- a/build-data/dev-imports.txt +++ b/build-data/dev-imports.txt @@ -8,3 +8,4 @@ # To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId: # minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter # minecraft net/minecraft/world/level/entity/LevelEntityGetter.java + diff --git a/patches/unapplied/api/0055-PlayerAttemptPickupItemEvent.patch b/patches/api/0055-PlayerAttemptPickupItemEvent.patch similarity index 100% rename from patches/unapplied/api/0055-PlayerAttemptPickupItemEvent.patch rename to patches/api/0055-PlayerAttemptPickupItemEvent.patch diff --git a/patches/unapplied/api/0056-Add-UnknownCommandEvent.patch b/patches/api/0056-Add-UnknownCommandEvent.patch similarity index 100% rename from patches/unapplied/api/0056-Add-UnknownCommandEvent.patch rename to patches/api/0056-Add-UnknownCommandEvent.patch diff --git a/patches/unapplied/api/0057-Basic-PlayerProfile-API.patch b/patches/api/0057-Basic-PlayerProfile-API.patch similarity index 100% rename from patches/unapplied/api/0057-Basic-PlayerProfile-API.patch rename to patches/api/0057-Basic-PlayerProfile-API.patch diff --git a/patches/unapplied/api/0058-PlayerPickupItemEvent-setFlyAtPlayer.patch b/patches/api/0058-PlayerPickupItemEvent-setFlyAtPlayer.patch similarity index 100% rename from patches/unapplied/api/0058-PlayerPickupItemEvent-setFlyAtPlayer.patch rename to patches/api/0058-PlayerPickupItemEvent-setFlyAtPlayer.patch diff --git a/patches/unapplied/api/0059-Shoulder-Entities-Release-API.patch b/patches/api/0059-Shoulder-Entities-Release-API.patch similarity index 100% rename from patches/unapplied/api/0059-Shoulder-Entities-Release-API.patch rename to patches/api/0059-Shoulder-Entities-Release-API.patch diff --git a/patches/unapplied/api/0060-Entity-fromMobSpawner.patch b/patches/api/0060-Entity-fromMobSpawner.patch similarity index 88% rename from patches/unapplied/api/0060-Entity-fromMobSpawner.patch rename to patches/api/0060-Entity-fromMobSpawner.patch index 222a4c507..aef8fc6c0 100644 --- a/patches/unapplied/api/0060-Entity-fromMobSpawner.patch +++ b/patches/api/0060-Entity-fromMobSpawner.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 7e0ec58ea1d23501f0273882ebae8e45513b02cf..d794ed97bd14c67584af9190bad7d0cd07001b05 100644 +index 65088203d29798efe211612dfadb356f457ed466..71f519b8f03d2a52f2c5a9283a18c74c1ca52328 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -673,5 +673,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent diff --git a/patches/unapplied/api/0061-Profile-Lookup-Events.patch b/patches/api/0061-Profile-Lookup-Events.patch similarity index 100% rename from patches/unapplied/api/0061-Profile-Lookup-Events.patch rename to patches/api/0061-Profile-Lookup-Events.patch diff --git a/patches/unapplied/api/0062-Improve-the-Saddle-API-for-Horses.patch b/patches/api/0062-Improve-the-Saddle-API-for-Horses.patch similarity index 100% rename from patches/unapplied/api/0062-Improve-the-Saddle-API-for-Horses.patch rename to patches/api/0062-Improve-the-Saddle-API-for-Horses.patch diff --git a/patches/unapplied/api/0063-Add-getI18NDisplayName-API.patch b/patches/api/0063-Add-getI18NDisplayName-API.patch similarity index 100% rename from patches/unapplied/api/0063-Add-getI18NDisplayName-API.patch rename to patches/api/0063-Add-getI18NDisplayName-API.patch diff --git a/patches/unapplied/api/0064-ensureServerConversions-API.patch b/patches/api/0064-ensureServerConversions-API.patch similarity index 100% rename from patches/unapplied/api/0064-ensureServerConversions-API.patch rename to patches/api/0064-ensureServerConversions-API.patch diff --git a/patches/unapplied/api/0065-Make-plugins-list-alphabetical.patch b/patches/api/0065-Make-plugins-list-alphabetical.patch similarity index 100% rename from patches/unapplied/api/0065-Make-plugins-list-alphabetical.patch rename to patches/api/0065-Make-plugins-list-alphabetical.patch diff --git a/patches/unapplied/api/0066-LivingEntity-setKiller.patch b/patches/api/0066-LivingEntity-setKiller.patch similarity index 100% rename from patches/unapplied/api/0066-LivingEntity-setKiller.patch rename to patches/api/0066-LivingEntity-setKiller.patch diff --git a/patches/unapplied/api/0067-ProfileWhitelistVerifyEvent.patch b/patches/api/0067-ProfileWhitelistVerifyEvent.patch similarity index 100% rename from patches/unapplied/api/0067-ProfileWhitelistVerifyEvent.patch rename to patches/api/0067-ProfileWhitelistVerifyEvent.patch diff --git a/patches/unapplied/api/0068-Allow-plugins-to-use-SLF4J-for-logging.patch b/patches/api/0068-Allow-plugins-to-use-SLF4J-for-logging.patch similarity index 95% rename from patches/unapplied/api/0068-Allow-plugins-to-use-SLF4J-for-logging.patch rename to patches/api/0068-Allow-plugins-to-use-SLF4J-for-logging.patch index e61970e72..85a37f448 100644 --- a/patches/unapplied/api/0068-Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/patches/api/0068-Allow-plugins-to-use-SLF4J-for-logging.patch @@ -14,7 +14,7 @@ it without having to shade it in the plugin and going through several layers of logging abstraction. diff --git a/build.gradle.kts b/build.gradle.kts -index 533600dfb2e73736857cc2a10525db7dc2452433..02f80c9a34a23c2285a1e05b41f53b4bafc28c5a 100644 +index 283e2aefa17fe38ab10073761db2b77ba0ae8b46..0446e0131198ecd6d6d1e381eec5bbab18031b62 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -37,6 +37,8 @@ dependencies { diff --git a/patches/unapplied/api/0069-Handle-plugin-prefixes-in-implementation-logging-con.patch b/patches/api/0069-Handle-plugin-prefixes-in-implementation-logging-con.patch similarity index 100% rename from patches/unapplied/api/0069-Handle-plugin-prefixes-in-implementation-logging-con.patch rename to patches/api/0069-Handle-plugin-prefixes-in-implementation-logging-con.patch diff --git a/patches/unapplied/api/0070-Add-PlayerJumpEvent.patch b/patches/api/0070-Add-PlayerJumpEvent.patch similarity index 100% rename from patches/unapplied/api/0070-Add-PlayerJumpEvent.patch rename to patches/api/0070-Add-PlayerJumpEvent.patch diff --git a/patches/unapplied/api/0071-Add-workaround-for-plugins-modifying-the-parent-of-t.patch b/patches/api/0071-Add-workaround-for-plugins-modifying-the-parent-of-t.patch similarity index 100% rename from patches/unapplied/api/0071-Add-workaround-for-plugins-modifying-the-parent-of-t.patch rename to patches/api/0071-Add-workaround-for-plugins-modifying-the-parent-of-t.patch diff --git a/patches/unapplied/api/0072-Add-PlayerArmorChangeEvent.patch b/patches/api/0072-Add-PlayerArmorChangeEvent.patch similarity index 100% rename from patches/unapplied/api/0072-Add-PlayerArmorChangeEvent.patch rename to patches/api/0072-Add-PlayerArmorChangeEvent.patch diff --git a/patches/unapplied/api/0073-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/api/0073-API-to-get-a-BlockState-without-a-snapshot.patch similarity index 100% rename from patches/unapplied/api/0073-API-to-get-a-BlockState-without-a-snapshot.patch rename to patches/api/0073-API-to-get-a-BlockState-without-a-snapshot.patch diff --git a/patches/unapplied/api/0074-AsyncTabCompleteEvent.patch b/patches/api/0074-AsyncTabCompleteEvent.patch similarity index 100% rename from patches/unapplied/api/0074-AsyncTabCompleteEvent.patch rename to patches/api/0074-AsyncTabCompleteEvent.patch diff --git a/patches/unapplied/api/0075-Expose-client-protocol-version-and-virtual-host.patch b/patches/api/0075-Expose-client-protocol-version-and-virtual-host.patch similarity index 100% rename from patches/unapplied/api/0075-Expose-client-protocol-version-and-virtual-host.patch rename to patches/api/0075-Expose-client-protocol-version-and-virtual-host.patch diff --git a/patches/unapplied/api/0076-Display-warning-on-deprecated-recipe-API.patch b/patches/api/0076-Display-warning-on-deprecated-recipe-API.patch similarity index 100% rename from patches/unapplied/api/0076-Display-warning-on-deprecated-recipe-API.patch rename to patches/api/0076-Display-warning-on-deprecated-recipe-API.patch diff --git a/patches/unapplied/api/0077-PlayerPickupExperienceEvent.patch b/patches/api/0077-PlayerPickupExperienceEvent.patch similarity index 100% rename from patches/unapplied/api/0077-PlayerPickupExperienceEvent.patch rename to patches/api/0077-PlayerPickupExperienceEvent.patch diff --git a/patches/unapplied/api/0078-ExperienceOrbMergeEvent.patch b/patches/api/0078-ExperienceOrbMergeEvent.patch similarity index 100% rename from patches/unapplied/api/0078-ExperienceOrbMergeEvent.patch rename to patches/api/0078-ExperienceOrbMergeEvent.patch diff --git a/patches/unapplied/api/0079-Ability-to-apply-mending-to-XP-API.patch b/patches/api/0079-Ability-to-apply-mending-to-XP-API.patch similarity index 95% rename from patches/unapplied/api/0079-Ability-to-apply-mending-to-XP-API.patch rename to patches/api/0079-Ability-to-apply-mending-to-XP-API.patch index af3468220..582c21493 100644 --- a/patches/unapplied/api/0079-Ability-to-apply-mending-to-XP-API.patch +++ b/patches/api/0079-Ability-to-apply-mending-to-XP-API.patch @@ -10,7 +10,7 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index b4c7f2d6de64d32804c8630f0ea1563a876b3510..96f1f1544d03d2928e95daa0dd02579ef3fdc87c 100644 +index a0782b81e787630cb45b38a863f1e98506014735..8d5ddb1451ea1d7a7a5c9eefb843a4adb885d20e 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -985,12 +985,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM diff --git a/patches/unapplied/api/0080-PreCreatureSpawnEvent.patch b/patches/api/0080-PreCreatureSpawnEvent.patch similarity index 100% rename from patches/unapplied/api/0080-PreCreatureSpawnEvent.patch rename to patches/api/0080-PreCreatureSpawnEvent.patch diff --git a/patches/unapplied/api/0081-PlayerNaturallySpawnCreaturesEvent.patch b/patches/api/0081-PlayerNaturallySpawnCreaturesEvent.patch similarity index 100% rename from patches/unapplied/api/0081-PlayerNaturallySpawnCreaturesEvent.patch rename to patches/api/0081-PlayerNaturallySpawnCreaturesEvent.patch diff --git a/patches/unapplied/api/0082-Add-setPlayerProfile-API-for-Skulls.patch b/patches/api/0082-Add-setPlayerProfile-API-for-Skulls.patch similarity index 100% rename from patches/unapplied/api/0082-Add-setPlayerProfile-API-for-Skulls.patch rename to patches/api/0082-Add-setPlayerProfile-API-for-Skulls.patch diff --git a/patches/unapplied/api/0083-Fill-Profile-Property-Events.patch b/patches/api/0083-Fill-Profile-Property-Events.patch similarity index 100% rename from patches/unapplied/api/0083-Fill-Profile-Property-Events.patch rename to patches/api/0083-Fill-Profile-Property-Events.patch diff --git a/patches/unapplied/api/0084-PlayerAdvancementCriterionGrantEvent.patch b/patches/api/0084-PlayerAdvancementCriterionGrantEvent.patch similarity index 100% rename from patches/unapplied/api/0084-PlayerAdvancementCriterionGrantEvent.patch rename to patches/api/0084-PlayerAdvancementCriterionGrantEvent.patch diff --git a/patches/unapplied/api/0085-Add-ArmorStand-Item-Meta.patch b/patches/api/0085-Add-ArmorStand-Item-Meta.patch similarity index 100% rename from patches/unapplied/api/0085-Add-ArmorStand-Item-Meta.patch rename to patches/api/0085-Add-ArmorStand-Item-Meta.patch diff --git a/patches/unapplied/api/0086-Optimize-Hoppers.patch b/patches/api/0086-Optimize-Hoppers.patch similarity index 100% rename from patches/unapplied/api/0086-Optimize-Hoppers.patch rename to patches/api/0086-Optimize-Hoppers.patch diff --git a/patches/unapplied/api/0087-Tameable-getOwnerUniqueId-API.patch b/patches/api/0087-Tameable-getOwnerUniqueId-API.patch similarity index 100% rename from patches/unapplied/api/0087-Tameable-getOwnerUniqueId-API.patch rename to patches/api/0087-Tameable-getOwnerUniqueId-API.patch diff --git a/patches/unapplied/api/0088-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/patches/api/0088-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch similarity index 100% rename from patches/unapplied/api/0088-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch rename to patches/api/0088-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch diff --git a/patches/unapplied/api/0089-Add-extended-PaperServerListPingEvent.patch b/patches/api/0089-Add-extended-PaperServerListPingEvent.patch similarity index 100% rename from patches/unapplied/api/0089-Add-extended-PaperServerListPingEvent.patch rename to patches/api/0089-Add-extended-PaperServerListPingEvent.patch diff --git a/patches/unapplied/api/0090-Player.setPlayerProfile-API.patch b/patches/api/0090-Player.setPlayerProfile-API.patch similarity index 100% rename from patches/unapplied/api/0090-Player.setPlayerProfile-API.patch rename to patches/api/0090-Player.setPlayerProfile-API.patch diff --git a/patches/unapplied/api/0091-getPlayerUniqueId-API.patch b/patches/api/0091-getPlayerUniqueId-API.patch similarity index 91% rename from patches/unapplied/api/0091-getPlayerUniqueId-API.patch rename to patches/api/0091-getPlayerUniqueId-API.patch index 7eaec18b6..701f46719 100644 --- a/patches/unapplied/api/0091-getPlayerUniqueId-API.patch +++ b/patches/api/0091-getPlayerUniqueId-API.patch @@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index befd34cfdd37451532f14feeba5e728d3f86751a..c85fc0cb1c4927fe637f20a4e2499bce7707d633 100644 +index 6c7b1e172a9acc881ecade6543245e8a64e251f6..b0457e7740dda723b6eda481bcea3560d55333f1 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -559,6 +559,20 @@ public final class Bukkit { @@ -34,7 +34,7 @@ index befd34cfdd37451532f14feeba5e728d3f86751a..c85fc0cb1c4927fe637f20a4e2499bce * Gets the plugin manager for interfacing with plugins. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 89fc36a73b8ae26f19b06cb0f9376ec33724b939..1a80dad1fa0bf3f33f5669f846912092132f8d64 100644 +index 8021598d78170ea1676cf21bac63858528398f53..44a5e05fbc00aa878cd31879677d0aad779eb175 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -477,6 +477,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/unapplied/api/0092-Add-legacy-ping-support-to-PaperServerListPingEvent.patch b/patches/api/0092-Add-legacy-ping-support-to-PaperServerListPingEvent.patch similarity index 100% rename from patches/unapplied/api/0092-Add-legacy-ping-support-to-PaperServerListPingEvent.patch rename to patches/api/0092-Add-legacy-ping-support-to-PaperServerListPingEvent.patch diff --git a/patches/server/0079-Configurable-Grass-Spread-Tick-Rate.patch b/patches/server/0079-Configurable-Grass-Spread-Tick-Rate.patch index 8ed73812c..addc4636b 100644 --- a/patches/server/0079-Configurable-Grass-Spread-Tick-Rate.patch +++ b/patches/server/0079-Configurable-Grass-Spread-Tick-Rate.patch @@ -20,7 +20,7 @@ index a0688ef7eb38e7c156193db3d94c44a3c290d8f2..53692c9a72a75cb5280165a99c956679 + } } diff --git a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java -index 954defe131bdcd81178e3bd31755eb18b9aef026..be5ad056571f6522a205b8e9de8940ad1fe8c988 100644 +index 954defe131bdcd81178e3bd31755eb18b9aef026..29f4da5962bf596da7c557d9aa61677f5604b0a0 100644 --- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java @@ -3,6 +3,7 @@ package net.minecraft.world.level.block; @@ -31,13 +31,11 @@ index 954defe131bdcd81178e3bd31755eb18b9aef026..be5ad056571f6522a205b8e9de8940ad import net.minecraft.server.level.ServerLevel; import net.minecraft.tags.FluidTags; import net.minecraft.tags.Tag; -@@ -40,7 +41,8 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock { +@@ -40,6 +41,7 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock { @Override public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) { -- if (!SpreadingSnowyDirtBlock.canBeGrass(state, world, pos)) { + if (this instanceof GrassBlock && world.paperConfig.grassUpdateRate != 1 && (world.paperConfig.grassUpdateRate < 1 || (MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig.grassUpdateRate != 0)) { return; } // Paper -+ if (!SpreadingSnowyDirtBlock.canBeGrass(state, (LevelReader) world, pos)) { + if (!SpreadingSnowyDirtBlock.canBeGrass(state, world, pos)) { // CraftBukkit start if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.DIRT.defaultBlockState()).isCancelled()) { - return; diff --git a/patches/server/0098-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch b/patches/server/0098-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch index 301307622..3b713c18d 100644 --- a/patches/server/0098-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch +++ b/patches/server/0098-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch @@ -22,7 +22,7 @@ index 7de279a1bef44a76173a1b71b98425ca6aa219aa..2584c02a5f6511ade260986a6aacef40 double deltaZ = this.getZ() - player.getZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -index 6fde138a3da49fee4fdbf36e0ab58438e114e196..09c862ff597629bccd3bf98ef168aa96fb69d230 100644 +index 6fde138a3da49fee4fdbf36e0ab58438e114e196..4f9f64def9b5da5bd2714c5f3ba36a4339623758 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java @@ -272,8 +272,9 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -30,8 +30,9 @@ index 6fde138a3da49fee4fdbf36e0ab58438e114e196..09c862ff597629bccd3bf98ef168aa96 // CraftBukkit start - Use relative location for far away sounds // this.world.globalLevelEvent(1023, new BlockPosition(this), 0); - int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16; +- for (ServerPlayer player : (List) MinecraftServer.getServer().getPlayerList().players) { + //int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API - for (ServerPlayer player : (List) MinecraftServer.getServer().getPlayerList().players) { ++ for (ServerPlayer player : (List)this.level.players()) { // Paper + final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch double deltaX = this.getX() - player.getX(); double deltaZ = this.getZ() - player.getZ(); diff --git a/patches/unapplied/server/0140-PlayerPickupItemEvent-setFlyAtPlayer.patch b/patches/server/0138-PlayerPickupItemEvent-setFlyAtPlayer.patch similarity index 88% rename from patches/unapplied/server/0140-PlayerPickupItemEvent-setFlyAtPlayer.patch rename to patches/server/0138-PlayerPickupItemEvent-setFlyAtPlayer.patch index fd524d843..5cfbdc55d 100644 --- a/patches/unapplied/server/0140-PlayerPickupItemEvent-setFlyAtPlayer.patch +++ b/patches/server/0138-PlayerPickupItemEvent-setFlyAtPlayer.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer 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 9611388a6aeebb86b19d89c526f53dfed4d3ed27..d17af2ec8f72bf0cbe5928e7a83c06ba5ad4503d 100644 +index 6df6204c9d4099afeb8ff07dd747f756d8e380d6..68fdfba22ebb35023299c776d4764d4f1555f435 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -379,6 +379,7 @@ public class ItemEntity extends Entity { +@@ -378,6 +378,7 @@ public class ItemEntity extends Entity { // CraftBukkit start - fire PlayerPickupItemEvent int canHold = player.getInventory().canHold(itemstack); int remaining = i - canHold; @@ -16,7 +16,7 @@ index 9611388a6aeebb86b19d89c526f53dfed4d3ed27..d17af2ec8f72bf0cbe5928e7a83c06ba if (this.pickupDelay <= 0 && canHold > 0) { itemstack.setCount(canHold); -@@ -386,8 +387,14 @@ public class ItemEntity extends Entity { +@@ -385,8 +386,14 @@ public class ItemEntity extends Entity { PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems()); this.level.getCraftServer().getPluginManager().callEvent(playerEvent); @@ -31,7 +31,7 @@ index 9611388a6aeebb86b19d89c526f53dfed4d3ed27..d17af2ec8f72bf0cbe5928e7a83c06ba return; } -@@ -417,7 +424,11 @@ public class ItemEntity extends Entity { +@@ -416,7 +423,11 @@ public class ItemEntity extends Entity { // CraftBukkit end if (this.pickupDelay == 0 && (this.owner == null || this.owner.equals(player.getUUID())) && player.getInventory().add(itemstack)) { diff --git a/patches/unapplied/server/0141-PlayerAttemptPickupItemEvent.patch b/patches/server/0139-PlayerAttemptPickupItemEvent.patch similarity index 88% rename from patches/unapplied/server/0141-PlayerAttemptPickupItemEvent.patch rename to patches/server/0139-PlayerAttemptPickupItemEvent.patch index 34d1b804a..c026ee987 100644 --- a/patches/unapplied/server/0141-PlayerAttemptPickupItemEvent.patch +++ b/patches/server/0139-PlayerAttemptPickupItemEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent 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 d17af2ec8f72bf0cbe5928e7a83c06ba5ad4503d..54025e401eb02fceb47afb182f0ede620ca23a8d 100644 +index 68fdfba22ebb35023299c776d4764d4f1555f435..db42d22f58df5daefc41720206405dda4f7ad633 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -37,6 +37,7 @@ import net.minecraft.stats.Stats; +@@ -36,6 +36,7 @@ import net.minecraft.util.Mth; import org.bukkit.event.entity.EntityPickupItemEvent; import org.bukkit.event.player.PlayerPickupItemEvent; // CraftBukkit end @@ -16,7 +16,7 @@ index d17af2ec8f72bf0cbe5928e7a83c06ba5ad4503d..54025e401eb02fceb47afb182f0ede62 public class ItemEntity extends Entity { -@@ -381,6 +382,22 @@ public class ItemEntity extends Entity { +@@ -380,6 +381,22 @@ public class ItemEntity extends Entity { int remaining = i - canHold; boolean flyAtPlayer = false; // Paper diff --git a/patches/unapplied/server/0142-Add-UnknownCommandEvent.patch b/patches/server/0140-Add-UnknownCommandEvent.patch similarity index 87% rename from patches/unapplied/server/0142-Add-UnknownCommandEvent.patch rename to patches/server/0140-Add-UnknownCommandEvent.patch index 4e5e0b9c5..ff9e062af 100644 --- a/patches/unapplied/server/0142-Add-UnknownCommandEvent.patch +++ b/patches/server/0140-Add-UnknownCommandEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add UnknownCommandEvent diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 696e2495ee8046c78ed53126db0e6c696c77c00d..e01f800130f183bf10a383e298b7da3d5f11e3a2 100644 +index de85382893132efa9c60e0c9bb0f07faaf6f442c..21b7620eb13cc297acecd7dcb2ba22fab028983a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -817,7 +817,13 @@ public final class CraftServer implements Server { +@@ -826,7 +826,13 @@ public final class CraftServer implements Server { // Spigot start if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) { diff --git a/patches/unapplied/server/0143-Basic-PlayerProfile-API.patch b/patches/server/0141-Basic-PlayerProfile-API.patch similarity index 96% rename from patches/unapplied/server/0143-Basic-PlayerProfile-API.patch rename to patches/server/0141-Basic-PlayerProfile-API.patch index b1f7472bb..ecb4ddda3 100644 --- a/patches/unapplied/server/0143-Basic-PlayerProfile-API.patch +++ b/patches/server/0141-Basic-PlayerProfile-API.patch @@ -315,7 +315,7 @@ index 0000000000000000000000000000000000000000..84551164b76bc8f064a3a0c030c3a1b4 +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java new file mode 100644 -index 0000000000000000000000000000000000000000..d64d45eb01c65864fca1077982d89bc05e0f811b +index 0000000000000000000000000000000000000000..1459a1f99fe614d072a087cda18788cf13102645 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java @@ -0,0 +1,31 @@ @@ -332,7 +332,7 @@ index 0000000000000000000000000000000000000000..d64d45eb01c65864fca1077982d89bc0 + private final Environment environment; + public PaperAuthenticationService(Proxy proxy) { + super(proxy); -+ this.environment = (Environment)EnvironmentParser.getEnvironmentFromProperties().orElse(YggdrasilEnvironment.PROD);; ++ this.environment = EnvironmentParser.getEnvironmentFromProperties().orElse(YggdrasilEnvironment.PROD.getEnvironment()); + } + + @Override @@ -429,7 +429,7 @@ index 0000000000000000000000000000000000000000..3cdd06d3af7ff94f1fe1a11b9a9275e1 + } +} diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index f0fed1d2c297d8d2a6903d2caa219b458c5e43c2..aa96017819712f42e16c7eac57222301600b66a5 100644 +index ff4def7ec3dcfa30fdc0135bd1add8e47989fb36..4f45ac04a219e619c13b31befd2c4e452057079c 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -1,5 +1,7 @@ @@ -460,10 +460,10 @@ index f0fed1d2c297d8d2a6903d2caa219b458c5e43c2..aa96017819712f42e16c7eac57222301 * Calculates distance between 2 entities * @param e1 diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index c8385460701395cb5c65fba41335469ffb2d9b9a..fb0b3c5770f66cc3590f5ac4e690a33cb6179be3 100644 +index a497b281d03c097587b21e9f141a6a66f36e4dad..4ab820c43ddc79f5a280e2d4b322a667b9ba725f 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -130,7 +130,7 @@ public class Main { +@@ -135,7 +135,7 @@ public class Main { } File file = (File) optionset.valueOf("universe"); // CraftBukkit @@ -473,7 +473,7 @@ index c8385460701395cb5c65fba41335469ffb2d9b9a..fb0b3c5770f66cc3590f5ac4e690a33c GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository(); GameProfileCache usercache = new GameProfileCache(gameprofilerepository, new File(file, MinecraftServer.USERID_CACHE_FILE.getName())); diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java -index 6e1b7d5b20e9f6ed1b650eb9d6ac9f8c4867b4b7..61405c2b53e03a4b83e2c70c6e4d3739ca9676cb 100644 +index 00f783aafd81fa7e836e4eea5bfeac7434f33b0f..3789441e2df9410aa1c6efe59054aaba2c738633 100644 --- a/src/main/java/net/minecraft/server/players/GameProfileCache.java +++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java @@ -135,6 +135,13 @@ public class GameProfileCache { @@ -491,10 +491,10 @@ index 6e1b7d5b20e9f6ed1b650eb9d6ac9f8c4867b4b7..61405c2b53e03a4b83e2c70c6e4d3739 String s1 = name.toLowerCase(Locale.ROOT); GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e01f800130f183bf10a383e298b7da3d5f11e3a2..a337967295f61f4892a2ae7dd65aeaba75a06172 100644 +index 21b7620eb13cc297acecd7dcb2ba22fab028983a..a48067a7cc48c375854d443e483398c0c1f65e05 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -246,6 +246,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; +@@ -250,6 +250,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; import net.md_5.bungee.api.chat.BaseComponent; // Spigot @@ -504,7 +504,7 @@ index e01f800130f183bf10a383e298b7da3d5f11e3a2..a337967295f61f4892a2ae7dd65aeaba public final class CraftServer implements Server { private final String serverName = "Paper"; // Paper private final String serverVersion; -@@ -2494,5 +2497,24 @@ public final class CraftServer implements Server { +@@ -2506,5 +2509,24 @@ public final class CraftServer implements Server { public boolean suggestPlayerNamesWhenNullTabCompletions() { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/patches/unapplied/server/0144-Shoulder-Entities-Release-API.patch b/patches/server/0142-Shoulder-Entities-Release-API.patch similarity index 86% rename from patches/unapplied/server/0144-Shoulder-Entities-Release-API.patch rename to patches/server/0142-Shoulder-Entities-Release-API.patch index 60877715d..c27bdd431 100644 --- a/patches/unapplied/server/0144-Shoulder-Entities-Release-API.patch +++ b/patches/server/0142-Shoulder-Entities-Release-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API 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 a4eb5de429f6934cf6f2b771d62db51e328f8987..193d73c53c7c3cc31246dd19c6d7ff4cb39cac1b 100644 +index 6da451d587c419ffead981876731b847ce3e81db..b7b4b4b3e3fbebd359f5ea199151a0d5978c47b3 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1951,20 +1951,44 @@ public abstract class Player extends LivingEntity { +@@ -1949,20 +1949,44 @@ public abstract class Player extends LivingEntity { } @@ -43,11 +43,11 @@ index a4eb5de429f6934cf6f2b771d62db51e328f8987..193d73c53c7c3cc31246dd19c6d7ff4c } entity.setPos(this.getX(), this.getY() + 0.699999988079071D, this.getZ()); -- return ((ServerLevel) this.level).addEntitySerialized(entity, CreatureSpawnEvent.SpawnReason.SHOULDER_ENTITY); // CraftBukkit +- return ((ServerLevel) this.level).addWithUUID(entity, CreatureSpawnEvent.SpawnReason.SHOULDER_ENTITY); // CraftBukkit - }).orElse(true); // CraftBukkit -+ boolean addedToWorld = ((ServerLevel) this.level).addEntitySerialized(entity, CreatureSpawnEvent.SpawnReason.SHOULDER_ENTITY); // CraftBukkit ++ boolean addedToWorld = ((ServerLevel) this.level).addWithUUID(entity, CreatureSpawnEvent.SpawnReason.SHOULDER_ENTITY); // CraftBukkit + return addedToWorld ? entity : null; -+ }).orElse(null); // CraftBukkit // Paper - false -> null ++ }).orElse(null); // CraftBukkit // Paper - true -> null } - return true; // CraftBukkit @@ -58,7 +58,7 @@ index a4eb5de429f6934cf6f2b771d62db51e328f8987..193d73c53c7c3cc31246dd19c6d7ff4c @Override public abstract boolean isSpectator(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 841dbf4a86b19d7c8ea41930ecb1f88c660fa117..54947f02f29dd3dc546ee0d0f4600630242f003d 100644 +index afb71ae8bd5f417f6cd99e26c3b45e5b544beb21..cc1caa32ea430f69d0dcfb76e1a08fb78650877d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -500,6 +500,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/patches/unapplied/server/0145-Profile-Lookup-Events.patch b/patches/server/0143-Profile-Lookup-Events.patch similarity index 100% rename from patches/unapplied/server/0145-Profile-Lookup-Events.patch rename to patches/server/0143-Profile-Lookup-Events.patch diff --git a/patches/unapplied/server/0146-Block-player-logins-during-server-shutdown.patch b/patches/server/0144-Block-player-logins-during-server-shutdown.patch similarity index 92% rename from patches/unapplied/server/0146-Block-player-logins-during-server-shutdown.patch rename to patches/server/0144-Block-player-logins-during-server-shutdown.patch index 580ab5cfa..430822fa0 100644 --- a/patches/unapplied/server/0146-Block-player-logins-during-server-shutdown.patch +++ b/patches/server/0144-Block-player-logins-during-server-shutdown.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Block player logins during server shutdown diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index a60b40d8cc802456374625af216c27998f8348b3..ab3409dd3a7671b46cba210cfa326311d10a7ef4 100644 +index 58617412e4759fe6c1c975f352c0c8281b744de1..bf2dbc99a9b9580816d6a51e2774f8cde2989eef 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -69,6 +69,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener diff --git a/patches/unapplied/server/0147-Entity-fromMobSpawner.patch b/patches/server/0145-Entity-fromMobSpawner.patch similarity index 84% rename from patches/unapplied/server/0147-Entity-fromMobSpawner.patch rename to patches/server/0145-Entity-fromMobSpawner.patch index 62491676a..a1b9142eb 100644 --- a/patches/unapplied/server/0147-Entity-fromMobSpawner.patch +++ b/patches/server/0145-Entity-fromMobSpawner.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index bf52f5f9b13e8b4eb3c7ee19b0e57bb872d2af1d..3b2334e9ba44205a4e0ec12045eab4fad91bb15a 100644 +index 4f1add992cef7bfa194a9e464ae9ea56eab1f191..31c502705ed3daef86df6e81215c0c7f9e8d22f8 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -322,6 +322,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -326,6 +326,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; public long activatedTick = Integer.MIN_VALUE; @@ -16,7 +16,7 @@ index bf52f5f9b13e8b4eb3c7ee19b0e57bb872d2af1d..3b2334e9ba44205a4e0ec12045eab4fa protected int numCollisions = 0; // Paper public void inactiveTick() { } // Spigot end -@@ -1868,6 +1869,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -1897,6 +1898,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ())); } @@ -27,7 +27,7 @@ index bf52f5f9b13e8b4eb3c7ee19b0e57bb872d2af1d..3b2334e9ba44205a4e0ec12045eab4fa // Paper end return nbt; } catch (Throwable throwable) { -@@ -2007,6 +2012,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -2036,6 +2041,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i this.originWorld = originWorld; origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2)); } @@ -37,10 +37,10 @@ index bf52f5f9b13e8b4eb3c7ee19b0e57bb872d2af1d..3b2334e9ba44205a4e0ec12045eab4fa } 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 65744b55f06c225745e3e145e5f5e60ebefd304c..e720c751518af3f38fba0c1b22e4c01a46561b00 100644 +index 840a47fdfa67b166bbafd5d7958462b32fb26681..49fc9fc724a59e53527ac9fbea8ea605f42a117c 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -167,6 +167,7 @@ public abstract class BaseSpawner { +@@ -157,6 +157,7 @@ public abstract class BaseSpawner { } // Spigot End } diff --git a/patches/unapplied/server/0148-Improve-the-Saddle-API-for-Horses.patch b/patches/server/0146-Improve-the-Saddle-API-for-Horses.patch similarity index 96% rename from patches/unapplied/server/0148-Improve-the-Saddle-API-for-Horses.patch rename to patches/server/0146-Improve-the-Saddle-API-for-Horses.patch index 4f3f3977f..ca612caa3 100644 --- a/patches/unapplied/server/0148-Improve-the-Saddle-API-for-Horses.patch +++ b/patches/server/0146-Improve-the-Saddle-API-for-Horses.patch @@ -7,7 +7,7 @@ Not all horses with Saddles have armor. This lets us break up the horses with sa and access their saddle state separately from an interface shared with Armor. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java -index 6f473dbf949552afd288382b36223ea036eaa857..27a1ca43792644fc239af81dea5510f25d3328e9 100644 +index 5edd8c38a4a73c1d4a6314159eea99b3881f8eeb..6151df2086d92fd5f428e2efe0df8d1c154ff891 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java @@ -5,6 +5,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes; diff --git a/patches/unapplied/server/0149-Implement-ensureServerConversions-API.patch b/patches/server/0147-Implement-ensureServerConversions-API.patch similarity index 100% rename from patches/unapplied/server/0149-Implement-ensureServerConversions-API.patch rename to patches/server/0147-Implement-ensureServerConversions-API.patch diff --git a/patches/unapplied/server/0150-Implement-getI18NDisplayName.patch b/patches/server/0148-Implement-getI18NDisplayName.patch similarity index 100% rename from patches/unapplied/server/0150-Implement-getI18NDisplayName.patch rename to patches/server/0148-Implement-getI18NDisplayName.patch diff --git a/patches/unapplied/server/0151-ProfileWhitelistVerifyEvent.patch b/patches/server/0149-ProfileWhitelistVerifyEvent.patch similarity index 97% rename from patches/unapplied/server/0151-ProfileWhitelistVerifyEvent.patch rename to patches/server/0149-ProfileWhitelistVerifyEvent.patch index 7cd51b90d..bd87ae2ff 100644 --- a/patches/unapplied/server/0151-ProfileWhitelistVerifyEvent.patch +++ b/patches/server/0149-ProfileWhitelistVerifyEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 0eea43c994e76b466fdda8ecd145d0b1c9273cea..17f56157d60d33695c4eac0e4fc94120a2101214 100644 +index 61086dbcd852bdb2e5b6083ae8781a5265db7829..4f56bb45b9bdaf3de02c5f331760339f4397eafc 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -615,9 +615,9 @@ public abstract class PlayerList { diff --git a/patches/unapplied/server/0152-Fix-this-stupid-bullshit.patch b/patches/server/0150-Fix-this-stupid-bullshit.patch similarity index 89% rename from patches/unapplied/server/0152-Fix-this-stupid-bullshit.patch rename to patches/server/0150-Fix-this-stupid-bullshit.patch index 4e41b743b..977394298 100644 --- a/patches/unapplied/server/0152-Fix-this-stupid-bullshit.patch +++ b/patches/server/0150-Fix-this-stupid-bullshit.patch @@ -9,10 +9,10 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa and to provide some level of hint without being disruptive. diff --git a/src/main/java/net/minecraft/server/Bootstrap.java b/src/main/java/net/minecraft/server/Bootstrap.java -index c7d5018cb6acef12e6da90626c75543ac279a101..64576ddd8363be55755fa50d1c16d95e4e02402d 100644 +index bf42e5687935022fe5bcb1ed40bab09bfe189e88..b111200a8f5d3255de29c9836f70fc7ffd003c6e 100644 --- a/src/main/java/net/minecraft/server/Bootstrap.java +++ b/src/main/java/net/minecraft/server/Bootstrap.java -@@ -42,7 +42,7 @@ public class Bootstrap { +@@ -48,7 +48,7 @@ public class Bootstrap { public static void bootStrap() { if (!Bootstrap.isBootstrapped) { // CraftBukkit start @@ -21,7 +21,7 @@ index c7d5018cb6acef12e6da90626c75543ac279a101..64576ddd8363be55755fa50d1c16d95e switch (name) { case "DispenserRegistry": break; -@@ -56,7 +56,7 @@ public class Bootstrap { +@@ -62,7 +62,7 @@ public class Bootstrap { System.err.println("*** WARNING: This server jar is unsupported, use at your own risk. ***"); System.err.println("**********************************************************************"); break; @@ -31,12 +31,12 @@ index c7d5018cb6acef12e6da90626c75543ac279a101..64576ddd8363be55755fa50d1c16d95e Bootstrap.isBootstrapped = true; if (Registry.REGISTRY.keySet().isEmpty()) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index bbf552bf586de94d8dfc5fb1c18e0af6f75aebe1..1da136f365664d4f8ace3d2d135b19eb97e55304 100644 +index 29e4b0282bd85c55700c07480b6c8911a1708dad..cd75c62770f872a5c270f63adfe3016156e2efc9 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -228,10 +228,12 @@ public class Main { Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -28); + deadline.add(Calendar.DAY_OF_YEAR, -7); if (buildDate.before(deadline.getTime())) { - System.err.println("*** Error, this build is outdated ***"); + // Paper start - This is some stupid bullshit diff --git a/patches/unapplied/server/0153-LivingEntity-setKiller.patch b/patches/server/0151-LivingEntity-setKiller.patch similarity index 94% rename from patches/unapplied/server/0153-LivingEntity-setKiller.patch rename to patches/server/0151-LivingEntity-setKiller.patch index dd3fcb3f3..c8eb4f672 100644 --- a/patches/unapplied/server/0153-LivingEntity-setKiller.patch +++ b/patches/server/0151-LivingEntity-setKiller.patch @@ -5,7 +5,7 @@ Subject: [PATCH] LivingEntity#setKiller diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index e955126fc82dfcdadb824c8d2d15e8b1f33bc67f..90b70935242757b5c302bac7777eb1428d69619e 100644 +index b65d44780c7e6e1e2e8724df838d1aa54edcc30a..6455a81fea0de79173419587171b5ed025c30592 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -8,6 +8,7 @@ import java.util.Iterator; diff --git a/patches/unapplied/server/0154-Ocelot-despawns-should-honor-nametags-and-leash.patch b/patches/server/0152-Ocelot-despawns-should-honor-nametags-and-leash.patch similarity index 68% rename from patches/unapplied/server/0154-Ocelot-despawns-should-honor-nametags-and-leash.patch rename to patches/server/0152-Ocelot-despawns-should-honor-nametags-and-leash.patch index 99b191f93..3b58fc5d9 100644 --- a/patches/unapplied/server/0154-Ocelot-despawns-should-honor-nametags-and-leash.patch +++ b/patches/server/0152-Ocelot-despawns-should-honor-nametags-and-leash.patch @@ -5,15 +5,15 @@ Subject: [PATCH] Ocelot despawns should honor nametags and leash diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java -index b223b54c80bdc2c9b620e5c9e44cab0c9abdd44c..49122e7baa5c0cd3691bcb48176fdefbdb79026b 100644 +index b18546b6816ee77f1458a7ca44b32f76c33f2fe9..a781048b0c43e63e441e6afecec125d7f838c342 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java +++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java -@@ -133,7 +133,7 @@ public class Ocelot extends Animal { +@@ -134,7 +134,7 @@ public class Ocelot extends Animal { @Override public boolean removeWhenFarAway(double distanceSquared) { -- return !this.isTrusting() /*&& this.ticksLived > 2400*/; // CraftBukkit -+ return !this.isTrusting() && !this.hasCustomName() && !this.isLeashed() /*&& this.ticksLived > 2400*/; // CraftBukkit // Paper - honor name and leash +- return !this.isTrusting() /*&& this.tickCount > 2400*/; // CraftBukkit ++ return !this.isTrusting() && !this.hasCustomName() && !this.isLeashed() /*&& this.tickCount > 2400*/; // CraftBukkit // Paper - honor name and leash } public static AttributeSupplier.Builder createAttributes() { diff --git a/patches/unapplied/server/0155-Reset-spawner-timer-when-spawner-event-is-cancelled.patch b/patches/server/0153-Reset-spawner-timer-when-spawner-event-is-cancelled.patch similarity index 84% rename from patches/unapplied/server/0155-Reset-spawner-timer-when-spawner-event-is-cancelled.patch rename to patches/server/0153-Reset-spawner-timer-when-spawner-event-is-cancelled.patch index 2a03c3c44..f9c66d553 100644 --- a/patches/unapplied/server/0155-Reset-spawner-timer-when-spawner-event-is-cancelled.patch +++ b/patches/server/0153-Reset-spawner-timer-when-spawner-event-is-cancelled.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset spawner timer when spawner event is cancelled diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index e720c751518af3f38fba0c1b22e4c01a46561b00..14188ac6f158b36755abe23c0a967763cf7367d8 100644 +index 49fc9fc724a59e53527ac9fbea8ea605f42a117c..802ff419ae74a16bcd570b996be2dd85e21ea3e8 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -168,6 +168,7 @@ public abstract class BaseSpawner { +@@ -158,6 +158,7 @@ public abstract class BaseSpawner { // Spigot End } entity.spawnedViaMobSpawner = true; // Paper @@ -16,7 +16,7 @@ index e720c751518af3f38fba0c1b22e4c01a46561b00..14188ac6f158b36755abe23c0a967763 // Spigot Start if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) { Entity vehicle = entity.getVehicle(); -@@ -191,7 +192,7 @@ public abstract class BaseSpawner { +@@ -181,7 +182,7 @@ public abstract class BaseSpawner { ((Mob) entity).spawnAnim(); } diff --git a/patches/unapplied/server/0156-Allow-specifying-a-custom-authentication-servers-dow.patch b/patches/server/0154-Allow-specifying-a-custom-authentication-servers-dow.patch similarity index 94% rename from patches/unapplied/server/0156-Allow-specifying-a-custom-authentication-servers-dow.patch rename to patches/server/0154-Allow-specifying-a-custom-authentication-servers-dow.patch index 4b6126377..a88aa9003 100644 --- a/patches/unapplied/server/0156-Allow-specifying-a-custom-authentication-servers-dow.patch +++ b/patches/server/0154-Allow-specifying-a-custom-authentication-servers-dow.patch @@ -27,10 +27,10 @@ index 7a69f9d9bb9c05474d8fbab22d626529a41a66a1..f4735cc330822183e098a67f2c0f00f2 + } } diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index ab3409dd3a7671b46cba210cfa326311d10a7ef4..82d0979e3239dddf3951df4a8b65ae7319d3d5b5 100644 +index bf2dbc99a9b9580816d6a51e2774f8cde2989eef..b057dfd42e9439cd8a2a2933b736f0581da53b85 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -297,6 +297,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener +@@ -298,6 +298,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener ServerLoginPacketListenerImpl.this.gameProfile = ServerLoginPacketListenerImpl.this.createFakeProfile(gameprofile); ServerLoginPacketListenerImpl.this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT; } else { diff --git a/patches/unapplied/server/0157-Handle-plugin-prefixes-using-Log4J-configuration.patch b/patches/server/0155-Handle-plugin-prefixes-using-Log4J-configuration.patch similarity index 95% rename from patches/unapplied/server/0157-Handle-plugin-prefixes-using-Log4J-configuration.patch rename to patches/server/0155-Handle-plugin-prefixes-using-Log4J-configuration.patch index 51d4906e6..78e3f21ca 100644 --- a/patches/unapplied/server/0157-Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/patches/server/0155-Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing the plugin logger. diff --git a/build.gradle.kts b/build.gradle.kts -index 9b70376813531718c02082633e9f8105f4879a63..fc8ffeea3e808eb1381f85972adffc614937ef6d 100644 +index ff067710300454ed284d38a75cd6b3e5f04cf794..ef5af1965d54e9ba9ff84d4f22ae77e4ccfa461c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,7 +25,7 @@ dependencies { @@ -26,7 +26,7 @@ index 9b70376813531718c02082633e9f8105f4879a63..fc8ffeea3e808eb1381f85972adffc61 + implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation // Paper end implementation("org.apache.logging.log4j:log4j-iostreams:2.14.1") // Paper - implementation("org.apache.logging.log4j:log4j-api:2.14.1") // Paper + implementation("org.ow2.asm:asm:9.2") diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java index f8a9d6a394f796634e4663ef4078a4c98447e13c..d73dfe72a54b621c0f944c90904df3e3bc709445 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java diff --git a/patches/unapplied/server/0158-Improve-Log4J-Configuration-Plugin-Loggers.patch b/patches/server/0156-Improve-Log4J-Configuration-Plugin-Loggers.patch similarity index 100% rename from patches/unapplied/server/0158-Improve-Log4J-Configuration-Plugin-Loggers.patch rename to patches/server/0156-Improve-Log4J-Configuration-Plugin-Loggers.patch diff --git a/patches/unapplied/server/0159-Add-PlayerJumpEvent.patch b/patches/server/0157-Add-PlayerJumpEvent.patch similarity index 94% rename from patches/unapplied/server/0159-Add-PlayerJumpEvent.patch rename to patches/server/0157-Add-PlayerJumpEvent.patch index 9a463aaf1..66b2f5053 100644 --- a/patches/unapplied/server/0159-Add-PlayerJumpEvent.patch +++ b/patches/server/0157-Add-PlayerJumpEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerJumpEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 41f1b355a8a90216964e89432244a7d6929c9152..7759bf2afb9edeaca24726aace9358a8d5eafc64 100644 +index 1eac0962c59fffe47a33903238f7f43e5f77450e..397a6e095c5aa5674d1ef5c3bb820e864cc88d1a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1174,7 +1174,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1173,7 +1173,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser boolean flag = d8 > 0.0D; if (this.player.isOnGround() && !packet.isOnGround() && flag) { diff --git a/patches/unapplied/server/0160-handle-PacketPlayInKeepAlive-async.patch b/patches/server/0158-handle-PacketPlayInKeepAlive-async.patch similarity index 92% rename from patches/unapplied/server/0160-handle-PacketPlayInKeepAlive-async.patch rename to patches/server/0158-handle-PacketPlayInKeepAlive-async.patch index 591fa7496..b640c1236 100644 --- a/patches/unapplied/server/0160-handle-PacketPlayInKeepAlive-async.patch +++ b/patches/server/0158-handle-PacketPlayInKeepAlive-async.patch @@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing random disconnections for clients. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 89588d6478ebd7d4892dceb03026dff89e1844db..7b6e6e646511bc47d2215c512b4d839b3f3a1c55 100644 +index 397a6e095c5aa5674d1ef5c3bb820e864cc88d1a..a0cd15635635074b88841a1b43c3a08b9f32e74f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2771,14 +2771,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -2776,14 +2776,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @Override public void handleKeepAlive(ServerboundKeepAlivePacket packet) { diff --git a/patches/unapplied/server/0161-Expose-client-protocol-version-and-virtual-host.patch b/patches/server/0159-Expose-client-protocol-version-and-virtual-host.patch similarity index 94% rename from patches/unapplied/server/0161-Expose-client-protocol-version-and-virtual-host.patch rename to patches/server/0159-Expose-client-protocol-version-and-virtual-host.patch index 8e44d3ae5..f096cd920 100644 --- a/patches/unapplied/server/0161-Expose-client-protocol-version-and-virtual-host.patch +++ b/patches/server/0159-Expose-client-protocol-version-and-virtual-host.patch @@ -60,7 +60,7 @@ index 0000000000000000000000000000000000000000..a5a7624f1f372a26b982836cd31cff15 + +} diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index b62e373445406ae84b37ec0570ebb1da02cff0b7..06e965996a5c50bce617847e594ae0dd83403484 100644 +index 7d177d38f3311ab941dd126c844d22e0018e25a1..84fe0f6cfc928d95d0967ad368a38afb71543af7 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java @@ -83,6 +83,10 @@ public class Connection extends SimpleChannelInboundHandler> { @@ -90,10 +90,10 @@ index c4ba069f5124ec151e05813beddf293fddc3b804..484221e5a9c246aa91e0eacef3911b0e @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4233f5ffa673801c57e3f929cd9ae919d6c7169f..e5e12d1672588138e4f56007fcdd14a1bb8ec1ca 100644 +index d475f9a3eb3b4e3c0ed78bef1d233dde26c391b9..5afc4c55c9ec8ed70b36a805b553613e18747c1f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -193,6 +193,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -199,6 +199,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } diff --git a/patches/unapplied/server/0162-revert-serverside-behavior-of-keepalives.patch b/patches/server/0160-revert-serverside-behavior-of-keepalives.patch similarity index 92% rename from patches/unapplied/server/0162-revert-serverside-behavior-of-keepalives.patch rename to patches/server/0160-revert-serverside-behavior-of-keepalives.patch index 7f7082413..33f96da52 100644 --- a/patches/unapplied/server/0162-revert-serverside-behavior-of-keepalives.patch +++ b/patches/server/0160-revert-serverside-behavior-of-keepalives.patch @@ -17,10 +17,10 @@ from networking or during connections flood of chunk packets on slower clients, at the cost of dead connections being kept open for longer. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 652703b1582e63148658a3a9d2604afa55674c23..cf42d59254f2786bfe8785249ad270d35996417a 100644 +index a0cd15635635074b88841a1b43c3a08b9f32e74f..7e80a929bc0ddcf94f27f4febedf10ad07a531ff 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -221,9 +221,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -220,9 +220,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser private final MinecraftServer server; public ServerPlayer player; private int tickCount; @@ -31,9 +31,9 @@ index 652703b1582e63148658a3a9d2604afa55674c23..cf42d59254f2786bfe8785249ad270d3 + private boolean keepAlivePending; + private long keepAliveChallenge; // CraftBukkit start - multithreaded fields - private AtomicInteger chatSpamTickCount = new AtomicInteger(); + private final AtomicInteger chatSpamTickCount = new AtomicInteger(); // CraftBukkit end -@@ -252,6 +252,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -251,6 +251,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser private int aboveGroundVehicleTickCount; private int receivedMovePacketCount; private int knownMovePacketCount; @@ -41,7 +41,7 @@ index 652703b1582e63148658a3a9d2604afa55674c23..cf42d59254f2786bfe8785249ad270d3 public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { this.server = server; -@@ -334,18 +335,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -333,18 +334,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser } this.server.getProfiler().push("keepAlive"); diff --git a/patches/unapplied/server/0163-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/patches/server/0161-Send-attack-SoundEffects-only-to-players-who-can-see.patch similarity index 88% rename from patches/unapplied/server/0163-Send-attack-SoundEffects-only-to-players-who-can-see.patch rename to patches/server/0161-Send-attack-SoundEffects-only-to-players-who-can-see.patch index ef5bce286..54c69a2ba 100644 --- a/patches/unapplied/server/0163-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/patches/server/0161-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the 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 193d73c53c7c3cc31246dd19c6d7ff4cb39cac1b..8c20af91c9298cb36fdb2700d042b1e2fccf5f54 100644 +index b7b4b4b3e3fbebd359f5ea199151a0d5978c47b3..f6a55bb449bcb06821f5b83d3d4d493df277721e 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -30,6 +30,7 @@ import net.minecraft.network.chat.MutableComponent; @@ -17,8 +17,8 @@ index 193d73c53c7c3cc31246dd19c6d7ff4cb39cac1b..8c20af91c9298cb36fdb2700d042b1e2 import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; -@@ -1181,7 +1182,7 @@ public abstract class Player extends LivingEntity { - int i = b0 + EnchantmentHelper.getKnockbackBonus((LivingEntity) this); +@@ -1179,7 +1180,7 @@ public abstract class Player extends LivingEntity { + int i = b0 + EnchantmentHelper.getKnockbackBonus(this); if (this.isSprinting() && flag) { - this.level.playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_KNOCKBACK, this.getSoundSource(), 1.0F, 1.0F); @@ -26,7 +26,7 @@ index 193d73c53c7c3cc31246dd19c6d7ff4cb39cac1b..8c20af91c9298cb36fdb2700d042b1e2 ++i; flag1 = true; } -@@ -1256,7 +1257,7 @@ public abstract class Player extends LivingEntity { +@@ -1254,7 +1255,7 @@ public abstract class Player extends LivingEntity { } } @@ -35,7 +35,7 @@ index 193d73c53c7c3cc31246dd19c6d7ff4cb39cac1b..8c20af91c9298cb36fdb2700d042b1e2 this.sweepAttack(); } -@@ -1284,15 +1285,15 @@ public abstract class Player extends LivingEntity { +@@ -1282,15 +1283,15 @@ public abstract class Player extends LivingEntity { } if (flag2) { @@ -54,16 +54,16 @@ index 193d73c53c7c3cc31246dd19c6d7ff4cb39cac1b..8c20af91c9298cb36fdb2700d042b1e2 } } -@@ -1344,7 +1345,7 @@ public abstract class Player extends LivingEntity { +@@ -1342,7 +1343,7 @@ public abstract class Player extends LivingEntity { - this.applyExhaustion(level.spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value + this.causeFoodExhaustion(level.spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value } else { - this.level.playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_NODAMAGE, this.getSoundSource(), 1.0F, 1.0F); + sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_NODAMAGE, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility if (flag4) { target.clearFire(); } -@@ -1791,6 +1792,14 @@ public abstract class Player extends LivingEntity { +@@ -1789,6 +1790,14 @@ public abstract class Player extends LivingEntity { public int getXpNeededForNextLevel() { return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2); } diff --git a/patches/unapplied/server/0164-Add-PlayerArmorChangeEvent.patch b/patches/server/0162-Add-PlayerArmorChangeEvent.patch similarity index 90% rename from patches/unapplied/server/0164-Add-PlayerArmorChangeEvent.patch rename to patches/server/0162-Add-PlayerArmorChangeEvent.patch index b169db109..10ae318f6 100644 --- a/patches/unapplied/server/0164-Add-PlayerArmorChangeEvent.patch +++ b/patches/server/0162-Add-PlayerArmorChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 5f24963bd2681cab15d20221154a9a758be53b03..375959ed616596e604dc07d3b30d708b08d7ce57 100644 +index 77b96f632342026fcd2c37e34e63db3e11396c34..5c9f9b6a1bd66d33fd194ad1d78a907b005a101c 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1,5 +1,6 @@ @@ -15,7 +15,7 @@ index 5f24963bd2681cab15d20221154a9a758be53b03..375959ed616596e604dc07d3b30d708b import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -@@ -2941,6 +2942,13 @@ public abstract class LivingEntity extends Entity { +@@ -2940,6 +2941,13 @@ public abstract class LivingEntity extends Entity { ItemStack itemstack1 = this.getItemBySlot(enumitemslot); if (!ItemStack.matches(itemstack1, itemstack)) { diff --git a/patches/unapplied/server/0165-Prevent-logins-from-being-processed-when-the-player-.patch b/patches/server/0163-Prevent-logins-from-being-processed-when-the-player-.patch similarity index 92% rename from patches/unapplied/server/0165-Prevent-logins-from-being-processed-when-the-player-.patch rename to patches/server/0163-Prevent-logins-from-being-processed-when-the-player-.patch index 8203995b8..b8bd49761 100644 --- a/patches/unapplied/server/0165-Prevent-logins-from-being-processed-when-the-player-.patch +++ b/patches/server/0163-Prevent-logins-from-being-processed-when-the-player-.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent logins from being processed when the player has diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 82d0979e3239dddf3951df4a8b65ae7319d3d5b5..109d7f1bf37e442ff80f7f63d50e27e6e30e0b5e 100644 +index b057dfd42e9439cd8a2a2933b736f0581da53b85..40feb2fbbe3c73b73124cae62f4661f000fad6cb 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -76,7 +76,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener diff --git a/patches/unapplied/server/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch b/patches/server/0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch similarity index 84% rename from patches/unapplied/server/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch rename to patches/server/0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch index 1e9c0d3d9..f08faba73 100644 --- a/patches/unapplied/server/0166-Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/patches/server/0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index acfa844c87e5814c033cad4318813800f57885fd..b327e10a5708d523b9d4a6c77c1359521f2927d5 100644 +index 8fbf239cdc5bc2f1ec7b91eaee85d032e65f250f..8844a6d3e06d5a29013fdf78072109cc50819d71 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -730,6 +730,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -731,6 +731,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Spigot start // Iterator iterator = this.blockEntityTickers.iterator(); int tilesThisCycle = 0; @@ -17,7 +17,7 @@ index acfa844c87e5814c033cad4318813800f57885fd..b327e10a5708d523b9d4a6c77c135952 for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0; TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(tileTickPosition); -@@ -737,7 +739,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -738,7 +740,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { if (tickingblockentity == null) { this.getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash"); tilesThisCycle--; @@ -25,14 +25,14 @@ index acfa844c87e5814c033cad4318813800f57885fd..b327e10a5708d523b9d4a6c77c135952 continue; } // Spigot end -@@ -745,12 +746,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -746,12 +747,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { if (tickingblockentity.isRemoved()) { // Spigot start tilesThisCycle--; - this.blockEntityTickers.remove(this.tileTickPosition--); + toRemove.add(tickingblockentity); // Paper - use removeAll // Spigot end - } else { + } else if (this.shouldTickBlocksAt(ChunkPos.asLong(tickingblockentity.getPos()))) { tickingblockentity.tick(); } } diff --git a/patches/unapplied/server/0167-use-CB-BlockState-implementations-for-captured-block.patch b/patches/server/0165-use-CB-BlockState-implementations-for-captured-block.patch similarity index 90% rename from patches/unapplied/server/0167-use-CB-BlockState-implementations-for-captured-block.patch rename to patches/server/0165-use-CB-BlockState-implementations-for-captured-block.patch index 425f83d26..72f52e275 100644 --- a/patches/unapplied/server/0167-use-CB-BlockState-implementations-for-captured-block.patch +++ b/patches/server/0165-use-CB-BlockState-implementations-for-captured-block.patch @@ -18,10 +18,10 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index b327e10a5708d523b9d4a6c77c1359521f2927d5..233a8fcfae4ac568ad1f73cc61d8ae5b66a01ac2 100644 +index 8844a6d3e06d5a29013fdf78072109cc50819d71..21491224a8383cef2d41b0da2e7de9362fe1d27f 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -141,7 +141,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -142,7 +142,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710 public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; @@ -30,7 +30,7 @@ index b327e10a5708d523b9d4a6c77c1359521f2927d5..233a8fcfae4ac568ad1f73cc61d8ae5b public Map capturedTileEntities = new HashMap<>(); public List captureDrops; public long ticksPerAnimalSpawns; -@@ -361,7 +361,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -362,7 +362,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { @@ -39,7 +39,7 @@ index b327e10a5708d523b9d4a6c77c1359521f2927d5..233a8fcfae4ac568ad1f73cc61d8ae5b if (blockstate == null) { blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags); this.capturedBlockStates.put(pos.immutable(), blockstate); -@@ -381,7 +381,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -382,7 +382,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit start - capture blockstates boolean captured = false; if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) { @@ -49,7 +49,7 @@ index b327e10a5708d523b9d4a6c77c1359521f2927d5..233a8fcfae4ac568ad1f73cc61d8ae5b this.capturedBlockStates.put(pos.immutable(), blockstate); captured = true; } -@@ -650,7 +651,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -651,7 +652,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public BlockState getBlockState(BlockPos pos) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { diff --git a/patches/unapplied/server/0168-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0166-API-to-get-a-BlockState-without-a-snapshot.patch similarity index 88% rename from patches/unapplied/server/0168-API-to-get-a-BlockState-without-a-snapshot.patch rename to patches/server/0166-API-to-get-a-BlockState-without-a-snapshot.patch index 74b7560eb..de82e83aa 100644 --- a/patches/unapplied/server/0168-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/patches/server/0166-API-to-get-a-BlockState-without-a-snapshot.patch @@ -13,18 +13,18 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE If Tile Entity was null, correct Sign to return empty lines instead of null diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 27895fbe1cd7ee6ee025ed3e320671e3e971764d..1d1764766d2b4a0b7bf4078ce428bb1474f709df 100644 +index 67315a86e5db51029d0f355c6dc223e93e4141db..29167adb4eeb83c108445c37e01dc4035b4c4be7 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -42,6 +42,7 @@ public abstract class BlockEntity implements net.minecraft.server.KeyedObject { +@@ -45,6 +45,7 @@ public abstract class BlockEntity implements io.papermc.paper.util.KeyedObject { this.type = type; this.worldPosition = pos.immutable(); this.blockState = state; + this.persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); // Paper - always init } - // Paper start -@@ -79,7 +80,7 @@ public abstract class BlockEntity implements net.minecraft.server.KeyedObject { + public static BlockPos getPosFromTag(CompoundTag nbt) { +@@ -86,7 +87,7 @@ public abstract class BlockEntity implements io.papermc.paper.util.KeyedObject { // CraftBukkit start - read container public void load(CompoundTag nbt) { @@ -33,7 +33,7 @@ index 27895fbe1cd7ee6ee025ed3e320671e3e971764d..1d1764766d2b4a0b7bf4078ce428bb14 net.minecraft.nbt.Tag persistentDataTag = nbt.get("PublicBukkitValues"); if (persistentDataTag instanceof CompoundTag) { -@@ -222,10 +223,15 @@ public abstract class BlockEntity implements net.minecraft.server.KeyedObject { +@@ -259,10 +260,15 @@ public abstract class BlockEntity implements io.papermc.paper.util.KeyedObject { // CraftBukkit start - add method public InventoryHolder getOwner() { @@ -51,7 +51,7 @@ index 27895fbe1cd7ee6ee025ed3e320671e3e971764d..1d1764766d2b4a0b7bf4078ce428bb14 return null; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index e6b8dd52cd503f45ca9bb868891ae4c8b29b3fcb..f1c4c3a3392c2d4d836fa10d7a38558d08084d9d 100644 +index 155c0dee5d3485310c60b4f4c3240d1ac07eb873..3ba1c033e00b56abcef005c04fa88cd24dae93ad 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -314,7 +314,20 @@ public class CraftBlock implements Block { @@ -76,7 +76,7 @@ index e6b8dd52cd503f45ca9bb868891ae4c8b29b3fcb..f1c4c3a3392c2d4d836fa10d7a38558d @Override diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index 2fb445e6edc43eb8e3e169cca3fc3b46ced94202..059a122ef7038f7c4e269b476eb6e013b3eb4531 100644 +index aa544f8be7d1db6fc6618d38efc40221afe85618..b98d442a8c749c59aff43189c3904ff4fb4cb353 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -10,15 +10,26 @@ public abstract class CraftBlockEntityState extends Craft diff --git a/patches/unapplied/server/0169-AsyncTabCompleteEvent.patch b/patches/server/0167-AsyncTabCompleteEvent.patch similarity index 95% rename from patches/unapplied/server/0169-AsyncTabCompleteEvent.patch rename to patches/server/0167-AsyncTabCompleteEvent.patch index b815fca05..7ca183917 100644 --- a/patches/unapplied/server/0169-AsyncTabCompleteEvent.patch +++ b/patches/server/0167-AsyncTabCompleteEvent.patch @@ -14,10 +14,10 @@ completion, such as offline players. Also adds isCommand and getLocation to the sync TabCompleteEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index cf42d59254f2786bfe8785249ad270d35996417a..8c2242d7e443bee26741608c65d314d8902f5765 100644 +index 7e80a929bc0ddcf94f27f4febedf10ad07a531ff..f97125ad82bc1ec850af9bdd92973942fc470bc1 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -702,10 +702,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -701,10 +701,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @Override public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) { @@ -30,7 +30,7 @@ index cf42d59254f2786bfe8785249ad270d35996417a..8c2242d7e443bee26741608c65d314d8 return; } // CraftBukkit end -@@ -715,12 +715,35 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -714,12 +714,35 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser stringreader.skip(); } @@ -72,10 +72,10 @@ index cf42d59254f2786bfe8785249ad270d35996417a..8c2242d7e443bee26741608c65d314d8 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a337967295f61f4892a2ae7dd65aeaba75a06172..435a68e6c99bffdc8d6ded9deda68d4e970a2d49 100644 +index a48067a7cc48c375854d443e483398c0c1f65e05..283038f0e8e78ba869eead3dabc51bff7b0ba77a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2015,7 +2015,7 @@ public final class CraftServer implements Server { +@@ -2026,7 +2026,7 @@ public final class CraftServer implements Server { offers = this.tabCompleteChat(player, message); } diff --git a/patches/unapplied/server/0170-PlayerPickupExperienceEvent.patch b/patches/server/0168-PlayerPickupExperienceEvent.patch similarity index 92% rename from patches/unapplied/server/0170-PlayerPickupExperienceEvent.patch rename to patches/server/0168-PlayerPickupExperienceEvent.patch index 2121564c8..32a0ed093 100644 --- a/patches/unapplied/server/0170-PlayerPickupExperienceEvent.patch +++ b/patches/server/0168-PlayerPickupExperienceEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] PlayerPickupExperienceEvent Allows plugins to cancel a player picking up an experience orb diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index 5220e3ee9fab4c4cbc95e0cf1928392316a35e34..1fdfeaa7758497e93fc13b44996e11d74a812546 100644 +index 90692df7e02346d4ba785d2eaf724d06b98b4438..8a3f2d2c9087b1a5f4dbde8e58af825e334f2432 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java @@ -300,7 +300,7 @@ public class ExperienceOrb extends Entity { diff --git a/patches/unapplied/server/0171-Ability-to-apply-mending-to-XP-API.patch b/patches/server/0169-Ability-to-apply-mending-to-XP-API.patch similarity index 70% rename from patches/unapplied/server/0171-Ability-to-apply-mending-to-XP-API.patch rename to patches/server/0169-Ability-to-apply-mending-to-XP-API.patch index 39418bbb9..b222cff38 100644 --- a/patches/unapplied/server/0171-Ability-to-apply-mending-to-XP-API.patch +++ b/patches/server/0169-Ability-to-apply-mending-to-XP-API.patch @@ -10,7 +10,7 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java -index 6f25e9f41d93a225acaa6575954967438a6cabbf..d439e8ce87bf7da03683a336941c7673b8b166e4 100644 +index 3a09ce6d0ea51436adcae4719d3f28d1868c283c..7bc5aa35b52de0027cf58a6127a9903464ccaf47 100644 --- a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java +++ b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java @@ -270,8 +270,11 @@ public class EnchantmentHelper { @@ -28,25 +28,10 @@ index 6f25e9f41d93a225acaa6575954967438a6cabbf..d439e8ce87bf7da03683a336941c7673 return true; }); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6b8ee829306ad22f52844ba29bf2a549558048bd..4c8617fbd2cd8e34c87634fe448d204ee7fb8a0f 100644 +index 5afc4c55c9ec8ed70b36a805b553613e18747c1f..d6f9fe4ebc034263169f3333922ad90fe4fcee69 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -61,11 +61,14 @@ import net.minecraft.server.level.ServerPlayer; - import net.minecraft.server.network.ServerGamePacketListenerImpl; - import net.minecraft.server.players.UserWhiteListEntry; - import net.minecraft.world.entity.Entity; -+import net.minecraft.world.entity.ExperienceOrb; - import net.minecraft.world.entity.LivingEntity; - import net.minecraft.world.entity.ai.attributes.AttributeInstance; - import net.minecraft.world.entity.ai.attributes.AttributeMap; - import net.minecraft.world.entity.ai.attributes.Attributes; - import net.minecraft.world.inventory.AbstractContainerMenu; -+import net.minecraft.world.item.enchantment.EnchantmentHelper; -+import net.minecraft.world.item.enchantment.Enchantments; - import net.minecraft.world.level.GameType; - import net.minecraft.world.level.block.Blocks; - import net.minecraft.world.level.block.entity.SignBlockEntity; -@@ -1216,8 +1219,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1223,8 +1223,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return GameMode.getByValue(this.getHandle().gameMode.getGameModeForPlayer().getId()); } @@ -55,10 +40,10 @@ index 6b8ee829306ad22f52844ba29bf2a549558048bd..4c8617fbd2cd8e34c87634fe448d204e + public int applyMending(int amount) { + ServerPlayer handle = getHandle(); + // Logic copied from EntityExperienceOrb and remapped to unobfuscated methods/properties -+ net.minecraft.world.item.ItemStack itemstack = EnchantmentHelper.getRandomEquippedItemWithEnchant(Enchantments.MENDING, handle); ++ net.minecraft.world.item.ItemStack itemstack = net.minecraft.world.item.enchantment.EnchantmentHelper ++ .getRandomEquippedItemWithEnchant(net.minecraft.world.item.enchantment.Enchantments.MENDING, handle); + if (!itemstack.isEmpty() && itemstack.getItem().canBeDepleted()) { -+ -+ ExperienceOrb orb = net.minecraft.world.entity.EntityType.EXPERIENCE_ORB.create(handle.level); ++ net.minecraft.world.entity.ExperienceOrb orb = net.minecraft.world.entity.EntityType.EXPERIENCE_ORB.create(handle.level); + orb.value = amount; + orb.spawnReason = org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM; + orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ()); diff --git a/patches/unapplied/server/0173-PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/0170-PlayerNaturallySpawnCreaturesEvent.patch similarity index 62% rename from patches/unapplied/server/0173-PlayerNaturallySpawnCreaturesEvent.patch rename to patches/server/0170-PlayerNaturallySpawnCreaturesEvent.patch index 4df4e523a..640d5e6df 100644 --- a/patches/unapplied/server/0173-PlayerNaturallySpawnCreaturesEvent.patch +++ b/patches/server/0170-PlayerNaturallySpawnCreaturesEvent.patch @@ -9,40 +9,44 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 4a2739edb01c97c99524dc96decbdcb12e0b7d4f..5e53ef4b71969737f900063ab631f4a1ce74cb90 100644 +index 9dd0279f9d33fabd1dc4ff029f0ad76a9cc8cb21..1a62a21d40c583f9cbf2b8fbb63b691fffb71ae0 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1024,11 +1024,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1077,7 +1077,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange; chunkRange = (chunkRange > 8) ? 8 : chunkRange; - double blockRange = (reducedRange) ? Math.pow(chunkRange << 4, 2) : 16384.0D; + final int finalChunkRange = chunkRange; // Paper for lambda below + //double blockRange = (reducedRange) ? Math.pow(chunkRange << 4, 2) : 16384.0D; // Paper - use from event ++ double blockRange = 16384.0D; // Paper // Spigot end long i = chunkcoordintpair.toLong(); - return !this.distanceManager.hasPlayersNearby(i) ? true : this.playerMap.getPlayers(i).noneMatch((entityplayer) -> { -+ // Paper start - add PlayerNaturallySpawnCreaturesEvent -+ com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent event; -+ double blockRange = 16384.0D; -+ if (reducedRange) { -+ event = entityplayer.playerNaturallySpawnedEvent; -+ if (event == null || event.isCancelled()) return false; -+ blockRange = (double) ((event.getSpawnRadius() << 4) * (event.getSpawnRadius() << 4)); -+ } -+ // Paper end - return !entityplayer.isSpectator() && ChunkMap.euclideanDistanceSquared(chunkcoordintpair, (Entity) entityplayer) < blockRange; // Spigot - }); - } +@@ -1094,6 +1096,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + } + + entityplayer = (ServerPlayer) iterator.next(); ++ // Paper start - add PlayerNaturallySpawnCreaturesEvent ++ com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent event; ++ blockRange = 16384.0D; ++ if (reducedRange) { ++ event = entityplayer.playerNaturallySpawnedEvent; ++ if (event == null || event.isCancelled()) return false; ++ blockRange = (double) ((event.getSpawnRadius() << 4) * (event.getSpawnRadius() << 4)); ++ } ++ // Paper end + } while (!this.playerIsCloseEnoughForSpawning(entityplayer, chunkcoordintpair, blockRange)); // Spigot + + return true; diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 3e2a5f83afcc3b9c9fe62748895d489135af03bf..1f3fe980e71c13b5e7852349cba1cb0e4aa42dcd 100644 +index c79521ab00a1c258bbeae56a687636e34932ac6f..212261651fd650cc895f817ccca37699d1cade8f 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -791,6 +791,15 @@ public class ServerChunkCache extends ChunkSource { - List list = Lists.newArrayList(this.chunkMap.getChunks()); +@@ -825,6 +825,15 @@ public class ServerChunkCache extends ChunkSource { + boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit - Collections.shuffle(list); + //Collections.shuffle(list); // Paper - no... just no... + // Paper start - call player naturally spawn event + int chunkRange = level.spigotConfig.mobSpawnRange; + chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange; @@ -52,11 +56,11 @@ index 3e2a5f83afcc3b9c9fe62748895d489135af03bf..1f3fe980e71c13b5e7852349cba1cb0e + entityPlayer.playerNaturallySpawnedEvent.callEvent(); + }; + // Paper end - this.level.timings.chunkTicks.startTiming(); // Paper - list.forEach((playerchunk) -> { - Optional optional = ((Either) playerchunk.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).left(); + Iterator iterator1 = list.iterator(); + + while (iterator1.hasNext()) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index d4614faa22485dce226f3dc17ef984212ac8fcb9..66434418fae67ff63450bc246796c7f3d4d09ae6 100644 +index ab73818893b00551f8137704a727e33046d43a6a..90bff0dd400a67bcb84f8576bd8326793420919a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1,5 +1,6 @@ @@ -66,7 +70,7 @@ index d4614faa22485dce226f3dc17ef984212ac8fcb9..66434418fae67ff63450bc246796c7f3 import com.google.common.collect.Lists; import com.mojang.authlib.GameProfile; import com.mojang.datafixers.util.Either; -@@ -233,6 +234,7 @@ public class ServerPlayer extends Player { +@@ -236,6 +237,7 @@ public class ServerPlayer extends Player { public boolean sentListPacket = false; public Integer clientViewDistance; // CraftBukkit end diff --git a/patches/unapplied/server/0174-PreCreatureSpawnEvent.patch b/patches/server/0171-PreCreatureSpawnEvent.patch similarity index 85% rename from patches/unapplied/server/0174-PreCreatureSpawnEvent.patch rename to patches/server/0171-PreCreatureSpawnEvent.patch index 0911762aa..971b1f05b 100644 --- a/patches/unapplied/server/0174-PreCreatureSpawnEvent.patch +++ b/patches/server/0171-PreCreatureSpawnEvent.patch @@ -15,13 +15,13 @@ instead and save a lot of server resources. See: https://github.com/PaperMC/Paper/issues/917 diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index 28f1a53a2b9ebe9948509dabbf1a4ae84d8e147c..345ecbc7fc080e8581d285b638db1ee6e684010a 100644 +index 20cfdba68c200e87d00995a6a4e25a5fa8171f6c..05ca012854100013714e3d6e8803a2959938cba4 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -335,6 +335,20 @@ public class EntityType implements EntityTypeTest { +@@ -334,6 +334,20 @@ public class EntityType implements EntityTypeTest { @Nullable - public T spawnCreature(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { + public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { + // Paper start - Call PreCreatureSpawnEvent + org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityType.getKey(this).getPath()); + if (type != null) { @@ -40,10 +40,10 @@ index 28f1a53a2b9ebe9948509dabbf1a4ae84d8e147c..345ecbc7fc080e8581d285b638db1ee6 if (t0 != null) { diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index 3839bacbd5f4d06eb13d0e604651232d9fbd7b6a..206aee8bf14ffc4ddbb8a7001bc3baae6a2ea849 100644 +index 8d76fe0154f31445a889dfe4cca716cb658053f6..55e4e7fcefc60e66239035e72ad44e0c796bf300 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -987,6 +987,21 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -990,6 +990,21 @@ public class Villager extends AbstractVillager implements ReputationEventHandler BlockPos blockposition1 = this.findSpawnPositionForGolemInColumn(blockposition, d0, d1); if (blockposition1 != null) { @@ -66,13 +66,13 @@ index 3839bacbd5f4d06eb13d0e604651232d9fbd7b6a..206aee8bf14ffc4ddbb8a7001bc3baae if (entityirongolem != null) { diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 14188ac6f158b36755abe23c0a967763cf7367d8..572328fafb2347886900352983fd5b6490b0dd68 100644 +index 802ff419ae74a16bcd570b996be2dd85e21ea3e8..ef0b18dba50916c4c717c2e6bd55a5e4d60f225f 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -133,6 +133,27 @@ public abstract class BaseSpawner { - double d2 = j >= 3 ? nbttaglist.getDouble(2) : (double) pos.getZ() + (world.random.nextDouble() - world.random.nextDouble()) * (double) this.spawnRange + 0.5D; - - if (world.noCollision(((EntityType) optional.get()).getAABB(d0, d1, d2)) && SpawnPlacements.checkSpawnRules((EntityType) optional.get(), world, MobSpawnType.SPAWNER, new BlockPos(d0, d1, d2), world.getRandom())) { +@@ -122,6 +122,27 @@ public abstract class BaseSpawner { + } else if (!SpawnPlacements.checkSpawnRules((EntityType) optional.get(), world, MobSpawnType.SPAWNER, blockposition1, world.getRandom())) { + continue; + } + // Paper start + EntityType entityType = optional.get(); + String key = EntityType.getKey(entityType).getPath(); @@ -94,14 +94,14 @@ index 14188ac6f158b36755abe23c0a967763cf7367d8..572328fafb2347886900352983fd5b64 + } + } + // Paper end + Entity entity = EntityType.loadEntityRecursive(nbttagcompound, world, (entity1) -> { entity1.moveTo(d0, d1, d2, entity1.getYRot(), entity1.getXRot()); - return entity1; diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 0432ad7ab00c336e7c566f24c3ec92b399cb6e9d..ca0fcf46e67deb07a3fdb071b771a7603e0fc3d0 100644 +index 28a7c53d98450cc79bee953411a18f50cfed26c2..831799937d4e1f31dbf7caaf0c6b38762ccec127 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -@@ -236,7 +236,13 @@ public final class NaturalSpawner { +@@ -239,7 +239,13 @@ public final class NaturalSpawner { j1 = biomesettingsmobs_c.minCount + world.random.nextInt(1 + biomesettingsmobs_c.maxCount - biomesettingsmobs_c.minCount); } @@ -116,7 +116,7 @@ index 0432ad7ab00c336e7c566f24c3ec92b399cb6e9d..ca0fcf46e67deb07a3fdb071b771a760 Mob entityinsentient = NaturalSpawner.getMobForSpawn(world, biomesettingsmobs_c.type); if (entityinsentient == null) { -@@ -283,9 +289,25 @@ public final class NaturalSpawner { +@@ -286,9 +292,25 @@ public final class NaturalSpawner { return squaredDistance <= 576.0D ? false : (world.getSharedSpawnPos().closerThan((Position) (new Vec3((double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D)), 24.0D) ? false : Objects.equals(new ChunkPos(pos), chunk.getPos()) || world.isPositionEntityTicking((BlockPos) pos)); } diff --git a/patches/unapplied/server/0175-Add-setPlayerProfile-API-for-Skulls.patch b/patches/server/0172-Add-setPlayerProfile-API-for-Skulls.patch similarity index 100% rename from patches/unapplied/server/0175-Add-setPlayerProfile-API-for-Skulls.patch rename to patches/server/0172-Add-setPlayerProfile-API-for-Skulls.patch diff --git a/patches/unapplied/server/0176-Fill-Profile-Property-Events.patch b/patches/server/0173-Fill-Profile-Property-Events.patch similarity index 100% rename from patches/unapplied/server/0176-Fill-Profile-Property-Events.patch rename to patches/server/0173-Fill-Profile-Property-Events.patch diff --git a/patches/unapplied/server/0177-PlayerAdvancementCriterionGrantEvent.patch b/patches/server/0174-PlayerAdvancementCriterionGrantEvent.patch similarity index 100% rename from patches/unapplied/server/0177-PlayerAdvancementCriterionGrantEvent.patch rename to patches/server/0174-PlayerAdvancementCriterionGrantEvent.patch diff --git a/patches/unapplied/server/0178-Add-ArmorStand-Item-Meta.patch b/patches/server/0175-Add-ArmorStand-Item-Meta.patch similarity index 99% rename from patches/unapplied/server/0178-Add-ArmorStand-Item-Meta.patch rename to patches/server/0175-Add-ArmorStand-Item-Meta.patch index 16543c136..6761bbd8f 100644 --- a/patches/unapplied/server/0178-Add-ArmorStand-Item-Meta.patch +++ b/patches/server/0175-Add-ArmorStand-Item-Meta.patch @@ -256,7 +256,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 05d54f0eff89b721f01e90e79d2571baab297799..71320d9484842be3a694117de25159f3581bd2a3 100644 +index 0baca5f3c3f73323b6f5b283fc00be39477ccf59..ec26116dcaa2b1ba71498323d3b7624aad49dbbf 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -1444,6 +1444,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { diff --git a/patches/unapplied/server/0179-Extend-Player-Interact-cancellation.patch b/patches/server/0176-Extend-Player-Interact-cancellation.patch similarity index 93% rename from patches/unapplied/server/0179-Extend-Player-Interact-cancellation.patch rename to patches/server/0176-Extend-Player-Interact-cancellation.patch index ab571f3eb..90b95fb54 100644 --- a/patches/unapplied/server/0179-Extend-Player-Interact-cancellation.patch +++ b/patches/server/0176-Extend-Player-Interact-cancellation.patch @@ -13,10 +13,10 @@ Update adjacent blocks of doors, double plants, pistons and beds when cancelling interaction. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index ecfb88b4d9727ad20a2c33475cc6b1ec88821a19..315dad4789f5f2582ee9b4fc176affd1f57537ef 100644 +index 2869d9bb0d374c26f9569eef3ecf0480cbaa85a6..1d1f355a49e2324902feee10c1717fd772e359c6 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -187,6 +187,11 @@ public class ServerPlayerGameMode { +@@ -186,6 +186,11 @@ public class ServerPlayerGameMode { PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_BLOCK, pos, direction, this.player.getInventory().getSelected(), InteractionHand.MAIN_HAND); if (event.isCancelled()) { // Let the client know the block still exists @@ -28,7 +28,7 @@ index ecfb88b4d9727ad20a2c33475cc6b1ec88821a19..315dad4789f5f2582ee9b4fc176affd1 this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos)); // Update any tile entity data for this block BlockEntity tileentity = this.level.getBlockEntity(pos); -@@ -502,7 +507,13 @@ public class ServerPlayerGameMode { +@@ -501,7 +506,13 @@ public class ServerPlayerGameMode { // send a correcting update to the client for the block above as well, this because of replaceable blocks (such as grass, sea grass etc) player.connection.send(new ClientboundBlockUpdatePacket(world, blockposition.above())); diff --git a/patches/unapplied/server/0180-Tameable-getOwnerUniqueId-API.patch b/patches/server/0177-Tameable-getOwnerUniqueId-API.patch similarity index 89% rename from patches/unapplied/server/0180-Tameable-getOwnerUniqueId-API.patch rename to patches/server/0177-Tameable-getOwnerUniqueId-API.patch index d872f6cd1..842a58904 100644 --- a/patches/unapplied/server/0180-Tameable-getOwnerUniqueId-API.patch +++ b/patches/server/0177-Tameable-getOwnerUniqueId-API.patch @@ -7,7 +7,7 @@ This is faster if all you need is the UUID, as .getOwner() will cause an OfflinePlayer to be loaded from disk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java -index 27a1ca43792644fc239af81dea5510f25d3328e9..69c95644b2531c1fe1c4a6cf7fee12e997dd67f4 100644 +index 6151df2086d92fd5f428e2efe0df8d1c154ff891..32c7dc33ac0a41902bc841692a8b64b18e4355b6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java @@ -89,6 +89,10 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac @@ -22,7 +22,7 @@ index 27a1ca43792644fc239af81dea5510f25d3328e9..69c95644b2531c1fe1c4a6cf7fee12e9 return this.getHandle().getOwnerUUID(); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java -index cc90c09c26b04689e4fffa890baf0e89c38665a3..0b152d8d20924fc1ce7f5bafb050216d250f6536 100644 +index f225da459d0c9b5b5322ba3256e63880a7b4ad5d..428437970cac144be53cd0e30af7af0cd1ce603b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java @@ -17,6 +17,10 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat diff --git a/patches/unapplied/server/0181-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/patches/server/0178-Toggleable-player-crits-helps-mitigate-hacked-client.patch similarity index 87% rename from patches/unapplied/server/0181-Toggleable-player-crits-helps-mitigate-hacked-client.patch rename to patches/server/0178-Toggleable-player-crits-helps-mitigate-hacked-client.patch index 021e93902..dbdac6627 100644 --- a/patches/unapplied/server/0181-Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/patches/server/0178-Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5892823425055efb92bf635b035d62981942b966..0e08f6e566d1c93cc89a179583d0b0939127de8b 100644 +index e2894138d3efb32161087ad2a1093b8c15c56a65..9d7d9c800710fff5cf41c973463b9c2d72a3e32a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -233,6 +233,11 @@ public class PaperWorldConfig { @@ -21,10 +21,10 @@ index 5892823425055efb92bf635b035d62981942b966..0e08f6e566d1c93cc89a179583d0b093 private void allChunksAreSlimeChunks() { allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false); 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 8c20af91c9298cb36fdb2700d042b1e2fccf5f54..dbab4d28c49d22807dfc582fb83353232396555b 100644 +index f6a55bb449bcb06821f5b83d3d4d493df277721e..a182c78c3718a6b8f56578c5e6b35ce5742046fe 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1189,6 +1189,7 @@ public abstract class Player extends LivingEntity { +@@ -1187,6 +1187,7 @@ public abstract class Player extends LivingEntity { boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity; diff --git a/patches/unapplied/server/0182-Disable-Explicit-Network-Manager-Flushing.patch b/patches/server/0179-Disable-Explicit-Network-Manager-Flushing.patch similarity index 94% rename from patches/unapplied/server/0182-Disable-Explicit-Network-Manager-Flushing.patch rename to patches/server/0179-Disable-Explicit-Network-Manager-Flushing.patch index 195d04017..7513b75ab 100644 --- a/patches/unapplied/server/0182-Disable-Explicit-Network-Manager-Flushing.patch +++ b/patches/server/0179-Disable-Explicit-Network-Manager-Flushing.patch @@ -12,7 +12,7 @@ flushing on the netty event loop, so it won't do the flush on the main thread. Renable flushing by passing -Dpaper.explicit-flush=true diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 06e965996a5c50bce617847e594ae0dd83403484..636ac646bec67dbd933f00614693af03481b6173 100644 +index 84fe0f6cfc928d95d0967ad368a38afb71543af7..0aacf2e0155a9a7c9dfe9b368a251aee25ed24fc 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java @@ -86,6 +86,7 @@ public class Connection extends SimpleChannelInboundHandler> { diff --git a/patches/unapplied/server/0183-Implement-extended-PaperServerListPingEvent.patch b/patches/server/0180-Implement-extended-PaperServerListPingEvent.patch similarity index 92% rename from patches/unapplied/server/0183-Implement-extended-PaperServerListPingEvent.patch rename to patches/server/0180-Implement-extended-PaperServerListPingEvent.patch index 198702591..cc6eaed20 100644 --- a/patches/unapplied/server/0183-Implement-extended-PaperServerListPingEvent.patch +++ b/patches/server/0180-Implement-extended-PaperServerListPingEvent.patch @@ -190,7 +190,7 @@ index 67455a5ba75c9b816213e44d6872c5ddf8e27e98..23efad80934930beadf15e65781551d4 public ClientboundStatusResponsePacket(ServerStatus metadata) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 031bd2ed5c6fd2a859e8a69c48db3938cf71d61b..d9fab29a066367a5cf4a3486989fa7f35451801e 100644 +index 543acb52698deb890a2624112e63be275a52c008..e9333b85100d7670b2be7df6e847dfca3084ff55 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2,6 +2,9 @@ package net.minecraft.server; @@ -203,17 +203,17 @@ index 031bd2ed5c6fd2a859e8a69c48db3938cf71d61b..d9fab29a066367a5cf4a3486989fa7f3 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -1331,7 +1334,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= 5000000000L) { +@@ -1320,7 +1323,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop