How to get the translation key of an item? #879
twseer67875
started this conversation in
General
Replies: 2 comments
-
Tried the following, but I get System.out.println(((TranslatableComponent) item.displayName()).key()); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Generally speaking, the platform you are building against should provide API to obtain the translation key of an item. For example, on Paper you can simply call |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do I get the translate key using adventure?
What I want to end up with is
block.minecraft.anvil
At present, I can only use this stupid method to get it, and when the item is renamed, the Component of the two seems to be different, which makes me puzzled...
Use anvil and rename it to
test
as an examplebefore renaming
after renaming
Beta Was this translation helpful? Give feedback.
All reactions