Posted September 6, 20178 yr Heya! I currently work on the serialization of a nbt tag to a json file and I struggle at the point of saving an nbt array like NBTTagByteArray. There is no problem for me to do that, but i want to use the class JsonToNBT for the deserialisation. And here is the thing: For me there is no possbile way to do that. Minecraft wants for the deserialization a struct that looks like that: { "byte_array_name": [B;2B,4B,6B,9B] } For me that is no known or valid json format. Did I miss something or did minecraft something stupid here?
September 7, 20178 yr I think JSONToNBT does not take in a whole JSON file, but rather takes in a single JSON tag. So I think you need to run it on the result of somthing like JsonUtils.getString(object, "tag") where object is of type JSON Object. In other words, it just takes in the string value of the the element. Look at the SetNBT class that extends LootFunction Edited September 7, 20178 yr by jabelar Check out my tutorials here: http://jabelarminecraft.blogspot.com/
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.