We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c5364d7 + 711cf7a commit c8ca08fCopy full SHA for c8ca08f
1 file changed
src/main/java/dev/dfonline/codeclient/hypercube/ReferenceBook.java
@@ -31,8 +31,19 @@ public ItemStack getItem() {
31
return book;
32
}
33
34
+ /**
35
+ * This function exists to fix a compatibility issue with previewing items tags.
36
+ * (e.g. the {@link dev.dfonline.codeclient.dev.overlay.ActionViewer}'s fallback tooltip)
37
+ * @return the reference book without any tags applied to it.
38
+ */
39
+ public ItemStack getTaglessItem() {
40
+ var tagless = book.copy();
41
+ tagless.setSubNbt("PublicBukkitValues", null);
42
+ return tagless;
43
+ }
44
+
45
public List<Text> getTooltip() {
- return book.getTooltip(null, TooltipContext.BASIC);
46
+ return getTaglessItem().getTooltip(null, TooltipContext.BASIC);
47
48
49
// todo: parse into action?
0 commit comments