From 01f583117164bb034135b3850fb03d99b7beea9e Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 7 Jun 2023 20:49:17 +0200 Subject: [PATCH] More more work --- .../0063-Complete-resource-pack-API.patch} | 8 ++--- ...ding-permissions.yml-before-plugins.patch} | 2 +- ...low-Reloading-of-Custom-Permissions.patch} | 4 +-- .../0066-Remove-Metadata-on-reload.patch} | 2 +- ...67-Handle-Item-Meta-Inconsistencies.patch} | 12 +++---- ...rable-Non-Player-Arrow-Despawn-Rate.patch} | 6 ++-- .../0069-Add-World-Util-Methods.patch} | 8 ++--- ...-Custom-replacement-for-eaten-items.patch} | 35 +++++++++---------- ...h-absorb-values-and-repair-bad-data.patch} | 14 ++++---- ...72-Use-a-Shared-Random-for-Entities.patch} | 6 ++-- ...e-spawn-chances-for-skeleton-horses.patch} | 4 +-- ...dBounds-and-getBlockState-for-inlin.patch} | 28 +++++++-------- ...kPhysicsEvent-if-a-plugin-has-a-lis.patch} | 12 +++---- ...ntity-AddTo-RemoveFrom-World-Events.patch} | 6 ++-- ...7-Configurable-Chunk-Inhabited-Time.patch} | 4 +-- .../0078-EntityPathfindEvent.patch} | 8 ++--- ...gionFileCache-and-make-configurable.patch} | 6 ++-- ...-Do-not-load-chunks-for-Pathfinding.patch} | 14 ++++---- ...081-Add-PlayerUseUnknownEntityEvent.patch} | 4 +-- ...Configurable-Grass-Spread-Tick-Rate.patch} | 2 +- ...-BlockPlaceEvent-triggering-physics.patch} | 4 +-- .../0084-Optimize-DataBits.patch} | 4 +-- ...illa-per-world-scoreboard-coloring-.patch} | 0 .../0086-Configurable-Player-Collision.patch} | 10 +++--- ...nt-to-allow-plugins-to-handle-clien.patch} | 2 +- .../0088-Configurable-RCON-IP-address.patch} | 0 ...tyRegainHealthEvent-isFastRegen-API.patch} | 8 ++--- ...to-configure-frosted_ice-properties.patch} | 0 ...possibility-for-getServer-singleton.patch} | 4 +-- ...tem-frames-performance-and-bug-fixe.patch} | 10 +++--- 30 files changed, 113 insertions(+), 114 deletions(-) rename patches/{unapplied/server/0065-Complete-resource-pack-API.patch => server/0063-Complete-resource-pack-API.patch} (92%) rename patches/{unapplied/server/0066-Default-loading-permissions.yml-before-plugins.patch => server/0064-Default-loading-permissions.yml-before-plugins.patch} (95%) rename patches/{unapplied/server/0067-Allow-Reloading-of-Custom-Permissions.patch => server/0065-Allow-Reloading-of-Custom-Permissions.patch} (90%) rename patches/{unapplied/server/0068-Remove-Metadata-on-reload.patch => server/0066-Remove-Metadata-on-reload.patch} (93%) rename patches/{unapplied/server/0069-Handle-Item-Meta-Inconsistencies.patch => server/0067-Handle-Item-Meta-Inconsistencies.patch} (97%) rename patches/{unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch => server/0068-Configurable-Non-Player-Arrow-Despawn-Rate.patch} (52%) rename patches/{unapplied/server/0071-Add-World-Util-Methods.patch => server/0069-Add-World-Util-Methods.patch} (88%) rename patches/{unapplied/server/0072-Custom-replacement-for-eaten-items.patch => server/0070-Custom-replacement-for-eaten-items.patch} (59%) rename patches/{unapplied/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch => server/0071-handle-NaN-health-absorb-values-and-repair-bad-data.patch} (80%) rename patches/{unapplied/server/0074-Use-a-Shared-Random-for-Entities.patch => server/0072-Use-a-Shared-Random-for-Entities.patch} (94%) rename patches/{unapplied/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch => server/0073-Configurable-spawn-chances-for-skeleton-horses.patch} (90%) rename patches/{unapplied/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch => server/0074-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch} (87%) rename patches/{unapplied/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch => server/0075-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch} (90%) rename patches/{unapplied/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch => server/0076-Entity-AddTo-RemoveFrom-World-Events.patch} (83%) rename patches/{unapplied/server/0079-Configurable-Chunk-Inhabited-Time.patch => server/0077-Configurable-Chunk-Inhabited-Time.patch} (88%) rename patches/{unapplied/server/0080-EntityPathfindEvent.patch => server/0078-EntityPathfindEvent.patch} (95%) rename patches/{unapplied/server/0081-Sanitise-RegionFileCache-and-make-configurable.patch => server/0079-Sanitise-RegionFileCache-and-make-configurable.patch} (86%) rename patches/{unapplied/server/0082-Do-not-load-chunks-for-Pathfinding.patch => server/0080-Do-not-load-chunks-for-Pathfinding.patch} (77%) rename patches/{unapplied/server/0083-Add-PlayerUseUnknownEntityEvent.patch => server/0081-Add-PlayerUseUnknownEntityEvent.patch} (95%) rename patches/{unapplied/server/0084-Configurable-Grass-Spread-Tick-Rate.patch => server/0082-Configurable-Grass-Spread-Tick-Rate.patch} (94%) rename patches/{unapplied/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch => server/0083-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch} (82%) rename patches/{unapplied/server/0086-Optimize-DataBits.patch => server/0084-Optimize-DataBits.patch} (96%) rename patches/{unapplied/server/0087-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch => server/0085-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch} (100%) rename patches/{unapplied/server/0088-Configurable-Player-Collision.patch => server/0086-Configurable-Player-Collision.patch} (94%) rename patches/{unapplied/server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch => server/0087-Add-handshake-event-to-allow-plugins-to-handle-clien.patch} (97%) rename patches/{unapplied/server/0090-Configurable-RCON-IP-address.patch => server/0088-Configurable-RCON-IP-address.patch} (100%) rename patches/{unapplied/server/0091-EntityRegainHealthEvent-isFastRegen-API.patch => server/0089-EntityRegainHealthEvent-isFastRegen-API.patch} (86%) rename patches/{unapplied/server/0092-Add-ability-to-configure-frosted_ice-properties.patch => server/0090-Add-ability-to-configure-frosted_ice-properties.patch} (100%) rename patches/{unapplied/server/0093-remove-null-possibility-for-getServer-singleton.patch => server/0091-remove-null-possibility-for-getServer-singleton.patch} (92%) rename patches/{unapplied/server/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch => server/0092-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch} (94%) diff --git a/patches/unapplied/server/0065-Complete-resource-pack-API.patch b/patches/server/0063-Complete-resource-pack-API.patch similarity index 92% rename from patches/unapplied/server/0065-Complete-resource-pack-API.patch rename to patches/server/0063-Complete-resource-pack-API.patch index cb2efb14cc..5d4799527f 100644 --- a/patches/unapplied/server/0065-Complete-resource-pack-API.patch +++ b/patches/server/0063-Complete-resource-pack-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index dae74cda3b9faa0c8aeecc6c7bc329950033f653..dac2665008b5ba49134c84373f916c5c6ed355e9 100644 +index 42a44820a3c13e2b0e29e02ed384c1918c9a0b17..94636c92758568051f829aed59aab8728e7e7252 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1756,8 +1756,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1748,8 +1748,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName()); this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect")); } @@ -23,7 +23,7 @@ index dae74cda3b9faa0c8aeecc6c7bc329950033f653..dac2665008b5ba49134c84373f916c5c @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 470eac3191c09c7c7fe4b36165ed1c213bac421c..31785e1cee09977356ee2b65a7d41df2c959d1b2 100644 +index 2ab9fa95aecc9393a80b94a37915b4f22d83ce27..5fe88000bb29f5fd83ca8708b24a2c9ad2f5a562 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -178,6 +178,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -37,7 +37,7 @@ index 470eac3191c09c7c7fe4b36165ed1c213bac421c..31785e1cee09977356ee2b65a7d41df2 public CraftPlayer(CraftServer server, ServerPlayer entity) { super(server, entity); -@@ -2361,6 +2365,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2292,6 +2296,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean getAffectsSpawning() { return this.getHandle().affectsSpawning; } diff --git a/patches/unapplied/server/0066-Default-loading-permissions.yml-before-plugins.patch b/patches/server/0064-Default-loading-permissions.yml-before-plugins.patch similarity index 95% rename from patches/unapplied/server/0066-Default-loading-permissions.yml-before-plugins.patch rename to patches/server/0064-Default-loading-permissions.yml-before-plugins.patch index b7b8b809eb..a0fb4cbde2 100644 --- a/patches/unapplied/server/0066-Default-loading-permissions.yml-before-plugins.patch +++ b/patches/server/0064-Default-loading-permissions.yml-before-plugins.patch @@ -16,7 +16,7 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe A config option has been added for those who depend on the previous behavior, but I don't expect that. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 319caeca0737ab5b8f847a7e00784461839aad8c..ac33dc1b3ffe743276032fa5f73a92a2977b9c20 100644 +index f8bb3493faf56a2e214dab9efb1c8f05b0b53fbd..ead12a480569aaeccc6e27f70acdce8cd27a47e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -457,6 +457,7 @@ public final class CraftServer implements Server { diff --git a/patches/unapplied/server/0067-Allow-Reloading-of-Custom-Permissions.patch b/patches/server/0065-Allow-Reloading-of-Custom-Permissions.patch similarity index 90% rename from patches/unapplied/server/0067-Allow-Reloading-of-Custom-Permissions.patch rename to patches/server/0065-Allow-Reloading-of-Custom-Permissions.patch index dc71963571..530bdd8075 100644 --- a/patches/unapplied/server/0067-Allow-Reloading-of-Custom-Permissions.patch +++ b/patches/server/0065-Allow-Reloading-of-Custom-Permissions.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ac33dc1b3ffe743276032fa5f73a92a2977b9c20..518306efc0e41a5bde0ad232cab8347969a5f364 100644 +index ead12a480569aaeccc6e27f70acdce8cd27a47e8..176746f19c07b059164f4b4b3bd2ec82ec79656b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2605,5 +2605,23 @@ public final class CraftServer implements Server { +@@ -2603,5 +2603,23 @@ public final class CraftServer implements Server { } return this.adventure$audiences; } diff --git a/patches/unapplied/server/0068-Remove-Metadata-on-reload.patch b/patches/server/0066-Remove-Metadata-on-reload.patch similarity index 93% rename from patches/unapplied/server/0068-Remove-Metadata-on-reload.patch rename to patches/server/0066-Remove-Metadata-on-reload.patch index 79989a5374..badd7c38d8 100644 --- a/patches/unapplied/server/0068-Remove-Metadata-on-reload.patch +++ b/patches/server/0066-Remove-Metadata-on-reload.patch @@ -7,7 +7,7 @@ Metadata is not meant to persist reload as things break badly with non primitive This will remove metadata on reload so it does not crash everything if a plugin uses it. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 518306efc0e41a5bde0ad232cab8347969a5f364..cf9db3ed2c9caba0bd40d310aaf1cc10603926c4 100644 +index 176746f19c07b059164f4b4b3bd2ec82ec79656b..bc0bff6f06a74e2bb3f00fac2fdcc543bc970c2f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -962,8 +962,16 @@ public final class CraftServer implements Server { diff --git a/patches/unapplied/server/0069-Handle-Item-Meta-Inconsistencies.patch b/patches/server/0067-Handle-Item-Meta-Inconsistencies.patch similarity index 97% rename from patches/unapplied/server/0069-Handle-Item-Meta-Inconsistencies.patch rename to patches/server/0067-Handle-Item-Meta-Inconsistencies.patch index d9e8b7e6d6..d5e2ef652b 100644 --- a/patches/unapplied/server/0069-Handle-Item-Meta-Inconsistencies.patch +++ b/patches/server/0067-Handle-Item-Meta-Inconsistencies.patch @@ -18,10 +18,10 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index e19407edd4847e5a5175e113944d1331bd4d4ffc..9b358c8e464c67c4953749cda6d2983db98e0c5f 100644 +index 70e663baefe90c06eca2033f07e7e85c6f27c97f..0db25566c47eb5b7e970dafea0ed186592fea38c 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -158,6 +158,23 @@ public final class ItemStack { +@@ -156,6 +156,23 @@ public final class ItemStack { return this.getItem().getTooltipImage(this); } @@ -45,7 +45,7 @@ index e19407edd4847e5a5175e113944d1331bd4d4ffc..9b358c8e464c67c4953749cda6d2983d public ItemStack(ItemLike item) { this(item, 1); } -@@ -209,6 +226,7 @@ public final class ItemStack { +@@ -204,6 +221,7 @@ public final class ItemStack { // CraftBukkit start - make defensive copy as this data may be coming from the save thread this.tag = nbttagcompound.getCompound("tag").copy(); // CraftBukkit end @@ -53,7 +53,7 @@ index e19407edd4847e5a5175e113944d1331bd4d4ffc..9b358c8e464c67c4953749cda6d2983d this.getItem().verifyTagAfterLoad(this.tag); } -@@ -807,6 +825,7 @@ public final class ItemStack { +@@ -809,6 +827,7 @@ public final class ItemStack { public void setTag(@Nullable CompoundTag nbt) { this.tag = nbt; @@ -61,7 +61,7 @@ index e19407edd4847e5a5175e113944d1331bd4d4ffc..9b358c8e464c67c4953749cda6d2983d if (this.getItem().canBeDepleted()) { this.setDamageValue(this.getDamageValue()); } -@@ -1104,6 +1123,7 @@ public final class ItemStack { +@@ -1106,6 +1125,7 @@ public final class ItemStack { ListTag nbttaglist = this.tag.getList("Enchantments", 10); nbttaglist.add(EnchantmentHelper.storeEnchantment(EnchantmentHelper.getEnchantmentId(enchantment), (byte) level)); @@ -70,7 +70,7 @@ index e19407edd4847e5a5175e113944d1331bd4d4ffc..9b358c8e464c67c4953749cda6d2983d public boolean isEnchanted() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index f4ca58b7e0f5e880f6c8ec71deac57aabf885c7c..a32369d2c15e24ec69cae90e228b8d48775f54e3 100644 +index ae55364f6c33687361c053d90ad47c6192a1e62b..bdfce4a49cc6fed46de5864d1c443038f44027fb 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -6,7 +6,6 @@ import java.util.Map; diff --git a/patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/patches/server/0068-Configurable-Non-Player-Arrow-Despawn-Rate.patch similarity index 52% rename from patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch rename to patches/server/0068-Configurable-Non-Player-Arrow-Despawn-Rate.patch index 993acf56fe..2ad87be08f 100644 --- a/patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/patches/server/0068-Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -6,15 +6,15 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate Can set a much shorter despawn rate for arrows that players can not pick up. diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 1d5fea45453b2d17639e2c97a0cb18d4b02db339..aabb5ad09dd7b11a7dfbaa0849726541c0401951 100644 +index 37356efff435444b29d6d6682f365a329ebdd92e..7acd5d9fb7f7d3e067de779a9e3f0cedb587c68a 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -312,7 +312,7 @@ public abstract class AbstractArrow extends Projectile { protected void tickDespawn() { ++this.life; -- if (this.life >= ((this instanceof ThrownTrident) ? level.spigotConfig.tridentDespawnRate : level.spigotConfig.arrowDespawnRate)) { // Spigot -+ if (this.life >= (pickup == Pickup.CREATIVE_ONLY ? level.paperConfig().entities.spawning.creativeArrowDespawnRate.value() : (pickup == Pickup.DISALLOWED ? level.paperConfig().entities.spawning.nonPlayerArrowDespawnRate.value() : ((this instanceof ThrownTrident) ? level.spigotConfig.tridentDespawnRate : level.spigotConfig.arrowDespawnRate)))) { // Spigot // Paper - TODO: Extract this to init? +- if (this.life >= ((this instanceof ThrownTrident) ? this.level().spigotConfig.tridentDespawnRate : this.level().spigotConfig.arrowDespawnRate)) { // Spigot ++ if (this.life >= (pickup == Pickup.CREATIVE_ONLY ? this.level().paperConfig().entities.spawning.creativeArrowDespawnRate.value() : (pickup == Pickup.DISALLOWED ? this.level().paperConfig().entities.spawning.nonPlayerArrowDespawnRate.value() : ((this instanceof ThrownTrident) ? this.level().spigotConfig.tridentDespawnRate : this.level().spigotConfig.arrowDespawnRate)))) { // Spigot // Paper - TODO: Extract this to init? this.discard(); } diff --git a/patches/unapplied/server/0071-Add-World-Util-Methods.patch b/patches/server/0069-Add-World-Util-Methods.patch similarity index 88% rename from patches/unapplied/server/0071-Add-World-Util-Methods.patch rename to patches/server/0069-Add-World-Util-Methods.patch index 414debe431..329fc56a0e 100644 --- a/patches/unapplied/server/0071-Add-World-Util-Methods.patch +++ b/patches/server/0069-Add-World-Util-Methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a08c81030cf4974397205b200d27c559cdb75a12..9e593a50b36a13b45c6ab279a7f6656045ccdf35 100644 +index ef48e76ca18576e631d5d2f1652d3449d558a582..71be3d403dc0c345b447685fa339cb1c455dd2a8 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -217,7 +217,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -221,7 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; @@ -19,10 +19,10 @@ index a08c81030cf4974397205b200d27c559cdb75a12..9e593a50b36a13b45c6ab279a7f66560 } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index cff0be79e2dbb761ad2971bc3fcbd0d264505f1d..3b3da7340af0b97f900b5eb7fc2ba90f39c4c503 100644 +index 49ef7d349e0e4b1d45611ff0a225ba94c3db2600..47f2776db17089e4e889c0a126845e1d29f2d60f 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -343,6 +343,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -342,6 +342,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return chunk == null ? null : chunk.getFluidState(blockposition); } diff --git a/patches/unapplied/server/0072-Custom-replacement-for-eaten-items.patch b/patches/server/0070-Custom-replacement-for-eaten-items.patch similarity index 59% rename from patches/unapplied/server/0072-Custom-replacement-for-eaten-items.patch rename to patches/server/0070-Custom-replacement-for-eaten-items.patch index bf79bf3bb6..b393762836 100644 --- a/patches/unapplied/server/0072-Custom-replacement-for-eaten-items.patch +++ b/patches/server/0070-Custom-replacement-for-eaten-items.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 202eed643693363aa1c052f468d6bd15bb072ff8..92da7117f56c1a5087d589f241a8b9dbe55c9b67 100644 +index eb0280854b9c3bda9660a99ae7355f2874660d7a..571f170c7816d37ff1f082f00cab3725c660a10a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3599,10 +3599,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3649,10 +3649,11 @@ public abstract class LivingEntity extends Entity implements Attackable { this.triggerItemUseEffects(this.useItem, 16); // CraftBukkit start - fire PlayerItemConsumeEvent ItemStack itemstack; @@ -18,32 +18,31 @@ index 202eed643693363aa1c052f468d6bd15bb072ff8..92da7117f56c1a5087d589f241a8b9db org.bukkit.inventory.EquipmentSlot hand = org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(enumhand); - PlayerItemConsumeEvent event = new PlayerItemConsumeEvent((Player) this.getBukkitEntity(), craftItem, hand); + event = new PlayerItemConsumeEvent((Player) this.getBukkitEntity(), craftItem, hand); // Paper - level.getCraftServer().getPluginManager().callEvent(event); + this.level().getCraftServer().getPluginManager().callEvent(event); if (event.isCancelled()) { -@@ -3616,6 +3617,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3666,6 +3667,12 @@ public abstract class LivingEntity extends Entity implements Attackable { } else { - itemstack = this.useItem.finishUsingItem(this.level, this); + itemstack = this.useItem.finishUsingItem(this.level(), this); } -+ -+ // Paper start - save the default replacement item and change it if necessary -+ final ItemStack defaultReplacement = itemstack; -+ if (event != null && event.getReplacement() != null) { -+ itemstack = CraftItemStack.asNMSCopy(event.getReplacement()); -+ } -+ // Paper end ++ // Paper start - save the default replacement item and change it if necessary ++ final ItemStack defaultReplacement = itemstack; ++ if (event != null && event.getReplacement() != null) { ++ itemstack = CraftItemStack.asNMSCopy(event.getReplacement()); ++ } ++ // Paper end // CraftBukkit end if (itemstack != this.useItem) { -@@ -3623,6 +3631,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3673,6 +3680,11 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.stopUsingItem(); -+ // Paper start - if the replacement is anything but the default, update the client inventory -+ if (this instanceof ServerPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) { -+ ((ServerPlayer) this).getBukkitEntity().updateInventory(); -+ } -+ // Paper end ++ // Paper start - if the replacement is anything but the default, update the client inventory ++ if (this instanceof ServerPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) { ++ ((ServerPlayer) this).getBukkitEntity().updateInventory(); ++ } ++ // Paper end } } diff --git a/patches/unapplied/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/patches/server/0071-handle-NaN-health-absorb-values-and-repair-bad-data.patch similarity index 80% rename from patches/unapplied/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch rename to patches/server/0071-handle-NaN-health-absorb-values-and-repair-bad-data.patch index f81b89e692..b41cf7119e 100644 --- a/patches/unapplied/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/patches/server/0071-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -5,10 +5,10 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 9936fb67766dedba71b582316dd2bddd6567c342..2f161145789890fcd9bfd893b099f25a53c61034 100644 +index 571f170c7816d37ff1f082f00cab3725c660a10a..7e3378861990034015a6796013b78d504dcb8b5e 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -777,7 +777,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -795,7 +795,13 @@ public abstract class LivingEntity extends Entity implements Attackable { @Override public void readAdditionalSaveData(CompoundTag nbt) { @@ -20,10 +20,10 @@ index 9936fb67766dedba71b582316dd2bddd6567c342..2f161145789890fcd9bfd893b099f25a + } + this.setAbsorptionAmount(absorptionAmount); + // Paper end - if (nbt.contains("Attributes", 9) && this.level != null && !this.level.isClientSide) { + if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) { this.getAttributes().load(nbt.getList("Attributes", 10)); } -@@ -1264,6 +1270,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1313,6 +1319,10 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void setHealth(float health) { @@ -34,7 +34,7 @@ index 9936fb67766dedba71b582316dd2bddd6567c342..2f161145789890fcd9bfd893b099f25a // CraftBukkit start - Handle scaled health if (this instanceof ServerPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity(); -@@ -3432,7 +3442,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3482,7 +3492,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void setAbsorptionAmount(float amount) { @@ -44,10 +44,10 @@ index 9936fb67766dedba71b582316dd2bddd6567c342..2f161145789890fcd9bfd893b099f25a } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 31785e1cee09977356ee2b65a7d41df2c959d1b2..16dc9546303d692c62b6a1538106019f6bbe149b 100644 +index 5fe88000bb29f5fd83ca8708b24a2c9ad2f5a562..55715c017e4e08a0e3db95dea5b8ec4fd4acf00d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2165,6 +2165,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2096,6 +2096,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { diff --git a/patches/unapplied/server/0074-Use-a-Shared-Random-for-Entities.patch b/patches/server/0072-Use-a-Shared-Random-for-Entities.patch similarity index 94% rename from patches/unapplied/server/0074-Use-a-Shared-Random-for-Entities.patch rename to patches/server/0072-Use-a-Shared-Random-for-Entities.patch index ea6f2b94ba..1a4de782ac 100644 --- a/patches/unapplied/server/0074-Use-a-Shared-Random-for-Entities.patch +++ b/patches/server/0072-Use-a-Shared-Random-for-Entities.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 606f3038f6c4a92cb0ae7debb97795abc70a8fb8..4d2491c04b587c8315173ccbcac9686f42937358 100644 +index bb8de860d826e4c92ffdbd7ef2675458d372bbdf..09cf1125221bdbebddabfc46095c3dbd153714c1 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -162,6 +162,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -89,7 +89,7 @@ index 606f3038f6c4a92cb0ae7debb97795abc70a8fb8..4d2491c04b587c8315173ccbcac9686f private CraftEntity bukkitEntity; public CraftEntity getBukkitEntity() { -@@ -402,7 +475,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -354,7 +427,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.bb = Entity.INITIAL_AABB; this.stuckSpeedMultiplier = Vec3.ZERO; this.nextStep = 1.0F; @@ -99,7 +99,7 @@ index 606f3038f6c4a92cb0ae7debb97795abc70a8fb8..4d2491c04b587c8315173ccbcac9686f this.fluidHeight = new Object2DoubleArrayMap(2); this.fluidOnEyes = new HashSet(); diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java -index 24846bcbf0e3983a26ac1e8058a96c0e7ad28e40..72eea6e512060fc622ca79ca87437f19a64604cc 100644 +index 930df3e20f27e35054620018aaec08031e6d181a..b72006c4b2342ca9d9a81f54f89fa6d979c33c85 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Squid.java +++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java @@ -46,7 +46,7 @@ public class Squid extends WaterAnimal { diff --git a/patches/unapplied/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch b/patches/server/0073-Configurable-spawn-chances-for-skeleton-horses.patch similarity index 90% rename from patches/unapplied/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch rename to patches/server/0073-Configurable-spawn-chances-for-skeleton-horses.patch index 074c8554fb..967b6647c6 100644 --- a/patches/unapplied/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/patches/server/0073-Configurable-spawn-chances-for-skeleton-horses.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 9e593a50b36a13b45c6ab279a7f6656045ccdf35..faf2d6aaf6fba1c7a47ebd2cbc95783afaf5c8ef 100644 +index 71be3d403dc0c345b447685fa339cb1c455dd2a8..16e0887abe2643b13f7fefd986783e88d37fbdfb 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -696,7 +696,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -607,7 +607,7 @@ public class ServerLevel extends Level implements WorldGenLevel { blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15)); if (this.isRainingAt(blockposition)) { DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition); diff --git a/patches/unapplied/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch b/patches/server/0074-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch similarity index 87% rename from patches/unapplied/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch rename to patches/server/0074-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch index 7110c30c68..4740f53dd6 100644 --- a/patches/unapplied/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch +++ b/patches/server/0074-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch @@ -29,10 +29,10 @@ index 1b29c6872ebe54351f28c1f1f38b22561ba785ee..40950db0c242c65dfd4de247c8624935 this.x = x; this.y = y; diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 3b3da7340af0b97f900b5eb7fc2ba90f39c4c503..6d6145de1db2d57aa7f342e2467401231c3e38ae 100644 +index 47f2776db17089e4e889c0a126845e1d29f2d60f..22285078d79690c836eb34331d4d4c40f4b85932 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -285,7 +285,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -284,7 +284,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public boolean isInWorldBounds(BlockPos pos) { @@ -42,10 +42,10 @@ index 3b3da7340af0b97f900b5eb7fc2ba90f39c4c503..6d6145de1db2d57aa7f342e246740123 public static boolean isInSpawnableBounds(BlockPos pos) { diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java -index 1b7496cec0ba5a95615a069e3168bd46308d0b40..508c2fff8d8e0c6f37b6c4e3b72ba772c2ab2ee5 100644 +index 2caac1a3d80e6c490aa16aa6bc1067065b665c69..525c89bc926f13af6f94fc46c897525e37477eca 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java -@@ -160,6 +160,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom +@@ -166,6 +166,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom return GameEventListenerRegistry.NOOP; } @@ -54,7 +54,7 @@ index 1b7496cec0ba5a95615a069e3168bd46308d0b40..508c2fff8d8e0c6f37b6c4e3b72ba772 public abstract BlockState setBlockState(BlockPos pos, BlockState state, boolean moved); diff --git a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java -index 2eb92dde607d7c8968cb07c6f3c24e1c45e9990f..908f71721daf4305692f424d7712cbfdddddae83 100644 +index f49cc61840c6588fca301b4c5c3aaeede03a323e..785fa679860413b736122f8e88a92e683cbdd99f 100644 --- a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java @@ -55,6 +55,12 @@ public class EmptyLevelChunk extends LevelChunk { @@ -71,10 +71,10 @@ index 2eb92dde607d7c8968cb07c6f3c24e1c45e9990f..908f71721daf4305692f424d7712cbfd public BlockState getBlockState(BlockPos pos) { return Blocks.VOID_AIR.defaultBlockState(); diff --git a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java -index 8033c8741a0f73919a357893652592b317bfb417..9a1cffd51aaf97f759a9057aefbf50bd6f5ed028 100644 +index 60e760b42dd6471a229dfd45490dcf8c51979d35..4a3ac7dedf5cb1e76f16ec4f18e82afc717d0ced 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java -@@ -89,6 +89,12 @@ public class ImposterProtoChunk extends ProtoChunk { +@@ -91,6 +91,12 @@ public class ImposterProtoChunk extends ProtoChunk { public BlockState getBlockState(BlockPos pos) { return this.wrapped.getBlockState(pos); } @@ -88,10 +88,10 @@ index 8033c8741a0f73919a357893652592b317bfb417..9a1cffd51aaf97f759a9057aefbf50bd @Override public FluidState getFluidState(BlockPos pos) { diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 03f7394057c927f55fa962a65988d03553c6a642..a37377f1b8eba0a86cdeb31026c5e7fe790b898a 100644 +index 7edb17360bc0611c6a1412b868ed128c9dbcfb4f..24ded8c0900792e3f037972ae70857121ed3dde1 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -335,12 +335,29 @@ public class LevelChunk extends ChunkAccess { +@@ -295,12 +295,29 @@ public class LevelChunk extends ChunkAccess { } } @@ -125,23 +125,23 @@ index 03f7394057c927f55fa962a65988d03553c6a642..a37377f1b8eba0a86cdeb31026c5e7fe BlockState iblockdata = null; diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -index bc707432af738ad39de9f8df253913db941a4850..becc4c101e40d9b11e5e89a69e25dc0160bfaa32 100644 +index d59392c322936ce89b759ac9787c8f4f0b228af6..2c3ea88bac229df67bd742e16d2106d80bcc8889 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -@@ -21,7 +21,7 @@ public class LevelChunkSection { +@@ -19,7 +19,7 @@ public class LevelChunkSection { + public static final int SECTION_HEIGHT = 16; public static final int SECTION_SIZE = 4096; public static final int BIOME_CONTAINER_BITS = 2; - private final int bottomBlockY; - private short nonEmptyBlockCount; + short nonEmptyBlockCount; // Paper - package-private private short tickingBlockCount; private short tickingFluidCount; public final PalettedContainer states; diff --git a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java -index 0b67858f8d6689b34816f9556f3424af512a7401..c24b4c6a560aab2df07783b3481981deb8571a50 100644 +index b2c0c7fd06fcd720b4c0875f08a90b6b672c96b2..6c72eb36020bc05104b21e52cea89de09b85f2d7 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java -@@ -94,14 +94,18 @@ public class ProtoChunk extends ChunkAccess { +@@ -92,14 +92,18 @@ public class ProtoChunk extends ChunkAccess { @Override public BlockState getBlockState(BlockPos pos) { diff --git a/patches/unapplied/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/patches/server/0075-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch similarity index 90% rename from patches/unapplied/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch rename to patches/server/0075-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index b8c43379ee..6f2514fca5 100644 --- a/patches/unapplied/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/patches/server/0075-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener Saves on some object allocation and processing when no plugin listens to this diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1554f8847e42cdd584b16c0648c21c4071aea6de..f48d3bbbfd5b4ebb9c22c6dc2a17a9030af2edf5 100644 +index d5ad3368a397e9fc02506187ccb1c386afd9ce2b..7fca70658ecdc89b79381ca2ab33b931ce6871ae 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1369,6 +1369,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return worldserver + " " + worldserver.dimension().location(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index faf2d6aaf6fba1c7a47ebd2cbc95783afaf5c8ef..0f7c0bf3e773485737aa4a116a712fc7b8ed221e 100644 +index 16e0887abe2643b13f7fefd986783e88d37fbdfb..5c2ca51139b0647a2c7ae1b268b6d151dc884eca 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -216,6 +216,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -220,6 +220,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // CraftBukkit start public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; @@ -30,10 +30,10 @@ index faf2d6aaf6fba1c7a47ebd2cbc95783afaf5c8ef..0f7c0bf3e773485737aa4a116a712fc7 @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkSource.getChunk(x, z, false); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 6d6145de1db2d57aa7f342e2467401231c3e38ae..ebad2e1bac84bade6dd2b893de832b77705a6f57 100644 +index 22285078d79690c836eb34331d4d4c40f4b85932..dc84da6d6036802792cf9a31bb219cc24bb9e57b 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -503,7 +503,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -491,7 +491,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit start iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam CraftWorld world = ((ServerLevel) this).getWorld(); diff --git a/patches/unapplied/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch b/patches/server/0076-Entity-AddTo-RemoveFrom-World-Events.patch similarity index 83% rename from patches/unapplied/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch rename to patches/server/0076-Entity-AddTo-RemoveFrom-World-Events.patch index b9dcdea640..f0a92f7c69 100644 --- a/patches/unapplied/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/patches/server/0076-Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0f7c0bf3e773485737aa4a116a712fc7b8ed221e..70d695b20bdb214129e67dd1e869ae0736f1cfeb 100644 +index 5c2ca51139b0647a2c7ae1b268b6d151dc884eca..79b572c8e3481ea4a6ac523c0a2f25204cf44e2d 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2224,6 +2224,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2126,6 +2126,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.setOrigin(entity.getOriginVector().toLocation(getWorld())); } // Paper end @@ -16,7 +16,7 @@ index 0f7c0bf3e773485737aa4a116a712fc7b8ed221e..70d695b20bdb214129e67dd1e869ae07 } public void onTrackingEnd(Entity entity) { -@@ -2299,6 +2300,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2201,6 +2202,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } // CraftBukkit end diff --git a/patches/unapplied/server/0079-Configurable-Chunk-Inhabited-Time.patch b/patches/server/0077-Configurable-Chunk-Inhabited-Time.patch similarity index 88% rename from patches/unapplied/server/0079-Configurable-Chunk-Inhabited-Time.patch rename to patches/server/0077-Configurable-Chunk-Inhabited-Time.patch index 93cf642499..a07dffdf74 100644 --- a/patches/unapplied/server/0079-Configurable-Chunk-Inhabited-Time.patch +++ b/patches/server/0077-Configurable-Chunk-Inhabited-Time.patch @@ -11,10 +11,10 @@ For people who want all chunks to be treated equally, you can chose a fixed valu This allows to fine-tune vanilla gameplay. diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index a37377f1b8eba0a86cdeb31026c5e7fe790b898a..f5dcd970fc2828a4ba9ff2c0d495aa8d8cd4ed74 100644 +index 24ded8c0900792e3f037972ae70857121ed3dde1..69fbe3c3815dd59af667b57b34e1247c61498c48 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -320,6 +320,13 @@ public class LevelChunk extends ChunkAccess { +@@ -280,6 +280,13 @@ public class LevelChunk extends ChunkAccess { return new ChunkAccess.TicksToSave(this.blockTicks, this.fluidTicks); } diff --git a/patches/unapplied/server/0080-EntityPathfindEvent.patch b/patches/server/0078-EntityPathfindEvent.patch similarity index 95% rename from patches/unapplied/server/0080-EntityPathfindEvent.patch rename to patches/server/0078-EntityPathfindEvent.patch index cd96ad1e9e..86732f5dd4 100644 --- a/patches/unapplied/server/0080-EntityPathfindEvent.patch +++ b/patches/server/0078-EntityPathfindEvent.patch @@ -19,7 +19,7 @@ index a8f69e48937b3ebd2f57a4da747e6762c4a77934..acd0b946cab86eb173e713535194d3a9 @Override diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java -index eabdcef883b6284c68a2bad15461a0c4e7106cbd..4f07e406288cc005e632d60c4586eb378891b5c0 100644 +index 518f47f52105e299e037fe2e7d5870d7555be4bc..71934af2dc4d209a9fbccfd36b5f2815ec196892 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java @@ -39,14 +39,14 @@ public class GroundPathNavigation extends PathNavigation { @@ -42,12 +42,12 @@ index eabdcef883b6284c68a2bad15461a0c4e7106cbd..4f07e406288cc005e632d60c4586eb37 @@ -57,19 +57,19 @@ public class GroundPathNavigation extends PathNavigation { } - if (!this.level.getBlockState(target).getMaterial().isSolid()) { + if (!this.level.getBlockState(target).isSolid()) { - return super.createPath(target, distance); + return super.createPath(target, entity, distance); // Paper } else { BlockPos blockPos2; - for(blockPos2 = target.above(); blockPos2.getY() < this.level.getMaxBuildHeight() && this.level.getBlockState(blockPos2).getMaterial().isSolid(); blockPos2 = blockPos2.above()) { + for(blockPos2 = target.above(); blockPos2.getY() < this.level.getMaxBuildHeight() && this.level.getBlockState(blockPos2).isSolid(); blockPos2 = blockPos2.above()) { } - return super.createPath(blockPos2, distance); @@ -63,7 +63,7 @@ index eabdcef883b6284c68a2bad15461a0c4e7106cbd..4f07e406288cc005e632d60c4586eb37 private int getSurfaceY() { diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index a9bd5bbffaa1f281a799bf132f58cfb725c21c9c..64b64fb0b72eccade63fac99b7b363aafe59169b 100644 +index f16e9bcefedb582a4bfe7a0b7ec8a97799f5e5ad..de87f2e7b8a1662767bab4b0c86ee7cf014ed5cf 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -110,7 +110,13 @@ public abstract class PathNavigation { diff --git a/patches/unapplied/server/0081-Sanitise-RegionFileCache-and-make-configurable.patch b/patches/server/0079-Sanitise-RegionFileCache-and-make-configurable.patch similarity index 86% rename from patches/unapplied/server/0081-Sanitise-RegionFileCache-and-make-configurable.patch rename to patches/server/0079-Sanitise-RegionFileCache-and-make-configurable.patch index 07739b0f45..58aebba10d 100644 --- a/patches/unapplied/server/0081-Sanitise-RegionFileCache-and-make-configurable.patch +++ b/patches/server/0079-Sanitise-RegionFileCache-and-make-configurable.patch @@ -11,11 +11,11 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap). The maximum size of the RegionFileCache is also made configurable. diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -index 64e957650dafc9fc30fa997e7f7d3fd47cf60089..1a1ade7538263f4c1a91eb122086a150af3d86ba 100644 +index b9b50c56e79297bb824a92355f437a5d4d7e6760..e4c706d553a3d7058a32409ec7af8771c92d9777 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -@@ -57,7 +57,7 @@ public class RegionFileStorage implements AutoCloseable { - // Paper end +@@ -36,7 +36,7 @@ public class RegionFileStorage implements AutoCloseable { + if (regionfile != null) { return regionfile; } else { - if (this.regionCache.size() >= 256) { diff --git a/patches/unapplied/server/0082-Do-not-load-chunks-for-Pathfinding.patch b/patches/server/0080-Do-not-load-chunks-for-Pathfinding.patch similarity index 77% rename from patches/unapplied/server/0082-Do-not-load-chunks-for-Pathfinding.patch rename to patches/server/0080-Do-not-load-chunks-for-Pathfinding.patch index a19d0d7dcb..5adba4580e 100644 --- a/patches/unapplied/server/0082-Do-not-load-chunks-for-Pathfinding.patch +++ b/patches/server/0080-Do-not-load-chunks-for-Pathfinding.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Do not load chunks for Pathfinding diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -index 4aa04a2805c6b8e124112467e0ece3ac4cf80324..67ac0b3cec3b1a9bd6de7be50244804ac1620ab3 100644 +index b7995e6159c865f8e2e7865f7eb51936a9720311..10503d6d8b6daf645cf4360ee289d5e25144c976 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -@@ -457,7 +457,12 @@ public class WalkNodeEvaluator extends NodeEvaluator { +@@ -459,7 +459,12 @@ public class WalkNodeEvaluator extends NodeEvaluator { for(int n = -1; n <= 1; ++n) { if (l != 0 || n != 0) { pos.set(i + l, j + m, k + n); @@ -22,15 +22,15 @@ index 4aa04a2805c6b8e124112467e0ece3ac4cf80324..67ac0b3cec3b1a9bd6de7be50244804a if (blockState.is(Blocks.CACTUS) || blockState.is(Blocks.SWEET_BERRY_BUSH)) { return BlockPathTypes.DANGER_OTHER; } -@@ -469,6 +474,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { - if (world.getFluidState(pos).is(FluidTags.WATER)) { - return BlockPathTypes.WATER_BORDER; +@@ -475,6 +480,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { + if (blockState.is(Blocks.WITHER_ROSE) || blockState.is(Blocks.POINTED_DRIPSTONE)) { + return BlockPathTypes.DAMAGE_CAUTIOUS; } + } // Paper } } } -@@ -478,7 +484,8 @@ public class WalkNodeEvaluator extends NodeEvaluator { +@@ -484,7 +490,8 @@ public class WalkNodeEvaluator extends NodeEvaluator { } protected static BlockPathTypes getBlockPathTypeRaw(BlockGetter world, BlockPos pos) { @@ -38,5 +38,5 @@ index 4aa04a2805c6b8e124112467e0ece3ac4cf80324..67ac0b3cec3b1a9bd6de7be50244804a + BlockState blockState = world.getBlockStateIfLoaded(pos); // Paper + if (blockState == null) return BlockPathTypes.BLOCKED; // Paper Block block = blockState.getBlock(); - Material material = blockState.getMaterial(); if (blockState.isAir()) { + return BlockPathTypes.OPEN; diff --git a/patches/unapplied/server/0083-Add-PlayerUseUnknownEntityEvent.patch b/patches/server/0081-Add-PlayerUseUnknownEntityEvent.patch similarity index 95% rename from patches/unapplied/server/0083-Add-PlayerUseUnknownEntityEvent.patch rename to patches/server/0081-Add-PlayerUseUnknownEntityEvent.patch index 5cf35701ac..97253a1100 100644 --- a/patches/unapplied/server/0083-Add-PlayerUseUnknownEntityEvent.patch +++ b/patches/server/0081-Add-PlayerUseUnknownEntityEvent.patch @@ -22,10 +22,10 @@ index a5d57cc862036012d83b090bb1b3ccf4115a88b3..21068f766b75c414d5818073b7dca083 static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() { @Override diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index dac2665008b5ba49134c84373f916c5c6ed355e9..8e602afa03f067ed1b62f3c855fa302c3fb3eeeb 100644 +index 94636c92758568051f829aed59aab8728e7e7252..c65282a85e2822b86f56c528ab838e628ea27411 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2542,8 +2542,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2534,8 +2534,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic }); } } diff --git a/patches/unapplied/server/0084-Configurable-Grass-Spread-Tick-Rate.patch b/patches/server/0082-Configurable-Grass-Spread-Tick-Rate.patch similarity index 94% rename from patches/unapplied/server/0084-Configurable-Grass-Spread-Tick-Rate.patch rename to patches/server/0082-Configurable-Grass-Spread-Tick-Rate.patch index 50a9c78703..101ec3a372 100644 --- a/patches/unapplied/server/0084-Configurable-Grass-Spread-Tick-Rate.patch +++ b/patches/server/0082-Configurable-Grass-Spread-Tick-Rate.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable Grass Spread Tick Rate 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 bd5a45765b53bf4f2f9aaea4769c71ffb008741d..61783f17b655cbb6430d22fb3a81931ab3ea130c 100644 +index 1df22561b2d39066b6b30f10ea43edd734e3b50a..1fe07f8f9b28faf076209f7ad235fd5dc948b294 100644 --- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java @@ -2,6 +2,7 @@ package net.minecraft.world.level.block; diff --git a/patches/unapplied/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/patches/server/0083-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch similarity index 82% rename from patches/unapplied/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch rename to patches/server/0083-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index f7a4a906f9..03b7844ddb 100644 --- a/patches/unapplied/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/patches/server/0083-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 70d695b20bdb214129e67dd1e869ae0736f1cfeb..c4bf60739b0f73729f331f2bb82d9d08f346f19c 100644 +index 79b572c8e3481ea4a6ac523c0a2f25204cf44e2d..6896ead71f87989c2fa90d0339eedfd08ac49dd1 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1457,6 +1457,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1366,6 +1366,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public void updateNeighborsAt(BlockPos pos, Block sourceBlock) { diff --git a/patches/unapplied/server/0086-Optimize-DataBits.patch b/patches/server/0084-Optimize-DataBits.patch similarity index 96% rename from patches/unapplied/server/0086-Optimize-DataBits.patch rename to patches/server/0084-Optimize-DataBits.patch index 8686b1aff9..b621ae42cc 100644 --- a/patches/unapplied/server/0086-Optimize-DataBits.patch +++ b/patches/server/0084-Optimize-DataBits.patch @@ -11,7 +11,7 @@ After: http://i.imgur.com/nJ46crB.png Optimize redundant converting of static fields into an unsigned long each call by precomputing it in ctor diff --git a/src/main/java/net/minecraft/util/SimpleBitStorage.java b/src/main/java/net/minecraft/util/SimpleBitStorage.java -index c8ae9d25eedb7cb2d9f95b799a507727b655f11f..9b81ce9d85cba07e9752c29fb5a842c4b00aa873 100644 +index f677cc252d5510a2365e73dc42bd266e56115e83..2b3fd62dca2d1475075b5dcde56cea85b749cb44 100644 --- a/src/main/java/net/minecraft/util/SimpleBitStorage.java +++ b/src/main/java/net/minecraft/util/SimpleBitStorage.java @@ -11,8 +11,8 @@ public class SimpleBitStorage implements BitStorage { @@ -83,7 +83,7 @@ index c8ae9d25eedb7cb2d9f95b799a507727b655f11f..9b81ce9d85cba07e9752c29fb5a842c4 long l = this.data[i]; int j = (index - i * this.valuesPerLong) * this.bits; diff --git a/src/main/java/net/minecraft/util/ZeroBitStorage.java b/src/main/java/net/minecraft/util/ZeroBitStorage.java -index 172e7a0761724cc802387e613258830a0defb04a..9686ce7536c9924b1b2aced4f013f46759cbc72e 100644 +index 0710c72441c832a93275f3f9bd9dd7643dc0f229..f0f764f36fb92c64ab2dc8a0a50c3f48321c3c9a 100644 --- a/src/main/java/net/minecraft/util/ZeroBitStorage.java +++ b/src/main/java/net/minecraft/util/ZeroBitStorage.java @@ -13,21 +13,21 @@ public class ZeroBitStorage implements BitStorage { diff --git a/patches/unapplied/server/0087-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/patches/server/0085-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch similarity index 100% rename from patches/unapplied/server/0087-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch rename to patches/server/0085-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch diff --git a/patches/unapplied/server/0088-Configurable-Player-Collision.patch b/patches/server/0086-Configurable-Player-Collision.patch similarity index 94% rename from patches/unapplied/server/0088-Configurable-Player-Collision.patch rename to patches/server/0086-Configurable-Player-Collision.patch index 3f96fec8e0..a229dc386e 100644 --- a/patches/unapplied/server/0088-Configurable-Player-Collision.patch +++ b/patches/server/0086-Configurable-Player-Collision.patch @@ -18,7 +18,7 @@ index 1294b38262505b0d54089e428df9b363219de1f0..ee37ec0de1ca969144824427ae42b0c8 buf.writeComponent(this.playerPrefix); buf.writeComponent(this.playerSuffix); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f48d3bbbfd5b4ebb9c22c6dc2a17a9030af2edf5..2ea0cb1f9bfc5ef7bd8c78cf259da13b11fe4023 100644 +index 7fca70658ecdc89b79381ca2ab33b931ce6871ae..feee1da3091fdbcef0336ab0ab85fd9f52ccac4b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -589,6 +589,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop registryManager, PlayerDataStorage saveHandler, int maxPlayers) { this.cserver = server.server = new CraftServer((DedicatedServer) server, this); -@@ -409,6 +411,13 @@ public abstract class PlayerList { +@@ -416,6 +418,13 @@ public abstract class PlayerList { player.initInventoryMenu(); // CraftBukkit - Moved from above, added world @@ -76,7 +76,7 @@ index 57281d4a3c6b187d13ba5cadd46f494df411e7ba..1cd7a99a6280975dac96a33b077b372d PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); } -@@ -528,6 +537,16 @@ public abstract class PlayerList { +@@ -535,6 +544,16 @@ public abstract class PlayerList { entityplayer.doTick(); // SPIGOT-924 // CraftBukkit end @@ -93,7 +93,7 @@ index 57281d4a3c6b187d13ba5cadd46f494df411e7ba..1cd7a99a6280975dac96a33b077b372d this.save(entityplayer); if (entityplayer.isPassenger()) { Entity entity = entityplayer.getRootVehicle(); -@@ -1159,6 +1178,13 @@ public abstract class PlayerList { +@@ -1166,6 +1185,13 @@ public abstract class PlayerList { } // CraftBukkit end diff --git a/patches/unapplied/server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/patches/server/0087-Add-handshake-event-to-allow-plugins-to-handle-clien.patch similarity index 97% rename from patches/unapplied/server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch rename to patches/server/0087-Add-handshake-event-to-allow-plugins-to-handle-clien.patch index cbef416185..f51ea9b36e 100644 --- a/patches/unapplied/server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch +++ b/patches/server/0087-Add-handshake-event-to-allow-plugins-to-handle-clien.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index 994db7a175fdbd4688d9392d6b343348d1ada04e..2be1bd39ee1341128f02e38afe5698b837735827 100644 +index 3d08ad662b02812a2b194f95fba55798b9976955..77d7f070cce1a47e41b5d4f5a1cc8c778352a126 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java @@ -89,9 +89,36 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL diff --git a/patches/unapplied/server/0090-Configurable-RCON-IP-address.patch b/patches/server/0088-Configurable-RCON-IP-address.patch similarity index 100% rename from patches/unapplied/server/0090-Configurable-RCON-IP-address.patch rename to patches/server/0088-Configurable-RCON-IP-address.patch diff --git a/patches/unapplied/server/0091-EntityRegainHealthEvent-isFastRegen-API.patch b/patches/server/0089-EntityRegainHealthEvent-isFastRegen-API.patch similarity index 86% rename from patches/unapplied/server/0091-EntityRegainHealthEvent-isFastRegen-API.patch rename to patches/server/0089-EntityRegainHealthEvent-isFastRegen-API.patch index 90d91897a0..29fb386f9a 100644 --- a/patches/unapplied/server/0091-EntityRegainHealthEvent-isFastRegen-API.patch +++ b/patches/server/0089-EntityRegainHealthEvent-isFastRegen-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API Don't even get me started diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index b14723d093f8a7aa44750b6d0e7eb9db9e2ac34b..d0d38e39010ba3398a0b8960bc674c39d9a9ff51 100644 +index 7e3378861990034015a6796013b78d504dcb8b5e..ad9f1b9b7adc799af751bfbd0ee6fe6d27a58851 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1243,10 +1243,16 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1292,10 +1292,16 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) { @@ -26,9 +26,9 @@ index b14723d093f8a7aa44750b6d0e7eb9db9e2ac34b..d0d38e39010ba3398a0b8960bc674c39 + EntityRegainHealthEvent event = new EntityRegainHealthEvent(this.getBukkitEntity(), f, regainReason, isFastRegen); // Paper // Suppress during worldgen if (this.valid) { - this.level.getCraftServer().getPluginManager().callEvent(event); + this.level().getCraftServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/world/food/FoodData.java b/src/main/java/net/minecraft/world/food/FoodData.java -index 5fb5258a03d34c161110f3098bc06107a9714965..4a2dcf9bd83dd3fdff43483f887f4f58dc4715cd 100644 +index 5ff0eba33f848de5172944274e14062090ab7407..2038df72f8d7d33d4105de8129628daf21de6f0f 100644 --- a/src/main/java/net/minecraft/world/food/FoodData.java +++ b/src/main/java/net/minecraft/world/food/FoodData.java @@ -83,7 +83,7 @@ public class FoodData { diff --git a/patches/unapplied/server/0092-Add-ability-to-configure-frosted_ice-properties.patch b/patches/server/0090-Add-ability-to-configure-frosted_ice-properties.patch similarity index 100% rename from patches/unapplied/server/0092-Add-ability-to-configure-frosted_ice-properties.patch rename to patches/server/0090-Add-ability-to-configure-frosted_ice-properties.patch diff --git a/patches/unapplied/server/0093-remove-null-possibility-for-getServer-singleton.patch b/patches/server/0091-remove-null-possibility-for-getServer-singleton.patch similarity index 92% rename from patches/unapplied/server/0093-remove-null-possibility-for-getServer-singleton.patch rename to patches/server/0091-remove-null-possibility-for-getServer-singleton.patch index ab152eca5e..b52830b920 100644 --- a/patches/unapplied/server/0093-remove-null-possibility-for-getServer-singleton.patch +++ b/patches/server/0091-remove-null-possibility-for-getServer-singleton.patch @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2ea0cb1f9bfc5ef7bd8c78cf259da13b11fe4023..e2744847c5decc65be2f8d268457ba80633b8e29 100644 +index feee1da3091fdbcef0336ab0ab85fd9f52ccac4b..ac0a6cfb6fb7d9fa696b1e35ebdfb37935b74048 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -193,6 +193,7 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -25,7 +25,7 @@ index 2ea0cb1f9bfc5ef7bd8c78cf259da13b11fe4023..e2744847c5decc65be2f8d268457ba80 this.metricsRecorder = InactiveMetricsRecorder.INSTANCE; this.profiler = this.metricsRecorder.getProfiler(); this.onMetricsRecordingStopped = (methodprofilerresults) -> { -@@ -2334,9 +2336,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop