From 21effd6c48b49bd3aebd746d6a157bac9c798e60 Mon Sep 17 00:00:00 2001 From: Aurora Date: Mon, 14 Jun 2021 16:41:34 +0200 Subject: [PATCH] even moar workkkkk --- ...al-open-container-api-to-HumanEntity.patch | 2 +- ...y-Counter-to-allow-plugins-to-use-va.patch | 0 .../0227-Entity-isTicking.patch | 4 +- ...Fix-Not-a-string-Map-Conversion-spam.patch | 2 +- ...d-mobs-to-jump-and-take-water-damage.patch | 6 +-- .../server/0472-Add-entity-liquid-API.patch | 35 +++++-------- ...llow-delegation-to-vanilla-chunk-gen.patch | 8 +-- ...ze-NetworkManager-Exception-Handling.patch | 4 +- ...-Fix-MC-187716-Use-configured-height.patch | 15 +++--- patches/server/0507-Add-more-Evoker-API.patch | 19 +++++++ ...-translation-keys-for-blocks-entitie.patch | 10 +--- ...te-HoverEvent-from-ItemStack-Entity.patch} | 6 +-- .../0510-Cache-block-data-strings.patch} | 10 ++-- ...rtation-and-cancel-velocity-if-tele.patch} | 52 +++++++++---------- ...l-open-container-api-to-HumanEntity.patch} | 6 +-- ...aFixerUpper-Rewrite-Rules-on-demand.patch} | 0 ...-capture-to-capture-all-items-added.patch} | 24 +++------ ...ty-in-invalid-locations-SPIGOT-6086.patch} | 6 +-- ...-Counter-to-allow-plugins-to-use-va.patch} | 6 +-- ...track-plugin-scoreboards-by-default.patch} | 23 ++++---- .../0518-Entity-isTicking.patch} | 12 ++--- ...non-whitelisted-player-when-white-l.patch} | 4 +- 22 files changed, 125 insertions(+), 129 deletions(-) rename patches/{api-unmapped => api}/0225-Add-additional-open-container-api-to-HumanEntity.patch (97%) rename patches/{api-unmapped => api}/0226-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch (100%) rename patches/{api-unmapped => api}/0227-Entity-isTicking.patch (80%) rename patches/{server-remapped => removed/1.17}/0577-Fix-Not-a-string-Map-Conversion-spam.patch (97%) rename patches/{server-remapped/0566-Create-HoverEvent-from-ItemStack-Entity.patch => server/0509-Create-HoverEvent-from-ItemStack-Entity.patch} (91%) rename patches/{server-remapped/0567-Cache-block-data-strings.patch => server/0510-Cache-block-data-strings.patch} (87%) rename patches/{server-remapped/0568-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch => server/0511-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch} (64%) rename patches/{server-remapped/0569-Add-additional-open-container-api-to-HumanEntity.patch => server/0512-Add-additional-open-container-api-to-HumanEntity.patch} (92%) rename patches/{server-remapped/0570-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch => server/0513-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch} (100%) rename patches/{server-remapped/0571-Extend-block-drop-capture-to-capture-all-items-added.patch => server/0514-Extend-block-drop-capture-to-capture-all-items-added.patch} (70%) rename patches/{server-remapped/0572-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch => server/0515-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch} (78%) rename patches/{server-remapped/0573-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch => server/0516-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch} (82%) rename patches/{server-remapped/0574-Lazily-track-plugin-scoreboards-by-default.patch => server/0517-Lazily-track-plugin-scoreboards-by-default.patch} (84%) rename patches/{server-remapped/0575-Entity-isTicking.patch => server/0518-Entity-isTicking.patch} (75%) rename patches/{server-remapped/0576-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch => server/0519-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch} (86%) diff --git a/patches/api-unmapped/0225-Add-additional-open-container-api-to-HumanEntity.patch b/patches/api/0225-Add-additional-open-container-api-to-HumanEntity.patch similarity index 97% rename from patches/api-unmapped/0225-Add-additional-open-container-api-to-HumanEntity.patch rename to patches/api/0225-Add-additional-open-container-api-to-HumanEntity.patch index 53584ff63..52fe9f1bc 100644 --- a/patches/api-unmapped/0225-Add-additional-open-container-api-to-HumanEntity.patch +++ b/patches/api/0225-Add-additional-open-container-api-to-HumanEntity.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add additional open container api to HumanEntity diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index b09d12390d5f77330ac84452e0fee63a169bd01f..77bff8fb6bfdf739e413084e13677a83e723c71e 100644 +index c307a58b17324d6df8c21fa45f0f1e34810f1828..112c891e54e8f30ac10e6865efc2a8ee8d172188 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -148,6 +148,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder diff --git a/patches/api-unmapped/0226-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/api/0226-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 100% rename from patches/api-unmapped/0226-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to patches/api/0226-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch diff --git a/patches/api-unmapped/0227-Entity-isTicking.patch b/patches/api/0227-Entity-isTicking.patch similarity index 80% rename from patches/api-unmapped/0227-Entity-isTicking.patch rename to patches/api/0227-Entity-isTicking.patch index 315c89bf3..c4c93d0fd 100644 --- a/patches/api-unmapped/0227-Entity-isTicking.patch +++ b/patches/api/0227-Entity-isTicking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index ecb5595332ab493224d06a75904e142ab541aad9..4ed8c74f874dbd1017764d7592acfdafbc5d5fe1 100644 +index 09dc74b0e10d075190009631c84a3710cc1f9177..8cfe08cbc869e468edc0f0bdaa28d5bf1f6201a2 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -744,5 +744,10 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -747,5 +747,10 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent * Check if entity is in lava */ public boolean isInLava(); diff --git a/patches/server-remapped/0577-Fix-Not-a-string-Map-Conversion-spam.patch b/patches/removed/1.17/0577-Fix-Not-a-string-Map-Conversion-spam.patch similarity index 97% rename from patches/server-remapped/0577-Fix-Not-a-string-Map-Conversion-spam.patch rename to patches/removed/1.17/0577-Fix-Not-a-string-Map-Conversion-spam.patch index 5b9dbf362..6decec5b6 100644 --- a/patches/server-remapped/0577-Fix-Not-a-string-Map-Conversion-spam.patch +++ b/patches/removed/1.17/0577-Fix-Not-a-string-Map-Conversion-spam.patch @@ -2,7 +2,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 8 Oct 2020 00:00:25 -0400 Subject: [PATCH] Fix "Not a string" Map Conversion spam - +1.17 Update: See if this is still needed, might be fixed upstream The maps did convert successfully, but had noisy logs due to Spigot implementing this logic incorrectly. diff --git a/patches/server/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch b/patches/server/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch index c8750f117..ea21f6702 100644 --- a/patches/server/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch +++ b/patches/server/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch @@ -19,7 +19,7 @@ index 78948c42b13194005bdbbbc69c2b7ae0732a78c5..b41e7922dd96c3358eb849ab39982a75 + } } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c8ebce55b4e3838bf70b115ffb0b634b3548a7dd..b82dd96147224057ea0e0dc92506b27ffbc9f034 100644 +index 2bfafeec6f8a605a7826091314992e61a49e4c51..6d7f2db63d586b96939cfc3643ebae3a952a4836 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1264,6 +1264,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -31,7 +31,7 @@ index c8ebce55b4e3838bf70b115ffb0b634b3548a7dd..b82dd96147224057ea0e0dc92506b27f return this.isInWater() || this.isInRain() || this.isInBubbleColumn(); } diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index e4f3dbff2605243039f9f59f025c931b3fb309c5..a5d90af5275c9c8069932f711069a6d422303d05 100644 +index e4f3dbff2605243039f9f59f025c931b3fb309c5..3a444371e484defa3119d04b9fa7cf50ca5966ec 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -103,6 +103,7 @@ public abstract class Mob extends LivingEntity { @@ -52,7 +52,7 @@ index e4f3dbff2605243039f9f59f025c931b3fb309c5..a5d90af5275c9c8069932f711069a6d4 + if (goalFloat.validConditions()) goalFloat.update(); + this.getJumpControl().jumpIfSet(); + } -+ if ((this instanceof net.minecraft.world.entity.monster.Blaze || this instanceof net.minecraft.world.entity.monster.EnderMan) && isInWaterOrRainOrBubble()) { ++ if ((this instanceof net.minecraft.world.entity.monster.Blaze || this instanceof net.minecraft.world.entity.monster.EnderMan) && isInWaterRainOrBubble()) { + hurt(DamageSource.DROWN, 1.0F); + } + return; diff --git a/patches/server/0472-Add-entity-liquid-API.patch b/patches/server/0472-Add-entity-liquid-API.patch index 572e26f91..81e7a4809 100644 --- a/patches/server/0472-Add-entity-liquid-API.patch +++ b/patches/server/0472-Add-entity-liquid-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add entity liquid API diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 96da70f1077f70c4bd5ba1196292a856deb25286..8531f1deea95aa8e73e75b714426c915a52a74af 100644 +index 96da70f1077f70c4bd5ba1196292a856deb25286..466de2bbdbf0c9e3ed28ec8fee5fcfeb75c54398 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1305,12 +1305,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -1305,13 +1305,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n return this.wasTouchingWater; } @@ -19,28 +19,21 @@ index 96da70f1077f70c4bd5ba1196292a856deb25286..8531f1deea95aa8e73e75b714426c915 return this.level.isRainingAt(blockposition) || this.level.isRainingAt(new BlockPos((double) blockposition.getX(), this.getBoundingBox().maxY, (double) blockposition.getZ())); } -+ public final boolean isInBubbleColumn() { return isInBubbleColumn(); } // Paper - OBFHELPER - private boolean isInBubbleColumn() { +- private boolean isInBubbleColumn() { ++ public boolean isInBubbleColumn() { // Paper - make public return this.level.getBlockState(this.blockPosition()).is(Blocks.BUBBLE_COLUMN); } -@@ -1324,6 +1325,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n + +@@ -1319,7 +1319,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n + return this.isInWater() || this.isInRain(); + } + +- public final boolean isInWaterOrRainOrBubble() { return isInWaterRainOrBubble(); } // Paper - OBFHELPER + public boolean isInWaterRainOrBubble() { return this.isInWater() || this.isInRain() || this.isInBubbleColumn(); } - -+ public final boolean isInWaterOrBubbleColumn() { return isInWaterOrBubble(); } // Paper - OBFHELPER - public boolean isInWaterOrBubble() { - return this.isInWater() || this.isInBubbleColumn(); - } -@@ -1463,6 +1465,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n - return this.fluidOnEyes == fluidTag; - } - -+ public final boolean isInLava() { return isInLava(); } // Paper - OBFHELPER - public boolean isInLava() { - return !this.firstTick && this.fluidHeight.getDouble(FluidTags.LAVA) > 0.0D; - } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 98d3818d38f487fc7e1302ee4af9e4898efec809..26bfbab1e8332f91c4d2814cd0056ca2ea7ddab7 100644 +index 98d3818d38f487fc7e1302ee4af9e4898efec809..a13042367ac284ce23d799eba1330aa2777173e7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -1169,5 +1169,29 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -61,11 +54,11 @@ index 98d3818d38f487fc7e1302ee4af9e4898efec809..26bfbab1e8332f91c4d2814cd0056ca2 + } + + public boolean isInWaterOrBubbleColumn() { -+ return getHandle().isInWaterOrBubbleColumn(); ++ return getHandle().isInWaterOrBubble(); + } + + public boolean isInWaterOrRainOrBubbleColumn() { -+ return getHandle().isInWaterOrRainOrBubble(); ++ return getHandle().isInWaterRainOrBubble(); + } + + public boolean isInLava() { diff --git a/patches/server/0476-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0476-Allow-delegation-to-vanilla-chunk-gen.patch index 3719bedef..287d85372 100644 --- a/patches/server/0476-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/patches/server/0476-Allow-delegation-to-vanilla-chunk-gen.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6bc5ba51c90723c7138b1b5d2381cb215f1e5271..df2c41d18377d8519d5537186d529ecc1901f58a 100644 +index 6bc5ba51c90723c7138b1b5d2381cb215f1e5271..beb8b7d06ef47c80ede95c884598fedcc7126d67 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2033,6 +2033,32 @@ public final class CraftServer implements Server { @@ -19,17 +19,17 @@ index 6bc5ba51c90723c7138b1b5d2381cb215f1e5271..df2c41d18377d8519d5537186d529ecc + CraftChunkData data = (CraftChunkData) createChunkData(world); + // do bunch of vanilla shit + net.minecraft.server.level.ServerLevel nmsWorld = ((CraftWorld) world).getHandle(); -+ net.minecraft.world.level.chunk.ProtoChunk protoChunk = new net.minecraft.world.level.chunk.ProtoChunk(new net.minecraft.world.level.ChunkPos(x, z), net.minecraft.world.level.chunk.UpgradeData.getEmptyConverter(), nmsWorld); ++ net.minecraft.world.level.chunk.ProtoChunk protoChunk = new net.minecraft.world.level.chunk.ProtoChunk(new net.minecraft.world.level.ChunkPos(x, z), null, nmsWorld); + List list = new ArrayList<>(); + list.add(protoChunk); -+ net.minecraft.server.level.WorldGenRegion genRegion = new net.minecraft.server.level.WorldGenRegion(nmsWorld, list); ++ net.minecraft.server.level.WorldGenRegion genRegion = new net.minecraft.server.level.WorldGenRegion(nmsWorld, list, net.minecraft.world.level.chunk.ChunkStatus.EMPTY, -1); + // call vanilla generator, one feature after another. Order here is important! + net.minecraft.world.level.chunk.ChunkGenerator chunkGenerator = nmsWorld.getChunkSource().generator; + if (chunkGenerator instanceof org.bukkit.craftbukkit.generator.CustomChunkGenerator) { + chunkGenerator = ((org.bukkit.craftbukkit.generator.CustomChunkGenerator) chunkGenerator).delegate; + } + chunkGenerator.createBiomes(nmsWorld.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), protoChunk); -+ chunkGenerator.fillFromNoise(genRegion, nmsWorld.structureFeatureManager(), protoChunk); ++ chunkGenerator.fillFromNoise((runnable) -> {}, nmsWorld.structureFeatureManager(), protoChunk); + chunkGenerator.buildSurfaceAndBedrock(genRegion, protoChunk); + // copy over generated sections + data.setRawChunkData(protoChunk.getSections()); diff --git a/patches/server/0478-Optimize-NetworkManager-Exception-Handling.patch b/patches/server/0478-Optimize-NetworkManager-Exception-Handling.patch index 7e00ab11c..5115fd3cc 100644 --- a/patches/server/0478-Optimize-NetworkManager-Exception-Handling.patch +++ b/patches/server/0478-Optimize-NetworkManager-Exception-Handling.patch @@ -42,7 +42,7 @@ index 5356f6484751e4b4740720aecac90bdfe044283b..ed54479b14dcfc736ac90749106557f0 for(int i = 0; i < bs.length; ++i) { diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -index 449f1b2f5dca350dc0912e14c8c2bf3eb4652b92..9e944aa41c184ebde1179399def662b2f08eef62 100644 +index 449f1b2f5dca350dc0912e14c8c2bf3eb4652b92..bcf53ec07b8eeec7a88fb67e6fb908362e6f51b0 100644 --- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java +++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java @@ -1,6 +1,9 @@ @@ -61,7 +61,7 @@ index 449f1b2f5dca350dc0912e14c8c2bf3eb4652b92..9e944aa41c184ebde1179399def662b2 } // Paper - timings + // Paper start + catch (Exception e) { -+ Connection networkmanager = listener.a(); ++ Connection networkmanager = listener.getConnection(); + if (networkmanager.getPlayer() != null) { + LOGGER.error("Error whilst processing packet {} for {}[{}]", packet, networkmanager.getPlayer().getScoreboardName(), networkmanager.getRemoteAddress(), e); + } else { diff --git a/patches/server/0490-Fix-MC-187716-Use-configured-height.patch b/patches/server/0490-Fix-MC-187716-Use-configured-height.patch index 678b0ee0b..204be7ceb 100644 --- a/patches/server/0490-Fix-MC-187716-Use-configured-height.patch +++ b/patches/server/0490-Fix-MC-187716-Use-configured-height.patch @@ -5,16 +5,10 @@ Subject: [PATCH] Fix MC-187716 Use configured height diff --git a/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherCappedSurfaceBuilder.java b/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherCappedSurfaceBuilder.java -index 5ad6e0ef718a1775a2310925b8273120687230b1..88fbd8a925d84184116051082514ef4d45c98acf 100644 +index 5ad6e0ef718a1775a2310925b8273120687230b1..7c3386b37aae7d10629e0a256102967f69b68a7e 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherCappedSurfaceBuilder.java +++ b/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherCappedSurfaceBuilder.java -@@ -1,4 +1,5 @@ - package net.minecraft.world.level.levelgen.surfacebuilders; -+<<<<<<< found - - import com.google.common.collect.ImmutableList; - import com.google.common.collect.ImmutableMap; -@@ -42,7 +43,7 @@ public abstract class NetherCappedSurfaceBuilder extends SurfaceBuilder implements EntityTypeTest { @@ -17,14 +17,6 @@ index 872f92ac1a6bc86ce54700dbf555ceea4fab2057..4a663a70235609d2f801b8c6bcecbe59 public static Optional> byString(String id) { return Registry.ENTITY_TYPE.getOptional(ResourceLocation.tryParse(id)); } -@@ -445,6 +446,7 @@ public class EntityType implements EntityTypeTest { - return this.category; - } - -+ public String getDescriptionId() { return getDescriptionId(); } // Paper - OBFHELPER - public String getDescriptionId() { - if (this.descriptionId == null) { - this.descriptionId = Util.makeDescriptionId("entity", Registry.ENTITY_TYPE.getKey(this)); diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java index 878cdfc49253e7916d038495f79fec7cce75aa50..85fa2b26863e2da8f4de93aa10ffd77f7076b682 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java diff --git a/patches/server-remapped/0566-Create-HoverEvent-from-ItemStack-Entity.patch b/patches/server/0509-Create-HoverEvent-from-ItemStack-Entity.patch similarity index 91% rename from patches/server-remapped/0566-Create-HoverEvent-from-ItemStack-Entity.patch rename to patches/server/0509-Create-HoverEvent-from-ItemStack-Entity.patch index a7252fed8..b71640c7c 100644 --- a/patches/server-remapped/0566-Create-HoverEvent-from-ItemStack-Entity.patch +++ b/patches/server/0509-Create-HoverEvent-from-ItemStack-Entity.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Create HoverEvent from ItemStack Entity diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 746755f76ae177b2eeccf66f8cd95e6ffd5acad9..2e0be9771ca3511f5d9364c57235556b70f07ec6 100644 +index 6ec39de514ceed7e5ffe9a8dc94c2ffd2902cd98..9cde8ae979287d342574da066f65731324725dea 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -365,5 +365,40 @@ public final class CraftItemFactory implements ItemFactory { +@@ -368,5 +368,40 @@ public final class CraftItemFactory implements ItemFactory { - return nms != null ? net.minecraft.locale.Language.getInstance().translateKey(nms.getItem().getDescriptionId()) : null; + return nms != null ? net.minecraft.locale.Language.getInstance().getOrDefault(nms.getItem().getDescriptionId()) : null; } + + @Override diff --git a/patches/server-remapped/0567-Cache-block-data-strings.patch b/patches/server/0510-Cache-block-data-strings.patch similarity index 87% rename from patches/server-remapped/0567-Cache-block-data-strings.patch rename to patches/server/0510-Cache-block-data-strings.patch index b4924166c..90aa71661 100644 --- a/patches/server-remapped/0567-Cache-block-data-strings.patch +++ b/patches/server/0510-Cache-block-data-strings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 735c3c983e96e4e6f36de0975909fc48cb042081..5c5903867432894b47bc62d89989f78c36a84ca1 100644 +index 1889de77a5e3d9371005b6bd451e2c0e57e96a93..dd51341115450a38ea5b0ea34dbadc2a8e191f60 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1953,6 +1953,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop%s", nms, bukkit); +@@ -494,9 +495,39 @@ public class CraftBlockData implements BlockData { + Preconditions.checkState(CraftBlockData.MAP.put(nms, bukkit) == null, "Duplicate mapping %s->%s", nms, bukkit); } + // Paper start - cache block data strings diff --git a/patches/server-remapped/0568-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/0511-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch similarity index 64% rename from patches/server-remapped/0568-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch rename to patches/server/0511-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch index 1e30590a6..403e8d2e6 100644 --- a/patches/server-remapped/0568-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch +++ b/patches/server/0511-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch @@ -9,32 +9,32 @@ as this is how Vanilla teleports entities. Cancel any pending motion when teleported. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ab6494f5a872bba5398bef0367b4d9257786f61e..ab45497e8f7720c9d60626b32e9c95779af676b0 100644 +index 0176b85a031b33cb2a12bb75079f5e3111f4f2b7..e3725db7e19fe3235ec25beffca26a7eede24394 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -691,7 +691,7 @@ public class ServerGamePacketListenerImpl implements ServerGamePacketListener { +@@ -682,7 +682,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser public void handleAcceptTeleportPacket(ServerboundAcceptTeleportationPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (packet.getId() == this.awaitingTeleport && this.awaitingPositionFromClient != null) { // CraftBukkit -- this.player.absMoveTo(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.yRot, this.player.xRot); -+ this.player.moveTo(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.yRot, this.player.xRot); // Paper - use proper setPositionRotation for teleportation +- this.player.absMoveTo(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot()); ++ this.player.moveTo(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot()); // Paper - use proper setPositionRotation for teleportation this.lastGoodX = this.awaitingPositionFromClient.x; this.lastGoodY = this.awaitingPositionFromClient.y; this.lastGoodZ = this.awaitingPositionFromClient.z; -@@ -1536,7 +1536,7 @@ public class ServerGamePacketListenerImpl implements ServerGamePacketListener { +@@ -1569,7 +1569,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser // CraftBukkit end this.awaitingTeleportTime = this.tickCount; - this.player.absMoveTo(d0, d1, d2, f, f1); + this.player.moveTo(d0, d1, d2, f, f1); // Paper - use proper setPositionRotation for teleportation - this.player.forceCheckHighPriority(); // Paper - this.player.connection.send(new ClientboundPlayerPositionPacket(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.awaitingTeleport)); + this.player.connection.send(new ClientboundPlayerPositionPacket(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.awaitingTeleport, flag)); } + diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index aea2457510c75214bbb925307155611e981f115f..d69981a1b5a40418c7d17de5f3bece30592ae586 100644 +index 466de2bbdbf0c9e3ed28ec8fee5fcfeb75c54398..a9c90e41af1cc67a88a639dc795dd8023a7acb89 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -143,6 +143,7 @@ public abstract class Entity implements Nameable, CommandSource, net.minecraft.s +@@ -152,6 +152,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n // CraftBukkit start private static final int CURRENT_LEVEL = 2; @@ -42,7 +42,7 @@ index aea2457510c75214bbb925307155611e981f115f..d69981a1b5a40418c7d17de5f3bece30 static boolean isLevelAtLeast(CompoundTag tag, int level) { return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } -@@ -1406,6 +1407,13 @@ public abstract class Entity implements Nameable, CommandSource, net.minecraft.s +@@ -1522,6 +1523,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n } public void moveTo(double x, double y, double z, float yaw, float pitch) { @@ -53,31 +53,31 @@ index aea2457510c75214bbb925307155611e981f115f..d69981a1b5a40418c7d17de5f3bece30 + this.preserveMotion = false; + } + // Paper end - this.setPosAndOldPos(x, y, z); - this.yRot = yaw; - this.xRot = pitch; + this.setPosRaw(x, y, z); + this.setYRot(yaw); + this.setXRot(pitch); diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 6ca378ec7868b855d46c749910c656f82ddb009f..091e72474ac199c38fff979a5faf524e011d8d0a 100644 +index 68ce2732dfdc25ddadc15c43c30a609f9b1eba86..c741f8e4a4b67d1bfed2d1bac36856c5688bb161 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -165,6 +165,7 @@ public abstract class BaseSpawner { - return; - } +@@ -170,6 +170,7 @@ public abstract class BaseSpawner { + return; + } -+ entity.preserveMotion = true; // Paper - preserve entity motion from tag - entity.moveTo(entity.getX(), entity.getY(), entity.getZ(), world.random.nextFloat() * 360.0F, 0.0F); - if (entity instanceof Mob) { - Mob entityinsentient = (Mob) entity; ++ entity.preserveMotion = true; // Paper - preserve entity motion from tag + entity.moveTo(entity.getX(), entity.getY(), entity.getZ(), world.random.nextFloat() * 360.0F, 0.0F); + if (entity instanceof Mob) { + Mob entityinsentient = (Mob) entity; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index deeae62e9926f9435907c68e7d35e7420f5e79dd..1275768762884416fa3c68dab3a6671b24949976 100644 +index a13042367ac284ce23d799eba1330aa2777173e7..5d11d573a68bea7b341bb987b6cfb998bd1b74fb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -556,7 +556,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -563,7 +563,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } // entity.setLocation() throws no event, and so cannot be cancelled -- entity.absMoveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); +- this.entity.absMoveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); + entity.moveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); // Paper - use proper setPosition, as per vanilla teleporting // SPIGOT-619: Force sync head rotation also - entity.setYHeadRot(location.getYaw()); - ((net.minecraft.server.level.ServerLevel) entity.level).updateChunkPos(entity); // Spigot - register to new chunk + this.entity.setYHeadRot(location.getYaw()); + diff --git a/patches/server-remapped/0569-Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/0512-Add-additional-open-container-api-to-HumanEntity.patch similarity index 92% rename from patches/server-remapped/0569-Add-additional-open-container-api-to-HumanEntity.patch rename to patches/server/0512-Add-additional-open-container-api-to-HumanEntity.patch index 4f031f39d..bc89c1c9e 100644 --- a/patches/server-remapped/0569-Add-additional-open-container-api-to-HumanEntity.patch +++ b/patches/server/0512-Add-additional-open-container-api-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add additional open container api to HumanEntity diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 878a62e04962aafeaf192075fbe08e319298a800..aceb57c93c91730345f49f78838780c41ce2dcef 100644 +index 36ea76bfe0bd96ead82ed1ad34f25de10b7fa30e..021394a0e668d2cfccd8617d4aee79147181fa22 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -459,6 +459,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -458,6 +458,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return this.getHandle().containerMenu.getBukkitView(); } @@ -78,4 +78,4 @@ index 878a62e04962aafeaf192075fbe08e319298a800..aceb57c93c91730345f49f78838780c4 + @Override public void closeInventory() { - // Paper start + this.getHandle().closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.PLUGIN); diff --git a/patches/server-remapped/0570-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch b/patches/server/0513-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch similarity index 100% rename from patches/server-remapped/0570-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch rename to patches/server/0513-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch diff --git a/patches/server-remapped/0571-Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/0514-Extend-block-drop-capture-to-capture-all-items-added.patch similarity index 70% rename from patches/server-remapped/0571-Extend-block-drop-capture-to-capture-all-items-added.patch rename to patches/server/0514-Extend-block-drop-capture-to-capture-all-items-added.patch index 21f6d53f4..e32d13d26 100644 --- a/patches/server-remapped/0571-Extend-block-drop-capture-to-capture-all-items-added.patch +++ b/patches/server/0514-Extend-block-drop-capture-to-capture-all-items-added.patch @@ -6,24 +6,16 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 22266fda4de9b5fbace3b8e55ce390b8d7e75a65..fe7b71fbb3963beafe93a5d86bebdd629c7ec8f2 100644 +index 4ae56444d258cdf44a02256315d6aae84e2f53be..f1c02ae301da2a3b582d2ec1215c1a981e26ac47 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -95,6 +95,7 @@ import net.minecraft.world.entity.ai.village.poi.PoiType; - import net.minecraft.world.entity.animal.horse.SkeletonHorse; - import net.minecraft.world.entity.boss.EnderDragonPart; - import net.minecraft.world.entity.boss.enderdragon.EnderDragon; -+import net.minecraft.world.entity.item.ItemEntity; - import net.minecraft.world.entity.monster.Drowned; - import net.minecraft.world.entity.player.Player; - import net.minecraft.world.entity.raid.Raid; -@@ -1284,6 +1285,13 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl - } else if (this.isUUIDUsed(entity)) { +@@ -1220,6 +1220,13 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl + // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit return false; } else { + // Paper start - capture all item additions to the world -+ if (captureDrops != null && entity instanceof ItemEntity) { -+ captureDrops.add((ItemEntity) entity); ++ if (captureDrops != null && entity instanceof net.minecraft.world.entity.item.ItemEntity) { ++ captureDrops.add((net.minecraft.world.entity.item.ItemEntity) entity); + return true; + } + // Paper end @@ -32,10 +24,10 @@ index 22266fda4de9b5fbace3b8e55ce390b8d7e75a65..fe7b71fbb3963beafe93a5d86bebdd62 return false; } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 79f3e4176145c42debb9adc1e68175cf063c1f22..6269e37f2859417a80e6de16045f1c2325f9746f 100644 +index 6c55bd8b876d1d694e05ad6de6a9fd29a4d4d053..de4fdd46f23b2b17da752a8afc0faecc1ad8344f 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -6,6 +6,7 @@ import net.minecraft.world.InteractionResult; +@@ -7,6 +7,7 @@ import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.EquipmentSlot; @@ -43,7 +35,7 @@ index 79f3e4176145c42debb9adc1e68175cf063c1f22..6269e37f2859417a80e6de16045f1c23 import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.DoubleHighBlockItem; import net.minecraft.world.item.ItemStack; -@@ -418,10 +419,12 @@ public class ServerPlayerGameMode { +@@ -421,10 +422,12 @@ public class ServerPlayerGameMode { // return true; // CraftBukkit } // CraftBukkit start diff --git a/patches/server-remapped/0572-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch b/patches/server/0515-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch similarity index 78% rename from patches/server-remapped/0572-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch rename to patches/server/0515-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch index 07195903c..50871e155 100644 --- a/patches/server-remapped/0572-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch +++ b/patches/server/0515-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Don't mark dirty in invalid locations (SPIGOT-6086) diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index 82205ad13ef0e987bd83979d06331545efe0a60a..50dc47e8c03ce274d558bc0dfa73ba3ab5fbae5c 100644 +index 1f67c9c5f7161ea687983e7ae0ec7d259da9acd3..0d8ddbc3f8aa22f16907613838ffb9a42f1e6de6 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java -@@ -388,6 +388,7 @@ public class ChunkHolder { +@@ -246,6 +246,7 @@ public class ChunkHolder { } - public void blockChanged(BlockPos blockposition) { + public void blockChanged(BlockPos pos) { + if (!blockposition.isValidLocation()) return; // Paper - SPIGOT-6086 for all invalid locations; avoid acquiring locks LevelChunk chunk = this.getSendingChunk(); // Paper - no-tick view distance diff --git a/patches/server-remapped/0573-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0516-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 82% rename from patches/server-remapped/0573-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to patches/server/0516-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index 6eb1a44bc..64a555e00 100644 --- a/patches/server-remapped/0573-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/server/0516-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index d69981a1b5a40418c7d17de5f3bece30592ae586..fa22c0d7f676c96d34bf56d80181d6b047f2ff0b 100644 +index a9c90e41af1cc67a88a639dc795dd8023a7acb89..dac4585ba1bfc782b3e381dfba0a1b9abbb6a2d7 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3476,4 +3476,10 @@ public abstract class Entity implements Nameable, CommandSource, net.minecraft.s +@@ -3904,4 +3904,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n void accept(Entity entity, double x, double y, double z); } @@ -21,7 +21,7 @@ index d69981a1b5a40418c7d17de5f3bece30592ae586..fa22c0d7f676c96d34bf56d80181d6b0 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index de5d02a1345f9886200f0540ac08be0df5878708..9a16882deee21faf78ea46e08b2f2ad3fbb6021b 100644 +index 1e387ba8552484b10ae276e1eea47d77d121e19d..2984f5fa036019bb35a603690c568fc5c7b855d6 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -443,6 +443,10 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server-remapped/0574-Lazily-track-plugin-scoreboards-by-default.patch b/patches/server/0517-Lazily-track-plugin-scoreboards-by-default.patch similarity index 84% rename from patches/server-remapped/0574-Lazily-track-plugin-scoreboards-by-default.patch rename to patches/server/0517-Lazily-track-plugin-scoreboards-by-default.patch index e06db589a..76bcce754 100644 --- a/patches/server-remapped/0574-Lazily-track-plugin-scoreboards-by-default.patch +++ b/patches/server/0517-Lazily-track-plugin-scoreboards-by-default.patch @@ -28,7 +28,7 @@ index 545948f20efd6c8dd42140b565af94cd6b52b661..7d50aded88f5b7dfebaea1aebc86231f + } } diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java -index 4c93be31fd95d731327479519ecb34a08785c1ca..57537b8871dd5c54d97f3effe1802a3396644e46 100644 +index 68aa66c340b7a686a353e2a15084d811a3955a0a..b1fbbfeadb63d495b57f6c29b00de5327ca713cd 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java @@ -18,6 +18,7 @@ import org.bukkit.scoreboard.Team; @@ -49,11 +49,11 @@ index 4c93be31fd95d731327479519ecb34a08785c1ca..57537b8871dd5c54d97f3effe1802a33 + registeredGlobally = true; + } + // Paper end - net.minecraft.world.scores.Objective objective = board.registerObjective(name, craftCriteria.criteria, io.papermc.paper.adventure.PaperAdventure.asVanilla(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType)); + net.minecraft.world.scores.Objective objective = board.addObjective(name, craftCriteria.criteria, io.papermc.paper.adventure.PaperAdventure.asVanilla(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType)); return new CraftObjective(this, objective); } -@@ -65,6 +72,12 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { - Validate.isTrue(board.getObjective(name) == null, "An objective of name '" + name + "' already exists"); +@@ -68,6 +75,12 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { + net.minecraft.world.scores.Objective objective = this.board.addObjective(name, craftCriteria.criteria, CraftChatMessage.fromStringOrNull(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType)); CraftCriteria craftCriteria = CraftCriteria.getFromBukkit(criteria); + // Paper start @@ -66,25 +66,26 @@ index 4c93be31fd95d731327479519ecb34a08785c1ca..57537b8871dd5c54d97f3effe1802a33 return new CraftObjective(this, objective);*/ // Paper return registerNewObjective(name, criteria, io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(displayName), renderType); // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java -index 30b0d4986a7edcf324d94d9304d66d0567098855..8217e35f5a3093e63a165ee8c8b30bf3f28f3bd3 100644 +index ff090edcc85713083449cebb22bd1490123bc1ee..8ccfe9488db44d7d2cf4040a5b4cead33da1d5f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java @@ -30,6 +30,7 @@ public final class CraftScoreboardManager implements ScoreboardManager { public CraftScoreboardManager(MinecraftServer minecraftserver, net.minecraft.world.scores.Scoreboard scoreboardServer) { - mainScoreboard = new CraftScoreboard(scoreboardServer); + this.mainScoreboard = new CraftScoreboard(scoreboardServer); + mainScoreboard.registeredGlobally = true; // Paper - server = minecraftserver; - scoreboards.add(mainScoreboard); + this.server = minecraftserver; + this.scoreboards.add(mainScoreboard); } @@ -43,10 +44,22 @@ public final class CraftScoreboardManager implements ScoreboardManager { public CraftScoreboard getNewScoreboard() { org.spigotmc.AsyncCatcher.catchOp("scoreboard creation"); // Spigot - CraftScoreboard scoreboard = new CraftScoreboard(new ServerScoreboard(server)); + CraftScoreboard scoreboard = new CraftScoreboard(new ServerScoreboard(this.server)); +- this.scoreboards.add(scoreboard); + // Paper start + if (com.destroystokyo.paper.PaperConfig.trackPluginScoreboards) { + scoreboard.registeredGlobally = true; - scoreboards.add(scoreboard); ++ scoreboards.add(scoreboard); + } + // Paper end return scoreboard; @@ -99,4 +100,4 @@ index 30b0d4986a7edcf324d94d9304d66d0567098855..8217e35f5a3093e63a165ee8c8b30bf3 + // CraftBukkit method public CraftScoreboard getPlayerBoard(CraftPlayer player) { - CraftScoreboard board = playerBoards.get(player); + CraftScoreboard board = this.playerBoards.get(player); diff --git a/patches/server-remapped/0575-Entity-isTicking.patch b/patches/server/0518-Entity-isTicking.patch similarity index 75% rename from patches/server-remapped/0575-Entity-isTicking.patch rename to patches/server/0518-Entity-isTicking.patch index 22d5c7950..544d8d71b 100644 --- a/patches/server-remapped/0575-Entity-isTicking.patch +++ b/patches/server/0518-Entity-isTicking.patch @@ -5,18 +5,18 @@ Subject: [PATCH] Entity#isTicking diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index fa22c0d7f676c96d34bf56d80181d6b047f2ff0b..a623c22cd03ad92657e661851fddc76a30986755 100644 +index dac4585ba1bfc782b3e381dfba0a1b9abbb6a2d7..7ecf78759ff7e3d64bb09306e55d54402a2d99a5 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -49,6 +49,7 @@ import net.minecraft.resources.ResourceLocation; +@@ -52,6 +52,7 @@ import net.minecraft.resources.ResourceKey; + import net.minecraft.resources.ResourceLocation; import net.minecraft.server.MCUtil; import net.minecraft.server.MinecraftServer; - import net.minecraft.server.level.ChunkMap; +import net.minecraft.server.level.ServerChunkCache; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.TicketType; -@@ -3481,5 +3482,9 @@ public abstract class Entity implements Nameable, CommandSource, net.minecraft.s +@@ -3909,5 +3910,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n public static int nextEntityId() { return ENTITY_COUNTER.incrementAndGet(); } @@ -27,10 +27,10 @@ index fa22c0d7f676c96d34bf56d80181d6b047f2ff0b..a623c22cd03ad92657e661851fddc76a // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 1275768762884416fa3c68dab3a6671b24949976..502773ae60290125057fb342a3358ff55927d196 100644 +index 5d11d573a68bea7b341bb987b6cfb998bd1b74fb..b75a14a3af6c23128010f37f10cf78e477b72c4f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1159,5 +1159,9 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1193,5 +1193,9 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public boolean isInLava() { return getHandle().isInLava(); } diff --git a/patches/server-remapped/0576-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/patches/server/0519-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch similarity index 86% rename from patches/server-remapped/0576-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch rename to patches/server/0519-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch index 2d6ec9791..79c9a6998 100644 --- a/patches/server-remapped/0576-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch +++ b/patches/server/0519-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5c5903867432894b47bc62d89989f78c36a84ca1..954dce690852da87a37e7797c6f9f549242e511a 100644 +index dd51341115450a38ea5b0ea34dbadc2a8e191f60..9bd2255d31bcfd4574f8d1caf598f9141aa9e3c1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2018,6 +2018,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop