Open YocyCraft opened 1 month ago
While the result is paginated, there's a clickable element that copies ALL tag names to the clipboard. This is most likely what's overflowing.
final String allElementNames = names.get().sorted().collect(Collectors.joining("\n"));
...
.withClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, allElementNames))
Confirmed. As @HenryLoenwind shows, the /neoforge tags
commands have a feature to copy all items across all pages (for listing tags of a registry, tags of an element, or elements of a tag) to the clipboard. For a huge amount of tags, that click event text exceeds the limit for encoding strings in packets.
I think, to keep it functional for most use cases but handle obscenely large lists, we will simply limit the copy-to-clipboard text to some reasonable limit of entries (with a message that it is a truncated list at the start and end). Assuming a size of 32 characters per tag key, that fits about 1,024 elements, which we'll just round down to 1,000.
Perhaps we can consider a new /neoforge dump
sub-command for specifically dumping tag-related entries?
Minecraft Version: {Minecraft version}
1.21.1
NeoForge Version: {NeoForge version. Version number, not latest/rb}
21.1.47
Logs: {Link(s) to GitHub Gist with full latest.log and/or crash report}
https://gist.github.com/YocyCraft/29d218b2409db9cf5d9d09cb48736635
Steps to Reproduce:
Description of issue:
There are too many tags of registry so the message returned from command is too long