DataComponent API

Exposes the data component logic used by vanilla ItemStack to API
consumers as a version-specific API.
The types and methods introduced by this patch do not follow the general
API deprecation contracts and will be adapted to each new minecraft
release without backwards compatibility measures.
This commit is contained in:
Owen1212055
2024-04-28 19:53:06 -04:00
parent 65f5b7a4b7
commit 30b4dedabb
55 changed files with 3898 additions and 2 deletions

View File

@@ -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
Registry<io.papermc.paper.datacomponent.DataComponentType> DATA_COMPONENT_TYPE = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.DATA_COMPONENT_TYPE); // Paper
/**
* Get the object by its key.
*