From 197786ead0a35e2c417b4d60add4036b3f2f9b64 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 7 Jun 2023 20:31:32 +0200 Subject: [PATCH] More more work --- ...option-to-load-extra-plugin-jars-no.patch} | 4 +- ...ctus-bamboo-and-reed-growth-heights.patch} | 4 +- ...igurable-baby-zombie-movement-speed.patch} | 4 +- ...21-Configurable-fishing-time-ranges.patch} | 2 +- ...-mobs-to-jump-and-take-water-damage.patch} | 10 ++-- ...despawn-distances-for-living-entiti.patch} | 4 +- ...-Allow-for-toggling-of-spawn-chunks.patch} | 4 +- ...k-and-tnt-entities-at-the-specified.patch} | 15 +++--- ...ent-crashes-server-lists-and-Mojang.patch} | 20 ++++---- ...0027-Implement-Paper-VersionChecker.patch} | 2 +- ...-version-history-to-version-command.patch} | 4 +- .../0029-Player-affects-spawning-API.patch} | 46 +++++++++---------- ...30-Further-improve-server-tick-loop.patch} | 22 ++++----- ...31-Only-refresh-abilities-if-needed.patch} | 4 +- .../0032-Entity-Origin-API.patch} | 20 ++++---- ...vent-tile-entity-and-entity-crashes.patch} | 8 ++-- ...figurable-top-of-nether-void-damage.patch} | 12 ++--- ...-before-converting-and-renaming-pla.patch} | 2 +- .../0036-Always-tick-falling-blocks.patch} | 2 +- .../0037-Configurable-end-credits.patch} | 6 +-- ...explosions-processing-dead-entities.patch} | 2 +- .../0039-Optimize-explosions.patch} | 10 ++-- .../0040-Disable-explosion-knockback.patch} | 12 ++--- .../0041-Disable-thunder.patch} | 4 +- .../0042-Disable-ice-and-snow.patch} | 6 +-- ...-Configurable-mob-spawner-tick-rate.patch} | 12 +---- ...4-Implement-PlayerLocaleChangeEvent.patch} | 10 ++-- .../0045-Add-BeaconEffectEvent.patch} | 0 ...igurable-container-update-tick-rate.patch} | 8 ++-- ...0047-Use-UserCache-for-player-heads.patch} | 0 .../0048-Disable-spigot-tick-limiters.patch} | 4 +- .../0049-Add-PlayerInitialSpawnEvent.patch} | 8 ++-- ...rable-Disabling-Cat-Chest-Detection.patch} | 0 ...1-Ensure-commands-are-not-ran-async.patch} | 16 +++---- ...hunks-are-slime-spawn-chunks-toggle.patch} | 6 +-- .../0053-Expose-server-CommandMap.patch} | 4 +- ...-informative-in-maxHealth-exception.patch} | 0 ...0055-Player-Tab-List-and-Title-APIs.patch} | 4 +- ...d-configurable-portal-search-radius.patch} | 8 ++-- .../0057-Add-velocity-warnings.patch} | 10 ++-- ...le-inter-world-teleportation-safety.patch} | 4 +- .../0059-Add-exception-reporting-event.patch} | 16 +++---- ...don-t-need-to-when-cerealising-text.patch} | 0 ...reboards-for-non-players-by-default.patch} | 18 ++++---- ...orking-with-arrows-stuck-in-living-.patch} | 0 45 files changed, 170 insertions(+), 187 deletions(-) rename patches/{unapplied/server/0019-Add-command-line-option-to-load-extra-plugin-jars-no.patch => server/0018-Add-command-line-option-to-load-extra-plugin-jars-no.patch} (94%) rename patches/{unapplied/server/0020-Configurable-cactus-bamboo-and-reed-growth-heights.patch => server/0019-Configurable-cactus-bamboo-and-reed-growth-heights.patch} (96%) rename patches/{unapplied/server/0021-Configurable-baby-zombie-movement-speed.patch => server/0020-Configurable-baby-zombie-movement-speed.patch} (92%) rename patches/{unapplied/server/0022-Configurable-fishing-time-ranges.patch => server/0021-Configurable-fishing-time-ranges.patch} (94%) rename patches/{unapplied/server/0023-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch => server/0022-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch} (87%) rename patches/{unapplied/server/0024-Add-configurable-despawn-distances-for-living-entiti.patch => server/0023-Add-configurable-despawn-distances-for-living-entiti.patch} (89%) rename patches/{unapplied/server/0025-Allow-for-toggling-of-spawn-chunks.patch => server/0024-Allow-for-toggling-of-spawn-chunks.patch} (85%) rename patches/{unapplied/server/0026-Drop-falling-block-and-tnt-entities-at-the-specified.patch => server/0025-Drop-falling-block-and-tnt-entities-at-the-specified.patch} (83%) rename patches/{unapplied/server/0027-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch => server/0026-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch} (86%) rename patches/{unapplied/server/0028-Implement-Paper-VersionChecker.patch => server/0027-Implement-Paper-VersionChecker.patch} (98%) rename patches/{unapplied/server/0029-Add-version-history-to-version-command.patch => server/0028-Add-version-history-to-version-command.patch} (97%) rename patches/{unapplied/server/0030-Player-affects-spawning-API.patch => server/0029-Player-affects-spawning-API.patch} (73%) rename patches/{unapplied/server/0031-Further-improve-server-tick-loop.patch => server/0030-Further-improve-server-tick-loop.patch} (92%) rename patches/{unapplied/server/0032-Only-refresh-abilities-if-needed.patch => server/0031-Only-refresh-abilities-if-needed.patch} (87%) rename patches/{unapplied/server/0033-Entity-Origin-API.patch => server/0032-Entity-Origin-API.patch} (89%) rename patches/{unapplied/server/0034-Prevent-tile-entity-and-entity-crashes.patch => server/0033-Prevent-tile-entity-and-entity-crashes.patch} (92%) rename patches/{unapplied/server/0035-Configurable-top-of-nether-void-damage.patch => server/0034-Configurable-top-of-nether-void-damage.patch} (88%) rename patches/{unapplied/server/0036-Check-online-mode-before-converting-and-renaming-pla.patch => server/0035-Check-online-mode-before-converting-and-renaming-pla.patch} (92%) rename patches/{unapplied/server/0037-Always-tick-falling-blocks.patch => server/0036-Always-tick-falling-blocks.patch} (90%) rename patches/{unapplied/server/0038-Configurable-end-credits.patch => server/0037-Configurable-end-credits.patch} (76%) rename patches/{unapplied/server/0039-Fix-lag-from-explosions-processing-dead-entities.patch => server/0038-Fix-lag-from-explosions-processing-dead-entities.patch} (92%) rename patches/{unapplied/server/0040-Optimize-explosions.patch => server/0039-Optimize-explosions.patch} (93%) rename patches/{unapplied/server/0041-Disable-explosion-knockback.patch => server/0040-Disable-explosion-knockback.patch} (86%) rename patches/{unapplied/server/0042-Disable-thunder.patch => server/0041-Disable-thunder.patch} (88%) rename patches/{unapplied/server/0043-Disable-ice-and-snow.patch => server/0042-Disable-ice-and-snow.patch} (81%) rename patches/{unapplied/server/0044-Configurable-mob-spawner-tick-rate.patch => server/0043-Configurable-mob-spawner-tick-rate.patch} (66%) rename patches/{unapplied/server/0045-Implement-PlayerLocaleChangeEvent.patch => server/0044-Implement-PlayerLocaleChangeEvent.patch} (85%) rename patches/{unapplied/server/0046-Add-BeaconEffectEvent.patch => server/0045-Add-BeaconEffectEvent.patch} (100%) rename patches/{unapplied/server/0047-Configurable-container-update-tick-rate.patch => server/0046-Configurable-container-update-tick-rate.patch} (76%) rename patches/{unapplied/server/0048-Use-UserCache-for-player-heads.patch => server/0047-Use-UserCache-for-player-heads.patch} (100%) rename patches/{unapplied/server/0049-Disable-spigot-tick-limiters.patch => server/0048-Disable-spigot-tick-limiters.patch} (88%) rename patches/{unapplied/server/0050-Add-PlayerInitialSpawnEvent.patch => server/0049-Add-PlayerInitialSpawnEvent.patch} (86%) rename patches/{unapplied/server/0051-Configurable-Disabling-Cat-Chest-Detection.patch => server/0050-Configurable-Disabling-Cat-Chest-Detection.patch} (100%) rename patches/{unapplied/server/0052-Ensure-commands-are-not-ran-async.patch => server/0051-Ensure-commands-are-not-ran-async.patch} (93%) rename patches/{unapplied/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch => server/0052-All-chunks-are-slime-spawn-chunks-toggle.patch} (89%) rename patches/{unapplied/server/0054-Expose-server-CommandMap.patch => server/0053-Expose-server-CommandMap.patch} (78%) rename patches/{unapplied/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch => server/0054-Be-a-bit-more-informative-in-maxHealth-exception.patch} (100%) rename patches/{unapplied/server/0056-Player-Tab-List-and-Title-APIs.patch => server/0055-Player-Tab-List-and-Title-APIs.patch} (98%) rename patches/{unapplied/server/0057-Add-configurable-portal-search-radius.patch => server/0056-Add-configurable-portal-search-radius.patch} (89%) rename patches/{unapplied/server/0058-Add-velocity-warnings.patch => server/0057-Add-velocity-warnings.patch} (89%) rename patches/{unapplied/server/0059-Configurable-inter-world-teleportation-safety.patch => server/0058-Configurable-inter-world-teleportation-safety.patch} (91%) rename patches/{unapplied/server/0060-Add-exception-reporting-event.patch => server/0059-Add-exception-reporting-event.patch} (95%) rename patches/{unapplied/server/0061-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch => server/0060-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch} (100%) rename patches/{unapplied/server/0062-Disable-Scoreboards-for-non-players-by-default.patch => server/0061-Disable-Scoreboards-for-non-players-by-default.patch} (58%) rename patches/{unapplied/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch => server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch} (100%) diff --git a/patches/unapplied/server/0019-Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/server/0018-Add-command-line-option-to-load-extra-plugin-jars-no.patch similarity index 94% rename from patches/unapplied/server/0019-Add-command-line-option-to-load-extra-plugin-jars-no.patch rename to patches/server/0018-Add-command-line-option-to-load-extra-plugin-jars-no.patch index baa3e386df..efacbda28c 100644 --- a/patches/unapplied/server/0019-Add-command-line-option-to-load-extra-plugin-jars-no.patch +++ b/patches/server/0018-Add-command-line-option-to-load-extra-plugin-jars-no.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3a7d50651ab149665ac655b4f264278608335486..0a7979357a8c1e815d9527c341381b231d9e7bbd 100644 +index 1b6ca18237de5f154a1b0ddaea34347869fa637e..1aeff8d9ff446369dbcae30bcff26f94f7af0a25 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -423,6 +423,35 @@ public final class CraftServer implements Server { @@ -47,7 +47,7 @@ index 3a7d50651ab149665ac655b4f264278608335486..0a7979357a8c1e815d9527c341381b23 if (type == PluginLoadOrder.STARTUP) { this.helpMap.clear(); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index ab22205c758768cd0c8a4fc6bca3d7de2e823078..ff955d3a20bf953770cc81f8b89a6d4425a5f813 100644 +index 15b886634112b2a18b7952107b49ae1430376a3d..47c3c7484687b808341937f7e4ef1c0c410fa59f 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -159,6 +159,12 @@ public class Main { diff --git a/patches/unapplied/server/0020-Configurable-cactus-bamboo-and-reed-growth-heights.patch b/patches/server/0019-Configurable-cactus-bamboo-and-reed-growth-heights.patch similarity index 96% rename from patches/unapplied/server/0020-Configurable-cactus-bamboo-and-reed-growth-heights.patch rename to patches/server/0019-Configurable-cactus-bamboo-and-reed-growth-heights.patch index 11ae2153e0..2fd08b41ef 100644 --- a/patches/unapplied/server/0020-Configurable-cactus-bamboo-and-reed-growth-heights.patch +++ b/patches/server/0019-Configurable-cactus-bamboo-and-reed-growth-heights.patch @@ -65,7 +65,7 @@ index 0d05ad9c0b5043e58d639041cfe3fb7a27f373a3..a5d391af2c6b733d653188f4aeeec2af } diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java -index 812813180b7022107ebb09d51ebfd1315d6f8085..f5c21d510351ea8ff76d89fe859f187a3106cc30 100644 +index a7e8be5545ef6c2ff9a056d297d11850d07bdd1c..2c3bbe4f295be9782c11af13c2cf9c05f27313d9 100644 --- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java @@ -54,7 +54,7 @@ public class CactusBlock extends Block { @@ -78,7 +78,7 @@ index 812813180b7022107ebb09d51ebfd1315d6f8085..f5c21d510351ea8ff76d89fe859f187a int modifier = world.spigotConfig.cactusModifier; // Spigot - SPIGOT-7159: Better modifier resolution diff --git a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java -index 2aa81f93a2e1e94d0788b4d7b67f94494101c397..6b400a4759c8c8612a3b5c96ca0d87ef9dc71435 100644 +index 7fbc511eb1cbfedc3bbf5bff7a61e8f74c294140..c3f500580d257e1397f2eb7c47b063a6fe6bb405 100644 --- a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java @@ -52,7 +52,7 @@ public class SugarCaneBlock extends Block { diff --git a/patches/unapplied/server/0021-Configurable-baby-zombie-movement-speed.patch b/patches/server/0020-Configurable-baby-zombie-movement-speed.patch similarity index 92% rename from patches/unapplied/server/0021-Configurable-baby-zombie-movement-speed.patch rename to patches/server/0020-Configurable-baby-zombie-movement-speed.patch index 7b0cc4765a..b3104f011c 100644 --- a/patches/unapplied/server/0021-Configurable-baby-zombie-movement-speed.patch +++ b/patches/server/0020-Configurable-baby-zombie-movement-speed.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable baby zombie movement speed diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 251487682550af7492068bd461bf0c61760de0fa..8ea60d388fff4a6368652ff96f648e5880053a2b 100644 +index 5508dd33111a8206cbda4caf9d5003574d91d371..41e4903b4feb860309510f8f4ff89a4e3710b395 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java @@ -77,6 +77,7 @@ public class Zombie extends Monster { @@ -17,7 +17,7 @@ index 251487682550af7492068bd461bf0c61760de0fa..8ea60d388fff4a6368652ff96f648e58 private static final EntityDataAccessor DATA_SPECIAL_TYPE_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.INT); public static final EntityDataAccessor DATA_DROWNED_CONVERSION_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN); @@ -185,9 +186,9 @@ public class Zombie extends Monster { - if (this.level != null && !this.level.isClientSide) { + if (this.level() != null && !this.level().isClientSide) { AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED); - attributemodifiable.removeModifier(Zombie.SPEED_MODIFIER_BABY); diff --git a/patches/unapplied/server/0022-Configurable-fishing-time-ranges.patch b/patches/server/0021-Configurable-fishing-time-ranges.patch similarity index 94% rename from patches/unapplied/server/0022-Configurable-fishing-time-ranges.patch rename to patches/server/0021-Configurable-fishing-time-ranges.patch index e0fa197128..6183a7e9d3 100644 --- a/patches/unapplied/server/0022-Configurable-fishing-time-ranges.patch +++ b/patches/server/0021-Configurable-fishing-time-ranges.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable fishing time ranges diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -index b202a522606b9335ebab1c21a2c50fb5f7e9791b..9a753ffd35403358df07408ffe85197ee3318f39 100644 +index 94ca8ae42ef02cea92c4029d219edfe69abb4ce3..4377a0f7387a09983a5580d408775f386ea5f487 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java @@ -92,6 +92,10 @@ public class FishingHook extends Projectile { diff --git a/patches/unapplied/server/0023-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch b/patches/server/0022-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch similarity index 87% rename from patches/unapplied/server/0023-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch rename to patches/server/0022-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch index d4c8f5b2f9..c156c1e31f 100644 --- a/patches/unapplied/server/0023-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch +++ b/patches/server/0022-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow nerfed mobs to jump and take water damage diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index a290487b153a66a3e936ed1183f3c2ce343e59b1..ce1b3b607c21307fe3ea65590fa63265a6f67ac8 100644 +index c2c2c24a593f67abc1eec4a20ced1ec0b5fa8cad..b3de20af553414369784b17139dd9185cc715db2 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -110,6 +110,7 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -109,6 +109,7 @@ public abstract class Mob extends LivingEntity implements Targeting { private final BodyRotationControl bodyRotationControl; protected PathNavigation navigation; public GoalSelector goalSelector; @@ -16,7 +16,7 @@ index a290487b153a66a3e936ed1183f3c2ce343e59b1..ce1b3b607c21307fe3ea65590fa63265 public GoalSelector targetSelector; @Nullable private LivingEntity target; -@@ -865,7 +866,17 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -868,7 +869,17 @@ public abstract class Mob extends LivingEntity implements Targeting { @Override protected final void serverAiStep() { ++this.noActionTime; @@ -32,9 +32,9 @@ index a290487b153a66a3e936ed1183f3c2ce343e59b1..ce1b3b607c21307fe3ea65590fa63265 + return; + } + // Paper end - this.level.getProfiler().push("sensing"); + this.level().getProfiler().push("sensing"); this.sensing.tick(); - this.level.getProfiler().pop(); + this.level().getProfiler().pop(); diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java index 01950951ea06e43bedeeede489a112e577617829..7093c62be53fe99ed9880fc8ddaa07440fe4f715 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java diff --git a/patches/unapplied/server/0024-Add-configurable-despawn-distances-for-living-entiti.patch b/patches/server/0023-Add-configurable-despawn-distances-for-living-entiti.patch similarity index 89% rename from patches/unapplied/server/0024-Add-configurable-despawn-distances-for-living-entiti.patch rename to patches/server/0023-Add-configurable-despawn-distances-for-living-entiti.patch index 6eebfac0de..063aef3159 100644 --- a/patches/unapplied/server/0024-Add-configurable-despawn-distances-for-living-entiti.patch +++ b/patches/server/0023-Add-configurable-despawn-distances-for-living-entiti.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable despawn distances for living entities diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 8dea6df3456fd37095400711c94b0d0866988745..f74e1788692c3f9b291e6ba5043944a3179b97e1 100644 +index b3de20af553414369784b17139dd9185cc715db2..cb58d527b72f047299ae5ed71a29ce0178de6e6a 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -841,14 +841,14 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -844,14 +844,14 @@ public abstract class Mob extends LivingEntity implements Targeting { if (entityhuman != null) { double d0 = entityhuman.distanceToSqr((Entity) this); diff --git a/patches/unapplied/server/0025-Allow-for-toggling-of-spawn-chunks.patch b/patches/server/0024-Allow-for-toggling-of-spawn-chunks.patch similarity index 85% rename from patches/unapplied/server/0025-Allow-for-toggling-of-spawn-chunks.patch rename to patches/server/0024-Allow-for-toggling-of-spawn-chunks.patch index 1264d36158..905a52fbd1 100644 --- a/patches/unapplied/server/0025-Allow-for-toggling-of-spawn-chunks.patch +++ b/patches/server/0024-Allow-for-toggling-of-spawn-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow for toggling of spawn chunks diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 0517c0932b79db1a0e27673654ae8bb5fd740425..0ce746ac2f448191854f6faa4e1876d869d8d38d 100644 +index d87f02c748fe2e5b4ea251f6691e8907a152cb6d..f21ba175538436e59c45d5350ef7b2605ed96775 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -262,6 +262,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -261,6 +261,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { }); // CraftBukkit end timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings diff --git a/patches/unapplied/server/0026-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/patches/server/0025-Drop-falling-block-and-tnt-entities-at-the-specified.patch similarity index 83% rename from patches/unapplied/server/0026-Drop-falling-block-and-tnt-entities-at-the-specified.patch rename to patches/server/0025-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 411a92ee08..5792d81545 100644 --- a/patches/unapplied/server/0026-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/patches/server/0025-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -6,14 +6,13 @@ Subject: [PATCH] Drop falling block and tnt entities at the specified height Co-authored-by: Jake Potrebic diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index 7726bef38c7b9a81fd82960143fd07db18960087..88ea09b2f1c33e9fb528aad1564ae858c3c8b064 100644 +index da6e806288cf3afc2c72228844d1d05eee8324a5..2905556cbb4715b0dcbaab54222e76669ce0e81d 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -140,6 +140,17 @@ public class FallingBlockEntity extends Entity { +@@ -140,6 +140,16 @@ public class FallingBlockEntity extends Entity { } this.move(MoverType.SELF, this.getDeltaMovement()); -+ + // Paper start - Configurable EntityFallingBlock height nerf + if (this.level.paperConfig().fixes.fallingBlockHeightNerf.test(v -> this.getY() > v)) { + if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { @@ -24,11 +23,11 @@ index 7726bef38c7b9a81fd82960143fd07db18960087..88ea09b2f1c33e9fb528aad1564ae858 + return; + } + // Paper end - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { BlockPos blockposition = this.blockPosition(); boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock; diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java -index 6999fa7217a76e1e41c96b8522a2e210a7e6e4cf..c133d51a363900164c1492359be5b1579806d5cb 100644 +index 320966e6e55dad3a96fee25fe0f69135d86ee8bc..c1a1b320a6f2a97e8d51a3e8fac624243603e368 100644 --- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java @@ -66,6 +66,12 @@ public class PrimedTnt extends Entity implements TraceableEntity { @@ -42,10 +41,10 @@ index 6999fa7217a76e1e41c96b8522a2e210a7e6e4cf..c133d51a363900164c1492359be5b157 + } + // Paper end this.setDeltaMovement(this.getDeltaMovement().scale(0.98D)); - if (this.onGround) { + if (this.onGround()) { this.setDeltaMovement(this.getDeltaMovement().multiply(0.7D, -0.5D, 0.7D)); diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java -index 5b8574af6eae84a5957e4ce6acd4e9722835a320..accfb39539aea045e0c741a74b8bd50c752d326c 100644 +index 137f9052701c5b10ff03b01316ced37220dbf280..ca61c84cffb4ed80281bbc587f882840964ac92d 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java @@ -53,6 +53,12 @@ public class MinecartTNT extends AbstractMinecart { @@ -59,5 +58,5 @@ index 5b8574af6eae84a5957e4ce6acd4e9722835a320..accfb39539aea045e0c741a74b8bd50c + } + // Paper end --this.fuse; - this.level.addParticle(ParticleTypes.SMOKE, this.getX(), this.getY() + 0.5D, this.getZ(), 0.0D, 0.0D, 0.0D); + this.level().addParticle(ParticleTypes.SMOKE, this.getX(), this.getY() + 0.5D, this.getZ(), 0.0D, 0.0D, 0.0D); } else if (this.fuse == 0) { diff --git a/patches/unapplied/server/0027-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/patches/server/0026-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch similarity index 86% rename from patches/unapplied/server/0027-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch rename to patches/server/0026-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 5cbdc9847d..33a4b13e2e 100644 --- a/patches/unapplied/server/0027-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/patches/server/0026-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6251d93c2ea61c471b4e1069048327782acc78e7..d3cd196e1a6f707ed5e0008123cc65df80422859 100644 +index 96897d883671e018bae5f71545c5f7af205e309c..ff3073b6780c04f5f11b5384bb6b6289eafd0c4f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1462,7 +1462,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop withinDistance(double x, double y, double z, double max) { double d4 = max * max; diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 9feb422045c5c47bbf48a5f75f437e51f19e1595..e06dc3f6c03276afb2ab3e0ec24cba707e09a24e 100644 +index cb58d527b72f047299ae5ed71a29ce0178de6e6a..2dc21048b968e7aa63b5b28cacdd1ae407c06958 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -837,7 +837,7 @@ public abstract class Mob extends LivingEntity implements Targeting { - if (this.level.getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) { +@@ -840,7 +840,7 @@ public abstract class Mob extends LivingEntity implements Targeting { + if (this.level().getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) { this.discard(); } else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) { -- Player entityhuman = this.level.getNearestPlayer(this, -1.0D); -+ Player entityhuman = this.level.findNearbyPlayer(this, -1.0D, EntitySelector.PLAYER_AFFECTS_SPAWNING); // Paper +- Player entityhuman = this.level().getNearestPlayer(this, -1.0D); ++ Player entityhuman = this.level().getNearestPlayer(this, -1.0D, EntitySelector.PLAYER_AFFECTS_SPAWNING); // Paper if (entityhuman != null) { double d0 = entityhuman.distanceToSqr((Entity) this); diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java -index e368478dba01a9b11adf23ed64bed61c73a78a28..17fda4857f74d2994525262472700e7788dec383 100644 +index c7ab59aa0e2fd0f3e7252647ddb25b82ac604830..8f20239f3ef7ebe41fac8ee6e024c36dafec33c4 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java @@ -25,7 +25,7 @@ public class SkeletonTrapGoal extends Goal { @Override public boolean canUse() { -- return this.horse.level.hasNearbyAlivePlayer(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D); -+ return this.horse.level.hasNearbyAlivePlayerThatAffectsSpawning(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D); // Paper - Affects Spawning API +- return this.horse.level().hasNearbyAlivePlayer(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D); ++ return this.horse.level().hasNearbyAlivePlayerThatAffectsSpawning(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D); // Paper - Affects Spawning API } @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java -index b5ee60c62cf1b8c59fdd7c8e6934321453015fd6..23ded94c7c7e4f96951e281efff499f1c61ec5c0 100644 +index 1d1bd8c8088e9dfbcbd7e9d2971b6241614fc5d6..d99923c355e50bfa4682dd147d83dd1cf58553f1 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java +++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java @@ -127,7 +127,7 @@ public class Silverfish extends Monster { @@ -60,23 +60,23 @@ index b5ee60c62cf1b8c59fdd7c8e6934321453015fd6..23ded94c7c7e4f96951e281efff499f1 return false; } diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 8ea60d388fff4a6368652ff96f648e5880053a2b..8ecbb64f9db9346757c5597404489496a0945508 100644 +index 41e4903b4feb860309510f8f4ff89a4e3710b395..d07e321a3836a15058f11c88cc0deedb124bb407 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java @@ -325,7 +325,7 @@ public class Zombie extends Monster { - if (NaturalSpawner.isSpawnPositionOk(entitypositiontypes_surface, this.level, blockposition, entitytypes) && SpawnPlacements.checkSpawnRules(entitytypes, worldserver, MobSpawnType.REINFORCEMENT, blockposition, this.level.random)) { + if (NaturalSpawner.isSpawnPositionOk(entitypositiontypes_surface, this.level(), blockposition, entitytypes) && SpawnPlacements.checkSpawnRules(entitytypes, worldserver, MobSpawnType.REINFORCEMENT, blockposition, this.level().random)) { entityzombie.setPos((double) i1, (double) j1, (double) k1); -- if (!this.level.hasNearbyAlivePlayer((double) i1, (double) j1, (double) k1, 7.0D) && this.level.isUnobstructed(entityzombie) && this.level.noCollision((Entity) entityzombie) && !this.level.containsAnyLiquid(entityzombie.getBoundingBox())) { -+ if (!this.level.hasNearbyAlivePlayerThatAffectsSpawning((double) i1, (double) j1, (double) k1, 7.0D) && this.level.isUnobstructed(entityzombie) && this.level.noCollision((Entity) entityzombie) && !this.level.containsAnyLiquid(entityzombie.getBoundingBox())) { // Paper - Affects Spawning API +- if (!this.level().hasNearbyAlivePlayer((double) i1, (double) j1, (double) k1, 7.0D) && this.level().isUnobstructed(entityzombie) && this.level().noCollision((Entity) entityzombie) && !this.level().containsAnyLiquid(entityzombie.getBoundingBox())) { ++ if (!this.level().hasNearbyAlivePlayerThatAffectsSpawning((double) i1, (double) j1, (double) k1, 7.0D) && this.level().isUnobstructed(entityzombie) && this.level().noCollision((Entity) entityzombie) && !this.level().containsAnyLiquid(entityzombie.getBoundingBox())) { // Paper - Affects Spawning API entityzombie.setTarget(entityliving, EntityTargetEvent.TargetReason.REINFORCEMENT_TARGET, true); // CraftBukkit - entityzombie.finalizeSpawn(worldserver, this.level.getCurrentDifficultyAt(entityzombie.blockPosition()), MobSpawnType.REINFORCEMENT, (SpawnGroupData) null, (CompoundTag) null); + entityzombie.finalizeSpawn(worldserver, this.level().getCurrentDifficultyAt(entityzombie.blockPosition()), MobSpawnType.REINFORCEMENT, (SpawnGroupData) null, (CompoundTag) null); worldserver.addFreshEntityWithPassengers(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit 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 018abaa48614ce2d25df2085bbb65b0b6e0312e7..b36a601ac792f2b1a51f0ae72ae12d992ac38d61 100644 +index a76f1ed7b8dc1aacda987931772cb3bf8f29be42..c20753645585143421eb544a03884f0765eafb8b 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -182,6 +182,9 @@ public abstract class Player extends LivingEntity { +@@ -183,6 +183,9 @@ public abstract class Player extends LivingEntity { @Nullable public FishingHook fishing; protected float hurtDir; @@ -87,7 +87,7 @@ index 018abaa48614ce2d25df2085bbb65b0b6e0312e7..b36a601ac792f2b1a51f0ae72ae12d99 // CraftBukkit start public boolean fauxSleeping; diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 776dfbf3b33317370db3b50b8bbb95823344ee06..7b60c13cbe3d2a0d0657391a7b6be4e3706720fa 100644 +index 8d60b430357a1b761de325a21e1c52639a049403..213fed3a2b32226fc128d213ee3e9fa3ae76e88e 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java @@ -54,7 +54,7 @@ public abstract class BaseSpawner { @@ -100,10 +100,10 @@ index 776dfbf3b33317370db3b50b8bbb95823344ee06..7b60c13cbe3d2a0d0657391a7b6be4e3 public void clientTick(Level world, BlockPos pos) { diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java -index be6e3e21ad62da01e5e2dd78e300cbc8efdbeb42..ea98625fe7c00743b8df74a24e6d4b75df4189a5 100644 +index 127c4ebedb94631ceac92dbdcd465e904217d715..5e19b91e6fb7e5e354f55ea206b3d59e8767e714 100644 --- a/src/main/java/net/minecraft/world/level/EntityGetter.java +++ b/src/main/java/net/minecraft/world/level/EntityGetter.java -@@ -82,6 +82,11 @@ public interface EntityGetter { +@@ -70,6 +70,11 @@ public interface EntityGetter { } } @@ -115,7 +115,7 @@ index be6e3e21ad62da01e5e2dd78e300cbc8efdbeb42..ea98625fe7c00743b8df74a24e6d4b75 @Nullable default Player getNearestPlayer(double x, double y, double z, double maxDistance, @Nullable Predicate targetPredicate) { double d = -1.0D; -@@ -111,6 +116,20 @@ public interface EntityGetter { +@@ -99,6 +104,20 @@ public interface EntityGetter { return this.getNearestPlayer(x, y, z, maxDistance, predicate); } @@ -137,10 +137,10 @@ index be6e3e21ad62da01e5e2dd78e300cbc8efdbeb42..ea98625fe7c00743b8df74a24e6d4b75 for(Player player : this.players()) { if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5237eb9d18fa3ed0474b9c3aa166058c21a66d5e..50612858a0000d488dd9838ebd79403e1edd03e4 100644 +index ebe5ed6ec66ec5f0979c8ff2998a9d6c1539b2fe..e68f0f2cde8ab40087bf26b93d053c2a0a49436c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2238,8 +2238,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2169,8 +2169,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { return this.getHandle().locale; diff --git a/patches/unapplied/server/0031-Further-improve-server-tick-loop.patch b/patches/server/0030-Further-improve-server-tick-loop.patch similarity index 92% rename from patches/unapplied/server/0031-Further-improve-server-tick-loop.patch rename to patches/server/0030-Further-improve-server-tick-loop.patch index eb933e0675..4ccf92dbb8 100644 --- a/patches/unapplied/server/0031-Further-improve-server-tick-loop.patch +++ b/patches/server/0030-Further-improve-server-tick-loop.patch @@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d3cd196e1a6f707ed5e0008123cc65df80422859..a7f9a3e57c7736b065b8dc4dba6e018ce73e5157 100644 +index ff3073b6780c04f5f11b5384bb6b6289eafd0c4f..2aeeffe6d011a1ecc848b80f0236c8a3f871a01c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -285,7 +285,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 5000L && this.nextTickTime - this.lastOverloadWarning >= 30000L) { // CraftBukkit long j = i / 50L; -@@ -992,12 +1044,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 5fb5e97c7480eea1592b80f8d8e4c4febbb6faa8..e660773a2b0da661e151559f9bf988c4cb148a77 100644 +index 06d8211ef27a21da66d4622795cbcc8b37d2ce4e..7358b918d03b0dee0541843a952d6b8bf939d877 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -709,7 +709,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -663,7 +663,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } - public void checkOutOfWorld() { -- if (this.getY() < (double) (this.level.getMinBuildHeight() - 64)) { + public void checkBelowWorld() { +- if (this.getY() < (double) (this.level().getMinBuildHeight() - 64)) { + // Paper start - Configurable nether ceiling damage + if (this.getY() < (double) (this.level.getMinBuildHeight() - 64) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER + && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v) + && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) { + // Paper end - this.outOfWorld(); + this.onBelowWorld(); } diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java -index 98cdf291a5d0248091891ad30104adef708eec55..ff57611088eabfb7e2db8fcf6344b1551b17b87b 100644 +index 02e3322ec41108fe9275510e2daa833d180353dc..3668f9775f377434779a8e519b10a11cf7b14dd5 100644 --- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java @@ -55,7 +55,7 @@ public class PortalForcer { diff --git a/patches/unapplied/server/0036-Check-online-mode-before-converting-and-renaming-pla.patch b/patches/server/0035-Check-online-mode-before-converting-and-renaming-pla.patch similarity index 92% rename from patches/unapplied/server/0036-Check-online-mode-before-converting-and-renaming-pla.patch rename to patches/server/0035-Check-online-mode-before-converting-and-renaming-pla.patch index 0bdc8c4d4c..167b258277 100644 --- a/patches/unapplied/server/0036-Check-online-mode-before-converting-and-renaming-pla.patch +++ b/patches/server/0035-Check-online-mode-before-converting-and-renaming-pla.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Check online mode before converting and renaming player data diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -index e0bb30446757045e89b227ff2f0136b371ca64cd..9d25ab52fac9e22d74f874491c7efbcaafa2ffc6 100644 +index e2c0ab0ab06b15dcfa6ce8c82ad4136f2be33b5c..984b75e12b5feab63767e030df925b3cbf26d559 100644 --- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java +++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java @@ -56,7 +56,7 @@ public class PlayerDataStorage { diff --git a/patches/unapplied/server/0037-Always-tick-falling-blocks.patch b/patches/server/0036-Always-tick-falling-blocks.patch similarity index 90% rename from patches/unapplied/server/0037-Always-tick-falling-blocks.patch rename to patches/server/0036-Always-tick-falling-blocks.patch index 39f37a0fd0..cb761cc088 100644 --- a/patches/unapplied/server/0037-Always-tick-falling-blocks.patch +++ b/patches/server/0036-Always-tick-falling-blocks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Always tick falling blocks diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index d3639643cda7d8ccf3c1208502605120590a2d30..e2dfc4d9a16a738dd0fe91838603e1d4370afa56 100644 +index 3e5d541d3d7fc3956b2fc68da9f22a0ab0367ce9..66dbfabdb104d272d48588a4773d198d3938f1ef 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -89,6 +89,7 @@ public class ActivationRange diff --git a/patches/unapplied/server/0038-Configurable-end-credits.patch b/patches/server/0037-Configurable-end-credits.patch similarity index 76% rename from patches/unapplied/server/0038-Configurable-end-credits.patch rename to patches/server/0037-Configurable-end-credits.patch index 21f1d38435..9df9f0f18b 100644 --- a/patches/unapplied/server/0038-Configurable-end-credits.patch +++ b/patches/server/0037-Configurable-end-credits.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Configurable end credits diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 8105a30251c45b4ab111c97d34029c66180922fd..0d06bb85f2c81331dcf5cccde31c650a7c46f0b9 100644 +index 5872ead2fe3a64f02f8bc36603fbb856728fd255..d5fda07eb5408513fa0b4bca3fa14679b2beebe7 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1025,6 +1025,7 @@ public class ServerPlayer extends Player { +@@ -1024,6 +1024,7 @@ public class ServerPlayer extends Player { this.unRide(); - this.getLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); + this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); if (!this.wonGame) { + if (level.paperConfig().misc.disableEndCredits) this.seenCredits = true; // Paper - Toggle to always disable end credits this.wonGame = true; diff --git a/patches/unapplied/server/0039-Fix-lag-from-explosions-processing-dead-entities.patch b/patches/server/0038-Fix-lag-from-explosions-processing-dead-entities.patch similarity index 92% rename from patches/unapplied/server/0039-Fix-lag-from-explosions-processing-dead-entities.patch rename to patches/server/0038-Fix-lag-from-explosions-processing-dead-entities.patch index eeb8a45109..0e8f302271 100644 --- a/patches/unapplied/server/0039-Fix-lag-from-explosions-processing-dead-entities.patch +++ b/patches/server/0038-Fix-lag-from-explosions-processing-dead-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix lag from explosions processing dead entities diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index a1ef2b5bc6c93b6117fba4c5664cff8131f0df2e..594ac935ae8f77fc16be90ac178581cbdfc65eb7 100644 +index 31bc6aa727a1828cd353a0bdf51e40baabb50203..e360022498b91a8371b33d84bf6fff96c503999d 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java @@ -202,7 +202,7 @@ public class Explosion { diff --git a/patches/unapplied/server/0040-Optimize-explosions.patch b/patches/server/0039-Optimize-explosions.patch similarity index 93% rename from patches/unapplied/server/0040-Optimize-explosions.patch rename to patches/server/0039-Optimize-explosions.patch index 8c280d9053..dea48dcbdc 100644 --- a/patches/unapplied/server/0040-Optimize-explosions.patch +++ b/patches/server/0039-Optimize-explosions.patch @@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving an entity's exposure during an explosion. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a7f9a3e57c7736b065b8dc4dba6e018ce73e5157..1554f8847e42cdd584b16c0648c21c4071aea6de 100644 +index 2aeeffe6d011a1ecc848b80f0236c8a3f871a01c..d5ad3368a397e9fc02506187ccb1c386afd9ce2b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1408,6 +1408,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5291581c87b65be72f482b4da1fccd33fa053591..dae74cda3b9faa0c8aeecc6c7bc329950033f653 100644 +index 403f7c7f31e0072b0cad0706bc981ece24733a1d..42a44820a3c13e2b0e29e02ed384c1918c9a0b17 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2042,7 +2042,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2034,7 +2034,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return true; } @@ -33,7 +33,7 @@ index 5291581c87b65be72f482b4da1fccd33fa053591..dae74cda3b9faa0c8aeecc6c7bc32995 for (int i = 0; i < message.length(); ++i) { if (!SharedConstants.isAllowedChatCharacter(message.charAt(i))) { return true; -@@ -2059,7 +2059,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2051,7 +2051,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } OutgoingChatMessage outgoing = OutgoingChatMessage.create(original); @@ -42,7 +42,7 @@ index 5291581c87b65be72f482b4da1fccd33fa053591..dae74cda3b9faa0c8aeecc6c7bc32995 this.handleCommand(s); } else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { // Do nothing, this is coming from a plugin -@@ -2149,7 +2149,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2141,7 +2141,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } @@ -74,7 +74,7 @@ index 5291581c87b65be72f482b4da1fccd33fa053591..dae74cda3b9faa0c8aeecc6c7bc32995 if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c454a9078e8a498095a078ec8d2acd2c32ccb991..ad6cb2a20bb494b9c0618e42d612fdd4639017cb 100644 +index 1e601581d7b6bb59ccec3c0b4a87747ec6c64f84..d3254e29df8543de33923a54b78c3af027e68b71 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -875,6 +875,28 @@ public final class CraftServer implements Server { @@ -107,10 +107,10 @@ index c454a9078e8a498095a078ec8d2acd2c32ccb991..ad6cb2a20bb494b9c0618e42d612fdd4 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 ada4dfb8e520eb2e383373771719f924b2062d1b..ce45e409ea3413cabb2e77c7013fa9b867817ad6 100644 +index cef936dea0592b08b1cca0482d1220ffe4b2c05a..b1f69f7183b2765695446fd587527def4dd8c4c9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -512,7 +512,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -437,7 +437,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void chat(String msg) { if (this.getHandle().connection == null) return; @@ -145,7 +145,7 @@ index 19c44daaa407b7c1c7a7ffe56fef8c8814c6d5b2..6a073a9dc44d93eba296a0e18a9c7be8 } finally { try { diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java -index 05e94702e42b8f5c35d2a112c486d57948a3acba..5409f230fdd53b70fc03c58177438534731ad4e6 100644 +index 78669fa035b7537ff7e533cf32aaf2995625424f..7585a30e8f063ac2656b5de519b1e9edaceffbc7 100644 --- a/src/main/java/org/spigotmc/AsyncCatcher.java +++ b/src/main/java/org/spigotmc/AsyncCatcher.java @@ -6,6 +6,7 @@ public class AsyncCatcher diff --git a/patches/unapplied/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch b/patches/server/0052-All-chunks-are-slime-spawn-chunks-toggle.patch similarity index 89% rename from patches/unapplied/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch rename to patches/server/0052-All-chunks-are-slime-spawn-chunks-toggle.patch index 2497cf2367..2873efd090 100644 --- a/patches/unapplied/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/patches/server/0052-All-chunks-are-slime-spawn-chunks-toggle.patch @@ -5,7 +5,7 @@ Subject: [PATCH] All chunks are slime spawn chunks toggle diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java -index ca1d97d6eeea2b0fd2a9b90624ca083026f549de..02aca470c3b41114204da54e2365ee29adad7554 100644 +index 23cb972ca3fde409be0d6517ef8f1c58dab47ff4..476a9b2db5deac803f1cb3c2cbe88b69cc3da8e5 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java @@ -318,7 +318,7 @@ public class Slime extends Mob implements Enemy { @@ -18,10 +18,10 @@ index ca1d97d6eeea2b0fd2a9b90624ca083026f549de..02aca470c3b41114204da54e2365ee29 if (random.nextInt(10) == 0 && flag && pos.getY() < 40) { return checkMobSpawnRules(type, world, spawnReason, pos, random); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 317bf725767e7dc8b916eeb8cd5bcd30ac219aaa..08bfd6d07383e2e92d1e46d95fafab76a8c1410b 100644 +index bf4b2f89d3a7133155c6272379c742318b2c1514..f07a6b1d782426581c84ffa19447c1375c4cbc07 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -169,7 +169,7 @@ public class CraftChunk implements Chunk { +@@ -213,7 +213,7 @@ public class CraftChunk implements Chunk { @Override public boolean isSlimeChunk() { // 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk diff --git a/patches/unapplied/server/0054-Expose-server-CommandMap.patch b/patches/server/0053-Expose-server-CommandMap.patch similarity index 78% rename from patches/unapplied/server/0054-Expose-server-CommandMap.patch rename to patches/server/0053-Expose-server-CommandMap.patch index e85a87473c..7dc95f7cf0 100644 --- a/patches/unapplied/server/0054-Expose-server-CommandMap.patch +++ b/patches/server/0053-Expose-server-CommandMap.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ad6cb2a20bb494b9c0618e42d612fdd4639017cb..bbe1147d7dc584c808c7f72747d48f5116e0e3dd 100644 +index d3254e29df8543de33923a54b78c3af027e68b71..0edef3dd3dafe59f296f7a82705ec2269e68a2d6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2014,6 +2014,7 @@ public final class CraftServer implements Server { +@@ -2012,6 +2012,7 @@ public final class CraftServer implements Server { return this.helpMap; } diff --git a/patches/unapplied/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch b/patches/server/0054-Be-a-bit-more-informative-in-maxHealth-exception.patch similarity index 100% rename from patches/unapplied/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch rename to patches/server/0054-Be-a-bit-more-informative-in-maxHealth-exception.patch diff --git a/patches/unapplied/server/0056-Player-Tab-List-and-Title-APIs.patch b/patches/server/0055-Player-Tab-List-and-Title-APIs.patch similarity index 98% rename from patches/unapplied/server/0056-Player-Tab-List-and-Title-APIs.patch rename to patches/server/0055-Player-Tab-List-and-Title-APIs.patch index 5d66ceedc0..ae01f03bb2 100644 --- a/patches/unapplied/server/0056-Player-Tab-List-and-Title-APIs.patch +++ b/patches/server/0055-Player-Tab-List-and-Title-APIs.patch @@ -63,7 +63,7 @@ index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a4 // Paper end buf.writeComponent(this.text); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ce45e409ea3413cabb2e77c7013fa9b867817ad6..aea668388c2960f515def749d4a8bf5359625dbd 100644 +index b1f69f7183b2765695446fd587527def4dd8c4c9..20daf74908ecb0c569bd92260c82d61bb5555cfd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,6 @@ @@ -73,7 +73,7 @@ index ce45e409ea3413cabb2e77c7013fa9b867817ad6..aea668388c2960f515def749d4a8bf53 import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; -@@ -358,6 +359,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -283,6 +284,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } diff --git a/patches/unapplied/server/0057-Add-configurable-portal-search-radius.patch b/patches/server/0056-Add-configurable-portal-search-radius.patch similarity index 89% rename from patches/unapplied/server/0057-Add-configurable-portal-search-radius.patch rename to patches/server/0056-Add-configurable-portal-search-radius.patch index dc3426b46b..3c91c95ccb 100644 --- a/patches/unapplied/server/0057-Add-configurable-portal-search-radius.patch +++ b/patches/server/0056-Add-configurable-portal-search-radius.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Add configurable portal search radius diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index e660773a2b0da661e151559f9bf988c4cb148a77..faa958b79b3e6d767f009e7b8b4a6cf1296e39ac 100644 +index 7358b918d03b0dee0541843a952d6b8bf939d877..4d12403d8ae7c620e169e87b0a0ab48e28251811 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3051,7 +3051,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { - double d0 = DimensionType.getTeleportationScale(this.level.dimensionType(), destination.dimensionType()); +@@ -3122,7 +3122,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { + double d0 = DimensionType.getTeleportationScale(this.level().dimensionType(), destination.dimensionType()); BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0); // CraftBukkit start - CraftPortalEvent event = this.callPortalEvent(this, destination, new PositionImpl(blockposition.getX(), blockposition.getY(), blockposition.getZ()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, flag2 ? 16 : 128, 16); @@ -24,7 +24,7 @@ index e660773a2b0da661e151559f9bf988c4cb148a77..faa958b79b3e6d767f009e7b8b4a6cf1 return null; } diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java -index ff57611088eabfb7e2db8fcf6344b1551b17b87b..d1c7eba29c64a6dbf55d3062ced9769eecb548ed 100644 +index 3668f9775f377434779a8e519b10a11cf7b14dd5..389b63605d416678d35666bbd46e0fa05a02f898 100644 --- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java @@ -43,7 +43,7 @@ public class PortalForcer { diff --git a/patches/unapplied/server/0058-Add-velocity-warnings.patch b/patches/server/0057-Add-velocity-warnings.patch similarity index 89% rename from patches/unapplied/server/0058-Add-velocity-warnings.patch rename to patches/server/0057-Add-velocity-warnings.patch index a433e4e7c8..c1f1c7f39e 100644 --- a/patches/unapplied/server/0058-Add-velocity-warnings.patch +++ b/patches/server/0057-Add-velocity-warnings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index bbe1147d7dc584c808c7f72747d48f5116e0e3dd..319caeca0737ab5b8f847a7e00784461839aad8c 100644 +index 0edef3dd3dafe59f296f7a82705ec2269e68a2d6..f8bb3493faf56a2e214dab9efb1c8f05b0b53fbd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -296,6 +296,7 @@ public final class CraftServer implements Server { @@ -17,7 +17,7 @@ index bbe1147d7dc584c808c7f72747d48f5116e0e3dd..319caeca0737ab5b8f847a7e00784461 static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 3a0d2613bc84659f9c618e20f3af27e75538331f..e93fef1dc636e98ca11a942d7254256401eb3486 100644 +index 0a6926f9b6be67d4d710d2fbc6bd2b1fcb0677a0..c9275f73be7332f79312037954f9685f6c1f800f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -465,10 +465,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -62,10 +62,10 @@ index 3a0d2613bc84659f9c618e20f3af27e75538331f..e93fef1dc636e98ca11a942d72542564 public double getHeight() { return this.getHandle().getBbHeight(); diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 11d7ede26b46d0bf9cced65e8c3bcc41c8b66dbf..3ad14bf0697e682a2e777baa8faeb323d127fb13 100644 +index d5863b0b06384b25eaa33572fa02649795463ed8..2693cc933d746e40d8a47d96c6cb6799f0a2472f 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java -@@ -80,7 +80,19 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa +@@ -80,7 +80,19 @@ public class WatchdogThread extends Thread log.log( Level.SEVERE, "During the run of the server, a physics stackoverflow was supressed" ); log.log( Level.SEVERE, "near " + net.minecraft.world.level.Level.lastPhysicsProblem ); } @@ -85,4 +85,4 @@ index 11d7ede26b46d0bf9cced65e8c3bcc41c8b66dbf..3ad14bf0697e682a2e777baa8faeb323 + // Paper end log.log( Level.SEVERE, "------------------------------" ); log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper - io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system + WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log ); diff --git a/patches/unapplied/server/0059-Configurable-inter-world-teleportation-safety.patch b/patches/server/0058-Configurable-inter-world-teleportation-safety.patch similarity index 91% rename from patches/unapplied/server/0059-Configurable-inter-world-teleportation-safety.patch rename to patches/server/0058-Configurable-inter-world-teleportation-safety.patch index 05975c8bfb..17ff3eb785 100644 --- a/patches/unapplied/server/0059-Configurable-inter-world-teleportation-safety.patch +++ b/patches/server/0058-Configurable-inter-world-teleportation-safety.patch @@ -16,10 +16,10 @@ The wanted destination was on top of the emerald block however the player ended This only is the case if the player is teleporting between worlds. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index aea668388c2960f515def749d4a8bf5359625dbd..470eac3191c09c7c7fe4b36165ed1c213bac421c 100644 +index 20daf74908ecb0c569bd92260c82d61bb5555cfd..2ab9fa95aecc9393a80b94a37915b4f22d83ce27 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1209,7 +1209,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1140,7 +1140,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entity.connection.teleport(to); } else { // The respawn reason should never be used if the passed location is non null. diff --git a/patches/unapplied/server/0060-Add-exception-reporting-event.patch b/patches/server/0059-Add-exception-reporting-event.patch similarity index 95% rename from patches/unapplied/server/0060-Add-exception-reporting-event.patch rename to patches/server/0059-Add-exception-reporting-event.patch index bb47a3a6ac..979e857a6d 100644 --- a/patches/unapplied/server/0060-Add-exception-reporting-event.patch +++ b/patches/server/0059-Add-exception-reporting-event.patch @@ -88,7 +88,7 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..fed09b886f4fa0006d160e5f2abb00df } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 8b554a7310c740f2a67476a189e8d15fb61f3fba..cff0be79e2dbb761ad2971bc3fcbd0d264505f1d 100644 +index 89e065a643eb16ccc308bcf42ea9f5d02c181a1f..49ef7d349e0e4b1d45611ff0a225ba94c3db2600 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -1,5 +1,10 @@ @@ -102,7 +102,7 @@ index 8b554a7310c740f2a67476a189e8d15fb61f3fba..cff0be79e2dbb761ad2971bc3fcbd0d2 import com.google.common.collect.Lists; import com.mojang.serialization.Codec; import java.io.IOException; -@@ -737,6 +742,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -725,6 +730,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper start - Prevent tile entity and entity crashes final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level.getWorld().getName(), entity.getX(), entity.getY(), entity.getZ()); MinecraftServer.LOGGER.error(msg, throwable); @@ -131,7 +131,7 @@ index f1675e35be0ab7670c875c6b0d1e982a3ae09d1e..b2bb9bbd3af414c50ec3f8e3e171a679 } 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 8254e72595ae5c1ddf5cf969570d83758b744c7b..03f7394057c927f55fa962a65988d03553c6a642 100644 +index 0ebee823180e91281fbde206a16d525277f0fb3d..7edb17360bc0611c6a1412b868ed128c9dbcfb4f 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -1,6 +1,7 @@ @@ -142,7 +142,7 @@ index 8254e72595ae5c1ddf5cf969570d83758b744c7b..03f7394057c927f55fa962a65988d035 import com.google.common.collect.Maps; import com.google.common.collect.UnmodifiableIterator; import com.mojang.logging.LogUtils; -@@ -598,10 +599,16 @@ public class LevelChunk extends ChunkAccess { +@@ -568,10 +569,16 @@ public class LevelChunk extends ChunkAccess { // CraftBukkit start } else { @@ -163,7 +163,7 @@ index 8254e72595ae5c1ddf5cf969570d83758b744c7b..03f7394057c927f55fa962a65988d035 // CraftBukkit end } } -@@ -1194,6 +1201,7 @@ public class LevelChunk extends ChunkAccess { +@@ -1060,6 +1067,7 @@ public class LevelChunk extends ChunkAccess { // Paper start - Prevent tile entity and entity crashes final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ()); net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable); @@ -172,10 +172,10 @@ index 8254e72595ae5c1ddf5cf969570d83758b744c7b..03f7394057c927f55fa962a65988d035 // Paper end // Spigot start diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index e68205fe7169c7c5b7c6fdada2ee97d86107ca97..aa8972fd1a1fade05d60ab69efb8ff24f344508a 100644 +index d9daf07132c46548964a75588b69d7a74680e917..67a2f3c02aa4983b3ec2df073821190ddb36543c 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -@@ -275,6 +275,7 @@ public class RegionFile implements AutoCloseable { +@@ -274,6 +274,7 @@ public class RegionFile implements AutoCloseable { return true; } } catch (IOException ioexception) { @@ -183,7 +183,7 @@ index e68205fe7169c7c5b7c6fdada2ee97d86107ca97..aa8972fd1a1fade05d60ab69efb8ff24 return false; } } -@@ -356,6 +357,7 @@ public class RegionFile implements AutoCloseable { +@@ -355,6 +356,7 @@ public class RegionFile implements AutoCloseable { ((java.nio.Buffer) buf).position(5); // CraftBukkit - decompile error filechannel.write(buf); } catch (Throwable throwable) { diff --git a/patches/unapplied/server/0061-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch b/patches/server/0060-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch similarity index 100% rename from patches/unapplied/server/0061-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch rename to patches/server/0060-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch diff --git a/patches/unapplied/server/0062-Disable-Scoreboards-for-non-players-by-default.patch b/patches/server/0061-Disable-Scoreboards-for-non-players-by-default.patch similarity index 58% rename from patches/unapplied/server/0062-Disable-Scoreboards-for-non-players-by-default.patch rename to patches/server/0061-Disable-Scoreboards-for-non-players-by-default.patch index 39d2e64cff..68f65f2e27 100644 --- a/patches/unapplied/server/0062-Disable-Scoreboards-for-non-players-by-default.patch +++ b/patches/server/0061-Disable-Scoreboards-for-non-players-by-default.patch @@ -11,26 +11,26 @@ So avoid looking up scoreboards and short circuit to the "not on a team" logic which is most likely to be true. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index faa958b79b3e6d767f009e7b8b4a6cf1296e39ac..606f3038f6c4a92cb0ae7debb97795abc70a8fb8 100644 +index 4d12403d8ae7c620e169e87b0a0ab48e28251811..bb8de860d826e4c92ffdbd7ef2675458d372bbdf 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2682,6 +2682,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2753,6 +2753,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @Nullable public Team getTeam() { -+ if (!this.level.paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof Player)) { return null; } // Paper - return this.level.getScoreboard().getPlayersTeam(this.getScoreboardName()); ++ if (!this.level().paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof Player)) { return null; } // Paper + return this.level().getScoreboard().getPlayersTeam(this.getScoreboardName()); } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 4dcaaa2c10966b975d612de8453af7a7f1c32b16..02b3e953f48721030d8c2b4cf82d1b93a4ccf1bf 100644 +index da488c4dbf8f6c36cb7cfa64be1645be8a7e4ecf..eb0280854b9c3bda9660a99ae7355f2874660d7a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -816,6 +816,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -834,6 +834,7 @@ public abstract class LivingEntity extends Entity implements Attackable { if (nbt.contains("Team", 8)) { String s = nbt.getString("Team"); - PlayerTeam scoreboardteam = this.level.getScoreboard().getPlayerTeam(s); -+ if (!level.paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof net.minecraft.world.entity.player.Player)) { scoreboardteam = null; } // Paper - boolean flag = scoreboardteam != null && this.level.getScoreboard().addPlayerToTeam(this.getStringUUID(), scoreboardteam); + PlayerTeam scoreboardteam = this.level().getScoreboard().getPlayerTeam(s); ++ if (!this.level().paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof net.minecraft.world.entity.player.Player)) { scoreboardteam = null; } // Paper + boolean flag = scoreboardteam != null && this.level().getScoreboard().addPlayerToTeam(this.getStringUUID(), scoreboardteam); if (!flag) { diff --git a/patches/unapplied/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch similarity index 100% rename from patches/unapplied/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch rename to patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch