Item DataComponent API (#10845)

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
This commit is contained in:
Owen1212055
2024-11-18 15:09:44 -05:00
parent 33bafcbf2d
commit 76403d796b
4 changed files with 9046 additions and 0 deletions

View File

@@ -1314,6 +1314,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ // Key
+
+ public static Key asAdventure(final ResourceLocation key) {
+ return Key.key(key.getNamespace(), key.getPath());
+ }
+
+ public static ResourceLocation asVanilla(final Key key) {
+ return ResourceLocation.fromNamespaceAndPath(key.namespace(), key.value());
+ }