diff options
author | Bjarne Koll <[email protected]> | 2024-10-21 00:06:54 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-21 00:06:54 +0200 |
commit | 3b9db2b19422c8cd6f4c01cc0bdf40974712b744 (patch) | |
tree | 58b1dd919d4381db17c798a365e5a075813fc735 /patches/server/0010-Adventure.patch | |
parent | 755a7753af6ad46756bd04b5b3bcfac46a3ec072 (diff) | |
download | Paper-3b9db2b19422c8cd6f4c01cc0bdf40974712b744.tar.gz Paper-3b9db2b19422c8cd6f4c01cc0bdf40974712b744.zip |
Updated Upstream (Bukkit/CraftBukkit) (#11501)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
bb4e97c6 Add support for Java 23
bc6874dd Bump asm to 9.7.1
50e8a00b PR-1064: Add specific getTopInventory methods for InventoryView derivatives
758b0a0f SPIGOT-7911: Fix Location#isWorldLoaded() for re-loaded worlds
133a64a7 Improve Registry#getOrThrow messages
be0f5957 PR-1058: Add tests for Minecraft registry <-> Bukkit fields
d1b31df2 PR-1062: Clarify BeaconView documentation
3fab4384 PR-1060: Cache Material to BlockType and ItemType conversion
967a7301 SPIGOT-7906: Increase YAML nesting limit to 100
6ecf033d SPIGOT-7899: Smithing recipes don't require inputs
CraftBukkit Changes:
0a7bd6c81 PR-1493: Improve reroute performance and add some tests
54941524c Add support for Java 23
f4d957fff SPIGOT-7915: Fix World#getKeepSpawnInMemory() using Spawn Radius rather than Spawn Chunk Radius
ded183674 Fix HIDE_ENCHANTS flag in items without enchantments
308785a0a Bump asm to 9.7.1 and re-add ClassReader to ClassWriter
72ce823cd PR-1487: Add specific getTopInventory methods for InventoryView derivatives
11a5e840c SPIGOT-7907, PR-1484: Improve merchant recipe item matching behavior to more closely align with older versions
45b66f7e4 SPIGOT-7909: Always set HIDE_ENCHANTS flag to item if flag is set
963459791 Increase outdated build delay
fc5b2d75f SPIGOT-7910: Fix launching breeze wind charge from API and improve dispenser launch API
c7d6428f2 SPIGOT-7856, PR-1483: End platform not dropping items after replacing blocks
2a5572b52 SPIGOT-7780, PR-1482: Cannot edit chunks during unload event
527041ab5 SPIGOT-7902, PR-1477: Fix CraftMetaPotion#hasCustomEffects() does not check if customEffects (List) is empty
5529a1769 Implement base methods for tags
30fbdbaaf Improve Registry#getOrThrow messages
6b71a7322 PR-1475: Add tests for Minecraft registry <-> Bukkit fields
5f24c255c SPIGOT-7908: Mark junit-platform-suite-engine as test scope
e4c92ef65 PR-1473: Change tests to use suites, to run tests in different environments and feature flags
d25e1e722 PR-1481: Fix BeaconView#set[X]Effect(null)
d69a05362 PR-1480: Fix PerMaterialTest#isEdible test running for legacy materials
bb3284a89 PR-1479: Use custom #isBlock method in legacy init instead of the one in Material, since it relies on legacy being init
98c57cbbe SPIGOT-7904: Fix NPE for PlayerItemBreakEvent
f35bae9ec Fix missing hasJukeboxPlayable
8a6f8b6d8 SPIGOT-7881: CTRL+Pick Block saves position data into item
7913b3be7 SPIGOT-7899: Smithing recipes don't require inputs
Diffstat (limited to 'patches/server/0010-Adventure.patch')
-rw-r--r-- | patches/server/0010-Adventure.patch | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index e21440350a..d9da34e2e7 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -3242,7 +3242,7 @@ index ed54c81a3269360acce674aa4e1d54ccb2461841..c9c849534c3998cfcab7ddcb12a71ccb } diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 5025f7f5d66f2aedd57db137ae2dc69c723768b3..1cc9078fa63da4f39ef4a551cd6a5ff207f58306 100644 +index 142d762750b9745428ae27802f7a428147a74771..d0c946b0383dbd8242a554a92bc70dcc2f5cccc6 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -183,7 +183,15 @@ public final class ItemStack implements DataComponentHolder { @@ -3327,10 +3327,10 @@ index 49c037e961c5ca5ba8d6a870cb32ffe8719adc91..2772c19f58a35713d61aab24f6f0d6f5 } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c54d426cb 100644 +index 99178e22846c41f1d800b69d4fed064088bbe92c..9f7634053ddfc4fc67f89cc99524e9ebd6096f46 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -644,8 +644,10 @@ public final class CraftServer implements Server { +@@ -645,8 +645,10 @@ public final class CraftServer implements Server { } @Override @@ -3341,7 +3341,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c } @Override -@@ -1621,7 +1623,15 @@ public final class CraftServer implements Server { +@@ -1623,7 +1625,15 @@ public final class CraftServer implements Server { return this.configuration.getInt("settings.spawn-radius", -1); } @@ -3357,7 +3357,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c public String getShutdownMessage() { return this.configuration.getString("settings.shutdown-message"); } -@@ -1795,7 +1805,20 @@ public final class CraftServer implements Server { +@@ -1797,7 +1807,20 @@ public final class CraftServer implements Server { } @Override @@ -3378,7 +3378,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c Set<CommandSender> recipients = new HashSet<>(); for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) { if (permissible instanceof CommandSender && permissible.hasPermission(permission)) { -@@ -1803,14 +1826,14 @@ public final class CraftServer implements Server { +@@ -1805,14 +1828,14 @@ public final class CraftServer implements Server { } } @@ -3395,7 +3395,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c for (CommandSender recipient : recipients) { recipient.sendMessage(message); -@@ -2072,6 +2095,14 @@ public final class CraftServer implements Server { +@@ -2074,6 +2097,14 @@ public final class CraftServer implements Server { return CraftInventoryCreator.INSTANCE.createInventory(owner, type); } @@ -3410,7 +3410,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c @Override public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) { Preconditions.checkArgument(type != null, "InventoryType cannot be null"); -@@ -2086,13 +2117,28 @@ public final class CraftServer implements Server { +@@ -2088,13 +2119,28 @@ public final class CraftServer implements Server { return CraftInventoryCreator.INSTANCE.createInventory(owner, size); } @@ -3439,7 +3439,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c public Merchant createMerchant(String title) { return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title); } -@@ -2157,6 +2203,17 @@ public final class CraftServer implements Server { +@@ -2159,6 +2205,17 @@ public final class CraftServer implements Server { return Thread.currentThread().equals(this.console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog) } @@ -3457,7 +3457,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c @Override public String getMotd() { return this.console.getMotd(); -@@ -2603,4 +2660,57 @@ public final class CraftServer implements Server { +@@ -2605,4 +2662,57 @@ public final class CraftServer implements Server { public double[] getTPS() { return new double[]{0, 0, 0}; // TODO } @@ -3554,7 +3554,7 @@ index cbdb1a56a97150c164515a4ce6d3ba06428bf321..b214e7b302abbfe1641485a05f1371ac public URI getUrl() { return this.handle.link(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 69c62699e3412f2730e3db65f196099d77698980..4878a1b085a83dd4a8ffdc86250b8fb4fbac5192 100644 +index ac6d4c8ac26696a0c6dfa471eee764b871dd2029..85c99c3b23df1c4fd8721e7676d8e6b82f9e6abf 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -162,6 +162,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -3628,7 +3628,7 @@ index 69c62699e3412f2730e3db65f196099d77698980..4878a1b085a83dd4a8ffdc86250b8fb4 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 42a1a0588e2b506082499ac9791d039089a64631..9c1fab8db74757e1fb57d4f47099ba6e1536cd6d 100644 +index 13c37384defda4475de584f33d1860a2d53ce05e..3b0370256b4d8c96053b340a657c6bcc6be6c9de 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -20,6 +20,12 @@ public class Main { @@ -4803,10 +4803,10 @@ index c9cc23757a9fcc58d30b2915d4c5cfbc7d1c767a..fc0e1212022d1aa3506699b60ef33819 return this.title; } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java -index 07d406de7123593dc470af2723f2a9a2dc2157b0..01fbd8a55866af3e371c8a2eef23ef6e9ca3226d 100644 +index d89b178dc82c7e2ad6d586217c5a039688563e29..d674289b07748022b94cc6a7e6c6eb456d245c93 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java -@@ -73,6 +73,13 @@ public class CraftInventoryView<T extends AbstractContainerMenu> extends CraftAb +@@ -73,6 +73,13 @@ public class CraftInventoryView<T extends AbstractContainerMenu, I extends Inven return CraftItemStack.asCraftMirror(this.container.getSlot(slot).getItem()); } @@ -5191,11 +5191,11 @@ index c71a4971f127fdfc753306019313ce1a31201120..fd3b12477c30d1eabdbe57ea77902793 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 1c5d63fb6a9ed5cc40d735793cf5889e189feadf..568d6fab743039b20715d8181555f52baa05f0f3 100644 +index 8bba749bce211814f51af8a33f2ed60ba7a8b52d..0c73854243f7fa21d1ffdb3b4c85ee0a69c9c5e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -959,6 +959,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null); +@@ -961,6 +961,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null); } + // Paper start @@ -5213,7 +5213,7 @@ index 1c5d63fb6a9ed5cc40d735793cf5889e189feadf..568d6fab743039b20715d8181555f52b @Override public String getDisplayName() { return CraftChatMessage.fromComponent(this.displayName); -@@ -989,6 +1001,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -991,6 +1003,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.itemName != null; } @@ -5232,7 +5232,7 @@ index 1c5d63fb6a9ed5cc40d735793cf5889e189feadf..568d6fab743039b20715d8181555f52b @Override public String getLocalizedName() { return this.getDisplayName(); -@@ -1008,6 +1032,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1010,6 +1034,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.lore != null && !this.lore.isEmpty(); } @@ -5624,10 +5624,10 @@ index ff040613083c015d9c52c0995591b64305fd5018..95444fd9fecc5bda5462ca8dfeca82c5 boolean hadFormat = false; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index eeffc4be4ae7168c9f69edbbff6642fd4c214b3d..b64be3f292d88fa60746a3fe542740ef8ad2b41c 100644 +index 60dc550431fa4641f8c6d964329b0e2698d1fdd6..655ceaa92b9979fe29725f9812507731bb0bb484 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -77,6 +77,43 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -79,6 +79,43 @@ public final class CraftMagicNumbers implements UnsafeValues { private CraftMagicNumbers() {} @@ -5783,10 +5783,10 @@ index 0000000000000000000000000000000000000000..3aedd0bbc97edacc1ebf71264b310e55 +} diff --git a/src/test/java/io/papermc/paper/adventure/AdventureCodecsTest.java b/src/test/java/io/papermc/paper/adventure/AdventureCodecsTest.java new file mode 100644 -index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a4533ef00523 +index 0000000000000000000000000000000000000000..074e46aa4aca1a5154a0198279f60b38e05c1344 --- /dev/null +++ b/src/test/java/io/papermc/paper/adventure/AdventureCodecsTest.java -@@ -0,0 +1,403 @@ +@@ -0,0 +1,405 @@ +package io.papermc.paper.adventure; + +import com.mojang.datafixers.util.Pair; @@ -5828,7 +5828,8 @@ index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a453 +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import org.apache.commons.lang3.RandomStringUtils; -+import org.bukkit.support.AbstractTestingBase; ++import org.bukkit.support.RegistryHelper; ++import org.bukkit.support.environment.VanillaFeature; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.EnumSource; @@ -5863,7 +5864,8 @@ index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a453 +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + -+class AdventureCodecsTest extends AbstractTestingBase { ++@VanillaFeature ++class AdventureCodecsTest { + + static final String PARAMETERIZED_NAME = "[{index}] {displayName}: {arguments}"; + @@ -5995,7 +5997,7 @@ index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a453 + JavaOps.INSTANCE, + JsonOps.INSTANCE + ) -+ .map(ops -> AbstractTestingBase.REGISTRY_CUSTOM.createSerializationContext(ops)) ++ .map(ops -> RegistryHelper.getRegistry().createSerializationContext(ops)) + .toList(); + } + @@ -6192,20 +6194,22 @@ index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a453 +} diff --git a/src/test/java/io/papermc/paper/adventure/ComponentServicesTest.java b/src/test/java/io/papermc/paper/adventure/ComponentServicesTest.java new file mode 100644 -index 0000000000000000000000000000000000000000..98114b8fdc441f2a1642abf230457c2b5208bb5c +index 0000000000000000000000000000000000000000..6ec088c79e3d727bc7e89d1c14b001345feb1f39 --- /dev/null +++ b/src/test/java/io/papermc/paper/adventure/ComponentServicesTest.java -@@ -0,0 +1,23 @@ +@@ -0,0 +1,25 @@ +package io.papermc.paper.adventure; + +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; +import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; +import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer; ++import org.bukkit.support.environment.AllFeatures; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + ++@AllFeatures +public class ComponentServicesTest { + + @Test |