#How to see what is saved into dynamic properties?
1 messages · Page 1 of 1 (latest)
player.sendMessage(JSON.stringify(world.getDynamicProperty("db") ?? 0 ))
That's essentially what I've been trying, but I get something like this screenshot
well, what did u set?
well, item is not an ordinary object
What do you mean?
item cant be saved into string
There's a number of topics here saying to save inventory essentially like this (with JSON.stringify). How would I go about saving the inventory?
it's a lot complicated than just stringify
Yea, I figured... I'll probably have to do something like manually save each aspect of an ItemStack into a string
But that aside, do you know if there's a way to access such data outside the game, or where it is stored? Like the file name, and/or program to access it?
Well the dynamic property data gets stored on our end. Mojang doesn't hold it for us.
It's gotta be somewhere in /minecraftWorlds
I'd guess it's in minecraftWorlds/sadfkhkhsd/db/00128.ldb file, but I haven't gotten to accessing it yet
Thank you, I know js very well already 😂. The issue is that there isn't anything being output to verify, and there isn't an option to step into the code that I'm aware of. That leaves me with the only option of seeing what data is being written into storage, and reconstructing the object based on that.
You basically have to do a for in on native objects with getters and setters only. You might do a key in Object.getPrototypeOf({}); check so you dont get native object properties