Recommended way to display item using CMI holograms API #7719
ChimpGamer
started this conversation in
General
Replies: 1 comment
-
I managed to get it working using the following code but it seems a little wacky `val hologram = CMIHologram(UUID.randomUUID().toString(), CMILocation(displayLocation)) val enchanted = itemStack.enchantments.isNotEmpty() hologram.addLine("ICON:${itemStack.type}" + if (enchanted) "%enchanted%" else "") locationToHologram[containerLocation] = hologram val page = hologram.getPage(1) ?: return |
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
-
One way of doing it is by adding the line ICON:material but when trying to display something like a banner or potion that won't work since you're missing lots of data. I've been looking for a method quite a while but haven't been able to find any.
Beta Was this translation helpful? Give feedback.
All reactions