#converting ComponentMap to usable minecraft String
10 messages · Page 1 of 1 (latest)
Not sure if this helps, but you can use component.encode(JsonOps.INSTANCE).getOrThrow() to get an encoded JsonElement of each component :)
(and then pass it through Gson().toJson(...) if you want a JSON string)
Thank you, i will take a look at that!
Thank you, I could get the .encode to show up, can you help?
wait I may have just gotten it, Thank you!
Nice! No problem :D
Hey Im very very close thanks to you!
But I am having a bit of a problem,
It seems to be repeating components
I am doing it with for (Component<?> type : componentMap)
And for some reason it lists the components over and over
hmm that problems fixed but now everything is a string
even the ints and minecraft doesnt like that
Fixed it!