Posted January 7, 20205 yr Hey! I wanna open a written book GUI with text that has ActionEvent and HoverEvent (to use ITextComponent). However, the NBT only accepts String. Is there any way I can do this? Thanks
January 7, 20205 yr Yes. There should be helper methods in the book class (or another class) for writing this data. You can also look at json generators like this Minecraft Book Editor and Minecraft Json (Click on the Book button). About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
January 7, 20205 yr Author 9 hours ago, Cadiboo said: Yes. There should be helper methods in the book class (or another class) for writing this data. You can also look at json generators like this Minecraft Book Editor and Minecraft Json (Click on the Book button). Which methods exactly? I'm not seeing any TextFormatting works for the NBT, I just don't know how to add action and hover events for certain words Edited January 7, 20205 yr by Differentiation
January 9, 20205 yr I would say look at EditBookScreen and ReadBookScreen for how the data gets displayed and then reverse engineer it from there. The json generators should help you get the syntax and stuff right. You can use this knowledge to make your own helper methods if none exist. About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.