Topic category: Advanced modding
Hello,
I am in the process of creating a mod that places 10,000 chests in a random range of 100 from the relative position of the player when my world first loads. Each chest is also given 1 "written book" at the top left corner of the chest. Inside each written book, it says, "*Invalid book tag*". In the graphically designed flow of my procedure, (in my several attemptS to assign text to 'written books'), I have a green code block puzzle piece that says,
"Set NBT text tag '???' of ??? to '???'".
Inside my first '???', I have it set to the string, "pages". Inside my second '???' (next to 'of'), I have that set to the written book that is inside the top left slot in each randomly placed chest. Inside my last '???' (next to 'to'), I have the string, "['{"text":"Minecraft Tools book"}'],title:Scriptures,author:"Michael S. Lowe",display:{Lore:["Scriptures"]}"... but it is a string I gave it, not Json.
... and STILL, my books say, "Invalid book tag." in them when I run my mod. If it is because the last '???' requires a type of PURE Json and NOT a type string, how can I construct Json in my graphically designed flow environment? Thank you.
can you not repost?
I don't know IF I am asking the question right... or how to 'better explain' exactly what it is I am trying to do, and don't see a button on how to ask Klemen the question I am trying to ask either.
This post was also a question on Json.
Make a bug report (if it is a bug, and NOT a question).
There is not a bug or any errors in the program. Nothing in my GUI structure yields any errors. I even googled, "Set NBT text tag", to find that I am the ONLY person out there trying to use the tag, while there is NO documentation on it. I mean, what is the whole point of making a tag that nobody is going to know how to use?
So maybe make a bug report anyway?
I sent a bug report. This is the GUI puzzle piece I am using. I don't know what to put to the right of, "Set NBT text tag" in order for the text to the right of "to", to be placed inside the written book (replacing, "*Invalid book tag*" with that text when I open the book while running the mod).
I am still trying to figure out how to use the green tag above to write text to written books.
Set NBT tag procedure block adds custom tags, it does not have access to vanilla tags.
I suggest using commands for this instead.
Thank you. What are custom tags and vanilla tags?
Is there a way I could alter a vanilla tag in Java instead? Once my mod creates all the written books, and places them inside each of the 10,000 chests that gets randomly placed within a 100 range away from my player's relative position when my world loads, I would have to find out where the chests got placed and enter 10,000 commands to put the writing in these books. Wouldn't it be a good suggestion to add a new GUI tag feature that does this?
IF it can't be done in Java or GUI, how do OTHER mod creators create THEIR mods with writing in THEIR books? What if a good idea for a feature would be to add a GUI 'puzzle piece' component called, "Run command line '???'", where '???' would be the string of the command line?
You could do this in code likely, but would require some Forge knowledge to do this
When it comes to using command lines in the command console, I tried...
/give @p writable_book 1 0 {"title":"Title","pages":["Writing"]}
and I get the error
Component 'pages' was not an object.
I am wondering if I should use the "Custom code snippet" GUI piece for the command when I DO finally get it right.