diff options
author | Owen1212055 <[email protected]> | 2024-11-13 14:24:23 -0500 |
---|---|---|
committer | Owen1212055 <[email protected]> | 2024-11-18 14:50:38 -0500 |
commit | 8122d5e053bb5de0ee97ff043dc26f2510508216 (patch) | |
tree | 514dfba4b955cf8cdeb324cb50b3dfd042aec393 | |
parent | 2ac4023d923fbc9e703d02413134f51e5465b17f (diff) | |
download | Paper-8122d5e053bb5de0ee97ff043dc26f2510508216.tar.gz Paper-8122d5e053bb5de0ee97ff043dc26f2510508216.zip |
Update Data component api
-rw-r--r-- | patches/api/0496-WIP-DataComponent-API.patch (renamed from patches/api/0497-WIP-DataComponent-API.patch) | 14 | ||||
-rw-r--r-- | patches/server/1059-fix-test-drop-this-patch-on-rebase.patch | 102 | ||||
-rw-r--r-- | patches/server/1065-WIP-DataComponent-API.patch (renamed from patches/server/1058-WIP-DataComponent-API.patch) | 18 | ||||
-rw-r--r-- | patches/server/1066-fix-test-drop-this-patch-on-rebase.patch | 24 |
4 files changed, 40 insertions, 118 deletions
diff --git a/patches/api/0497-WIP-DataComponent-API.patch b/patches/api/0496-WIP-DataComponent-API.patch index f7b16e5cee..b6a8251300 100644 --- a/patches/api/0497-WIP-DataComponent-API.patch +++ b/patches/api/0496-WIP-DataComponent-API.patch @@ -3878,7 +3878,7 @@ index 0000000000000000000000000000000000000000..5843768d0be2ae4a0219636ed7640727 + SCALE +} diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java -index d8716f855806471728c35b3ec34efb808a5146cf..9e48e1711f78967ef754682c1e6a604420d81667 100644 +index 9b39e33514b15a9d07104e2ad826d0da11f569d6..116857b4479565b602b94d227ee32dc29ebd6e5f 100644 --- a/src/main/java/io/papermc/paper/registry/RegistryKey.java +++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java @@ -1,5 +1,6 @@ @@ -3888,10 +3888,10 @@ index d8716f855806471728c35b3ec34efb808a5146cf..9e48e1711f78967ef754682c1e6a6044 import net.kyori.adventure.key.Keyed; import org.bukkit.Art; import org.bukkit.Fluid; -@@ -114,6 +115,11 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl { - * @see io.papermc.paper.registry.keys.MenuTypeKeys +@@ -124,6 +125,11 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl { + * @see io.papermc.paper.registry.keys.SoundEventKeys */ - RegistryKey<MenuType> MENU = create("menu"); + RegistryKey<Sound> SOUND_EVENT = create("sound_event"); + /** + * Built-in registry for data component types. + * @see io.papermc.paper.registry.keys.DataComponentTypeKeys @@ -3899,7 +3899,7 @@ index d8716f855806471728c35b3ec34efb808a5146cf..9e48e1711f78967ef754682c1e6a6044 + RegistryKey<DataComponentType> DATA_COMPONENT_TYPE = create("data_component_type"); - /* ********************** * + diff --git a/src/main/java/io/papermc/paper/util/Filtered.java b/src/main/java/io/papermc/paper/util/Filtered.java new file mode 100644 index 0000000000000000000000000000000000000000..6919f01a18bc0ab375d2e0541206524304243d19 @@ -4006,10 +4006,10 @@ index 615eb24ffdd8f6d55ccd4f21760b809c1098bc68..1b3e120bb9b10b65eb6225af8f08caed + // Paper end - data component API } diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index b4ef3133fdd9d79a3381cf8f659ff561ab2b4fad..d3c9fb2fd625ed6ae4882c3b16b86f324f236161 100644 +index 7cf7c6d05aa6cbf3f0c8612831404552c6a7b84a..c60e31425efd7b863941f5538faef6c0552290ae 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -370,6 +370,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> { +@@ -376,6 +376,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> { */ Registry<org.bukkit.potion.PotionEffectType> POTION_EFFECT_TYPE = EFFECT; // Paper end - potion effect type registry diff --git a/patches/server/1059-fix-test-drop-this-patch-on-rebase.patch b/patches/server/1059-fix-test-drop-this-patch-on-rebase.patch deleted file mode 100644 index 9f373bb8ef..0000000000 --- a/patches/server/1059-fix-test-drop-this-patch-on-rebase.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Lulu13022002 <[email protected]> -Date: Fri, 8 Nov 2024 21:51:54 +0100 -Subject: [PATCH] fix test (drop this patch on rebase) - - -diff --git a/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java b/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java -index 75ed5050f72c001d6eab117a2c0b352a413548bd..cf9e00d7afc17cca4fb256a52ad11b767814149d 100644 ---- a/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java -+++ b/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java -@@ -21,11 +21,13 @@ import org.bukkit.support.RegistryHelper; - import org.bukkit.support.environment.VanillaFeature; - import org.junit.jupiter.api.AfterAll; - import org.junit.jupiter.api.BeforeAll; -+import org.junit.jupiter.api.Disabled; - import org.junit.jupiter.api.Test; - - import static org.junit.jupiter.api.Assertions.assertTrue; - - @VanillaFeature -+@Disabled - public class MinecraftCommandPermissionsTest { - - private static PrintStream old; -diff --git a/src/test/java/org/bukkit/support/suite/AllFeaturesTestSuite.java b/src/test/java/org/bukkit/support/suite/AllFeaturesTestSuite.java -index d78661198815b78d041288eb62076514926428ad..2d268498b545db48efa106d2c7afca7f7b74c76d 100644 ---- a/src/test/java/org/bukkit/support/suite/AllFeaturesTestSuite.java -+++ b/src/test/java/org/bukkit/support/suite/AllFeaturesTestSuite.java -@@ -14,7 +14,7 @@ import org.junit.platform.suite.api.SuiteDisplayName; - @Suite(failIfNoTests = false) - @SuiteDisplayName("Test suite for test which need registry values present, with all feature flags set") - @IncludeTags("AllFeatures") --@SelectPackages("org.bukkit") -+@SelectPackages({"org.bukkit", "io.papermc"}) - @SelectClasses({RegistryClassTest.class, PerRegistryTest.class, RegistryConversionTest.class}) // Make sure general registry tests are run first - @ExcludeClassNamePatterns("org.bukkit.craftbukkit.inventory.ItemStack.*Test") - @ConfigurationParameter(key = "TestSuite", value = "AllFeatures") -diff --git a/src/test/java/org/bukkit/support/suite/BundleFeatureTestSuite.java b/src/test/java/org/bukkit/support/suite/BundleFeatureTestSuite.java -index 8faaffd16fb05bd3d976b6a63835cfa547ec2445..c1ee709083276acb14b474993800dd4894febc47 100644 ---- a/src/test/java/org/bukkit/support/suite/BundleFeatureTestSuite.java -+++ b/src/test/java/org/bukkit/support/suite/BundleFeatureTestSuite.java -@@ -9,7 +9,7 @@ import org.junit.platform.suite.api.SuiteDisplayName; - @Suite(failIfNoTests = false) - @SuiteDisplayName("Test suite for test which need registry values present, with the bundle feature flag set") - @IncludeTags("BundleFeature") --@SelectPackages("org.bukkit") -+@SelectPackages({"org.bukkit", "io.papermc"}) - @ConfigurationParameter(key = "TestSuite", value = "BundleFeature") - public class BundleFeatureTestSuite { - } -diff --git a/src/test/java/org/bukkit/support/suite/LegacyTestSuite.java b/src/test/java/org/bukkit/support/suite/LegacyTestSuite.java -index 576c35e086345c96325628cf1a048599f9ed6950..ac3c1c88ce5de4b623d17ab0af11a7d04caec869 100644 ---- a/src/test/java/org/bukkit/support/suite/LegacyTestSuite.java -+++ b/src/test/java/org/bukkit/support/suite/LegacyTestSuite.java -@@ -9,7 +9,7 @@ import org.junit.platform.suite.api.SuiteDisplayName; - @Suite(failIfNoTests = false) - @SuiteDisplayName("Test suite for legacy tests") - @IncludeTags("Legacy") --@SelectPackages("org.bukkit") -+@SelectPackages({"org.bukkit", "io.papermc"}) - @ConfigurationParameter(key = "TestSuite", value = "Legacy") - public class LegacyTestSuite { - } -diff --git a/src/test/java/org/bukkit/support/suite/NormalTestSuite.java b/src/test/java/org/bukkit/support/suite/NormalTestSuite.java -index 661c49c83b9a81512cf181b50f6353dc76e9f0bc..76f61fb60612160477b7da0b095f1c7e4822d4fb 100644 ---- a/src/test/java/org/bukkit/support/suite/NormalTestSuite.java -+++ b/src/test/java/org/bukkit/support/suite/NormalTestSuite.java -@@ -9,7 +9,7 @@ import org.junit.platform.suite.api.SuiteDisplayName; - @Suite(failIfNoTests = false) - @SuiteDisplayName("Test suite for standalone tests, which don't need any registry values present") - @IncludeTags("Normal") --@SelectPackages("org.bukkit") -+@SelectPackages({"org.bukkit", "io.papermc"}) - @ConfigurationParameter(key = "TestSuite", value = "Normal") - public class NormalTestSuite { - } -diff --git a/src/test/java/org/bukkit/support/suite/SlowTestSuite.java b/src/test/java/org/bukkit/support/suite/SlowTestSuite.java -index f95ff2e9930f4fd0ff284f714fc39afb6b7789ca..60be4c20101bbae8cf027270ff0e1e138d2fe9d2 100644 ---- a/src/test/java/org/bukkit/support/suite/SlowTestSuite.java -+++ b/src/test/java/org/bukkit/support/suite/SlowTestSuite.java -@@ -9,7 +9,7 @@ import org.junit.platform.suite.api.SuiteDisplayName; - @Suite(failIfNoTests = false) - @SuiteDisplayName("Test suite for slow tests, which don't need to run every time") - @IncludeTags("Slow") --@SelectPackages("org.bukkit") -+@SelectPackages({"org.bukkit", "io.papermc"}) - @ConfigurationParameter(key = "TestSuite", value = "Slow") - public class SlowTestSuite { - } -diff --git a/src/test/java/org/bukkit/support/suite/VanillaFeatureTestSuite.java b/src/test/java/org/bukkit/support/suite/VanillaFeatureTestSuite.java -index 5ee48e92d2b5134a4ba15802087f6afe58c1cb8d..d0e2eacfcd487e2852eff4b1828031dd3649e41a 100644 ---- a/src/test/java/org/bukkit/support/suite/VanillaFeatureTestSuite.java -+++ b/src/test/java/org/bukkit/support/suite/VanillaFeatureTestSuite.java -@@ -9,7 +9,7 @@ import org.junit.platform.suite.api.SuiteDisplayName; - @Suite(failIfNoTests = false) - @SuiteDisplayName("Test suite for test which need vanilla registry values present") - @IncludeTags("VanillaFeature") --@SelectPackages("org.bukkit") -+@SelectPackages({"org.bukkit", "io.papermc"}) - @ConfigurationParameter(key = "TestSuite", value = "VanillaFeature") - public class VanillaFeatureTestSuite { - } diff --git a/patches/server/1058-WIP-DataComponent-API.patch b/patches/server/1065-WIP-DataComponent-API.patch index 74f390591b..b9cbd2de5e 100644 --- a/patches/server/1058-WIP-DataComponent-API.patch +++ b/patches/server/1065-WIP-DataComponent-API.patch @@ -3833,7 +3833,7 @@ index 0000000000000000000000000000000000000000..724e889cd668191e0472f3f56d6833e5 + } +} diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java -index 12220f78ffaf06433ada72fd0c7f22b97d55287d..e1c6f514f45a02d7401b5390aefd0a4946b8e4b9 100644 +index f8c6da955e4bd0e480c7b581d2a4325738f9dd6f..ee1fce58c6e57dd93a30ee66e7488a92f9da2fe3 100644 --- a/src/main/java/io/papermc/paper/registry/PaperRegistries.java +++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java @@ -1,6 +1,8 @@ @@ -3845,14 +3845,14 @@ index 12220f78ffaf06433ada72fd0c7f22b97d55287d..e1c6f514f45a02d7401b5390aefd0a49 import io.papermc.paper.registry.data.PaperEnchantmentRegistryEntry; import io.papermc.paper.registry.data.PaperGameEventRegistryEntry; import io.papermc.paper.registry.entry.RegistryEntry; -@@ -84,6 +86,7 @@ public final class PaperRegistries { - entry(Registries.VILLAGER_TYPE, RegistryKey.VILLAGER_TYPE, Villager.Type.class, CraftVillager.CraftType::new), - entry(Registries.MAP_DECORATION_TYPE, RegistryKey.MAP_DECORATION_TYPE, MapCursor.Type.class, CraftMapCursor.CraftType::new), - entry(Registries.MENU, RegistryKey.MENU, MenuType.class, CraftMenuType::new), +@@ -96,6 +98,7 @@ public final class PaperRegistries { + entry(Registries.ATTRIBUTE, RegistryKey.ATTRIBUTE, Attribute.class, CraftAttribute::new), + entry(Registries.FLUID, RegistryKey.FLUID, Fluid.class, CraftFluid::new), + entry(Registries.SOUND_EVENT, RegistryKey.SOUND_EVENT, Sound.class, CraftSound::new), + entry(Registries.DATA_COMPONENT_TYPE, RegistryKey.DATA_COMPONENT_TYPE, DataComponentType.class, PaperComponentType::of), // data-drivens - entry(Registries.STRUCTURE, RegistryKey.STRUCTURE, Structure.class, CraftStructure::new).delayed(), + entry(Registries.BIOME, RegistryKey.BIOME, Biome.class, CraftBiome::new).delayed(), diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index 756c73a401437566258813946fa10c7caa8f2469..4fe0543754ba644a7ce2231ec267007215f823c4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -4956,7 +4956,7 @@ index 629fccec144b5d66addc0e8258cde90e81904e1c..6961730365da9083e8963200ecc5f85d @ParameterizedTest diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index ba5c958f322dc34baff3c9d1b99741a4ffeee135..13614672db233c3fb96bde7c4f6c52a583e6e341 100644 +index c27f37fd8a0e90b1440bfd4329d044eb8df629d2..2a3ad42be9db193b843be122389c50933ded2cd9 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -453,7 +453,7 @@ public class ItemMetaTest { @@ -4983,10 +4983,10 @@ index ba5c958f322dc34baff3c9d1b99741a4ffeee135..13614672db233c3fb96bde7c4f6c52a5 this.downCastTest(name, provider.stack(), craftBlank); craftBlank.setItemMeta(craftBlank.getItemMeta()); diff --git a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java -index eb3974690fb12ffe678522ed47e0f730712db016..1843b89c8616acc1fca7757f938c6b62e8b6c2a8 100644 +index b717a5ffa567781b0687bbe238b62844214db284..2d60c06b70201e4c993498af3c8e52da94b5a63e 100644 --- a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java +++ b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java -@@ -83,6 +83,7 @@ public class RegistriesArgumentProvider implements ArgumentsProvider { +@@ -100,6 +100,7 @@ public class RegistriesArgumentProvider implements ArgumentsProvider { register(RegistryKey.MAP_DECORATION_TYPE, MapCursor.Type.class, Registries.MAP_DECORATION_TYPE, CraftMapCursor.CraftType.class, MapDecorationType.class); register(RegistryKey.BANNER_PATTERN, PatternType.class, Registries.BANNER_PATTERN, CraftPatternType.class, BannerPattern.class); register(RegistryKey.MENU, MenuType.class, Registries.MENU, CraftMenuType.class, net.minecraft.world.inventory.MenuType.class); diff --git a/patches/server/1066-fix-test-drop-this-patch-on-rebase.patch b/patches/server/1066-fix-test-drop-this-patch-on-rebase.patch new file mode 100644 index 0000000000..a8ae5da5fd --- /dev/null +++ b/patches/server/1066-fix-test-drop-this-patch-on-rebase.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Lulu13022002 <[email protected]> +Date: Fri, 8 Nov 2024 21:51:54 +0100 +Subject: [PATCH] fix test (drop this patch on rebase) + + +diff --git a/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java b/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java +index 75ed5050f72c001d6eab117a2c0b352a413548bd..cf9e00d7afc17cca4fb256a52ad11b767814149d 100644 +--- a/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java ++++ b/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java +@@ -21,11 +21,13 @@ import org.bukkit.support.RegistryHelper; + import org.bukkit.support.environment.VanillaFeature; + import org.junit.jupiter.api.AfterAll; + import org.junit.jupiter.api.BeforeAll; ++import org.junit.jupiter.api.Disabled; + import org.junit.jupiter.api.Test; + + import static org.junit.jupiter.api.Assertions.assertTrue; + + @VanillaFeature ++@Disabled + public class MinecraftCommandPermissionsTest { + + private static PrintStream old; |